Block device questions

From: Kieran Kunhya
Date: Sat May 31 2014 - 13:25:24 EST


Hello,

I'm writing a driver for Sony SxS cards, which is an Expresscard based
flash memory card used in Sony cameras with an eventual goal of
submitting the code to mainline.

The code in its current working but ugly state can be found here:
https://github.com/kierank/sxs-linux/blob/master/sxs.c

I had some questions about the block device layer:

As far as I can tell from reverse engineering the device, it doesn't
support full scatter/gather but can do multiple block reads to one
address of DMA memory of a suitable size. Is there a way of coalescing
adjacent segments and letting the device write to one large slab of
DMA memory? Or do I have to handle each segment individually?

Also how many minor numbers am I meant to allocate with alloc_disk()?

Regards,

Kieran Kunhya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/