Re: [PATCH v1 1/4] USB: introduce usb_device_no_sg_limit() helper
From: Ming Lei <hidden>
Date: 2013-08-04 00:22:20
On Sat, Aug 3, 2013 at 11:53 PM, Alan Stern [off-list ref] wrote:
On Sat, 3 Aug 2013, Ming Lei wrote:quoted
Some host controllers(such as xHCI) can support building packet from discontinuous buffers, so introduce one flag and helper for this kind of host controllers, then the feature can help some applications(such as, usbnet) by supporting arbitrary length of sg buffers.quoted
diff --git a/include/linux/usb.h b/include/linux/usb.h index 84f14e2..5d03074 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h@@ -337,6 +337,7 @@ struct usb_bus { * the ep queue on a short transfer * with the URB_SHORT_NOT_OK flag set. */ + unsigned no_sg_limit:1; /* no sg list limit */Why do you call this "no_sg_limit"? It isn't a limit on the SG list; the list can be arbitrarily long, provided all the entries except the last are divisible by the maxpacket size. You could call it "no_sg_constraint" if you want. Or "allow_arbitrary_sg", to put a more positive spin on it.
OK, I prefer no_sg_constraint, and will do it in v2. Thanks, -- Ming Lei