USB: remove the URB_NO_FSBR flag
Shuah Khan
Acked-byQuoted 12 lines · Alan Stern
The
URB_NO_FSBRflag has never really been used. It was introduced as a potential way for UHCI to minimize PCI bus usage (by not attempting full-speed bulk and control transfers more than once per frame), but the flag was not set by any drivers.There's no point in keeping it around. This patch simplifies the API by removing it. Unfortunately, it does have to be kept as part of the usbfs ABI, but at least we can document in
include/uapi/linux/usbdevice_fs.hthat it doesn't do anything.Signed-off-by Alan Stern <[email protected]>
Quoted 7 lines
---
Shuah, I'm not sure if this will cause an interoperability problem for usbip. In theory, a machine running an older kernel might set the
URB_NO_FSBRflag when communicating with a new kernel, which would cause an error. But I don't know any reason why even an old kernel would ever set the flag.
Alan, I am not sure how the interoperability will manifest.
<snip>
Quoted 18 lines
===================================================================
drivers/usb/core/urb.c +0
-3@@ -479,9 +479,6 @@ int usb_submit_urb(struct urb *urb, gfp_if (is_out) allowed |=URB_ZERO_PACKET ;/* FALLTHROUGH */ -case USB_ENDPOINT_XFER_CONTROL : - allowed |=URB_NO_FSBR ;/* only affects UHCI */ -/* FALLTHROUGH */ default :/* all non-iso endpoints */ if (!is_out) allowed |=URB_SHORT_NOT_OK ;Index:
usb-4.x/drivers/usb/host/uhci-q.c
===================================================================
drivers/usb/host/uhci-q.c static void uhci_add_fsbr(struct uhci_hc · line 76
Quoted 6 lines
drivers/usb/host/uhci-q.c +1
-2@@ -73,8 +73,7 @@ static void uhci_add_fsbr(struct uhci_hc {struct urb_priv *urbp = urb->hcpriv; -if (!(urb->transfer_flags &URB_NO_FSBR )) - urbp->fsbr =1 ; + urbp->fsbr =1 ;
So essentially fsbr gets set always. URB_NO_FSBR has no effect.
Quoted 8 lines
drivers/usb/host/uhci-q.c +0
-0}static void uhci_urbp_wants_fsbr (struct uhci_hcd *uhci,struct urb_priv *urbp)Index:
usb-4.x/drivers/usb/usbip/stub_rx.c
===================================================================
drivers/usb/usbip/stub_rx.c static void masking_bogus_flags(struct u · line 417
Quoted 6 lines
drivers/usb/usbip/stub_rx.c +0
-3@@ -412,9 +412,6 @@ static void masking_bogus_flags(struct uif (is_out) allowed |=URB_ZERO_PACKET ;/* FALLTHROUGH */ -case USB_ENDPOINT_XFER_CONTROL : - allowed |=URB_NO_FSBR ;/* only affects UHCI */ -/* FALLTHROUGH */
usbip doesn't really do anything special for URB_NO_FSBR, other than just setting the flag here. This is followed by usb_submit_urb(). Probably there is no need to set URB_NO_FSBR in USBIP to begin with, considering usb_submit_urb() handled that before this patch.
I think it is safe to make the change.
thanks,
-- Shuah
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html