Re: Scatter-gather list constraints

From: Andi Kleen
Date: Sat Jun 21 2008 - 10:01:46 EST


Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:

> This question arises in connection with wireless USB mass-storage
> devices. The controller driver requires that all DMA segments
> in a transfer, other than the last one, have a multiple of 1024 bytes.
> But we're sometimes getting s-g lists where an element contains an odd
> number of 512-byte sectors, and of course it doesn't work.

But you can handle a single 512 byte request? Splitting the request
in this case should work. Or maybe copying is cheaper than splitting?

I don't think the block layer knows about such kinds of restrictions.

-Andi
--
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/