Re: [PATCH v1 1/4] USB: introduce usb_device_no_sg_limit() helper

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

 



On Sat, Aug 3, 2013 at 11:53 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, 3 Aug 2013, Ming Lei wrote:
>
>> 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.
>
>> 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
--
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