Re: [RFC] usb: g_file_storage: don't enqueue partial buffers where possible

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

 



On Mon, 9 Mar 2009, David Vrabel wrote:

> The g_file_storage module part fills an IN buffer if the requested read
> would have ended in the middle of a page.  With wireless USB this can
> result in enqueued requests that are not a multiple of wMaxPacketSize
> (e.g., 3584) and consequentially the host would receive an unexpected
> short packet.
> 
> Is there are reason for this check for the page boundary?  Is it simply
> an optimization so subsequent calls to vfs_read() are page-aligned?

That's right.

> The attached patch simply removes the check for partial pages.

Can you rewrite it so that the check is removed only when
wMaxPacketSize > 512?

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