Re: [PATCH] usb: gadget: file_storage: don't assume wMaxPacketSize to be 512

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 5 Apr 2011, Mian Yousaf Kaukab wrote:

> 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.

You are trying to use the short_not_ok flag for something it wasn't
designed for.  Its real purpose is to allow drivers to delimit
consecutive bulk transfers, in the case where the first transfer ends 
early.

Besides, what is your controller going to do if a full-sized packet is 
expected but a short packet actually arrives?

Alan Stern

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux