Variable sized sent works but fails during ioremap for kmalloc-ed
buffers. Fixed few bugs in original implementation.

Signed-off-by Ajo Jose Panoor <ajopanoor@gmail.com>