Hi, On Tue, Apr 05, 2011 at 11:50:23AM +0200, Mian Yousaf Kaukab wrote: > > @@ -1333,10 +1311,12 @@ static int do_write(struct fsg_dev *fsg) > > if (amount_left_to_req == 0) > > get_some_more = 0; > > > > - /* amount is always divisible by 512, hence by > > - * the bulk-out maxpacket size */ > > + /* Except at the end of the transfer, amount will be > > + * equal to the buffer size, which is divisible by > > + * the page size and hence by the bulk-out maxpacket > > + * size. > > + */ > > bh->outreq->length = amount; > > - bh->outreq->short_not_ok = 1; > > Instead of removing short_not_ok can we use something like following? > bh->outreq->short_not_ok = (amount % maxp) ? 0 : 1; > short_not_ok is useful for example when it is not possible to do DMA > tranfers from usb controller's buffer to the memory for unaligned > lengths. > controller driver can decide to use dma or pio mode based on if short > packets are expected or not. IMHO, we should avoid PIO as much as possible. Specially with USB3 comming. It's fairly simple for driver to always set req->length as a multiple of wMaxPacketSize and that'll make all controllers happy, not only just a few. -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html