diff options
author | Alan Stern | 2017-12-11 11:58:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-12-12 13:16:07 +0100 |
commit | aa15d3d257f9edcb8d15ed27e228d1c0080cb919 (patch) | |
tree | 15538925275f3ddf5768c279e644049740c4e75b | |
parent | 4ff02f099f68f1e6be5956849180eaa326c37248 (diff) |
USB: remove the URB_NO_FSBR flag
The URB_NO_FSBR flag 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.h that it doesn't do anything.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | Documentation/usb/usbip_protocol.txt | 1 | ||||
-rw-r--r-- | drivers/usb/core/devio.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/urb.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/uhci-q.c | 3 | ||||
-rw-r--r-- | drivers/usb/usbip/stub_rx.c | 3 | ||||
-rw-r--r-- | include/linux/usb.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/usbdevice_fs.h | 2 |
7 files changed, 2 insertions, 13 deletions
diff --git a/Documentation/usb/usbip_protocol.txt b/Documentation/usb/usbip_protocol.txt index 16b6fe27284c..c7a0f4c7e7f1 100644 --- a/Documentation/usb/usbip_protocol.txt +++ b/Documentation/usb/usbip_protocol.txt @@ -274,7 +274,6 @@ USBIP_CMD_SUBMIT: Submit an URB URB_SHORT_NOT_OK | 0x00000001 | only in | only in | only in | no URB_ISO_ASAP | 0x00000002 | no | no | no | yes URB_NO_TRANSFER_DMA_MAP | 0x00000004 | yes | yes | yes | yes - URB_NO_FSBR | 0x00000020 | yes | no | no | no URB_ZERO_PACKET | 0x00000040 | no | no | only out | no URB_NO_INTERRUPT | 0x00000080 | yes | yes | yes | yes URB_FREE_BUFFER | 0x00000100 | yes | yes | yes | yes diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 705c573d0257..808b370f1737 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1677,8 +1677,6 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb u |= URB_ISO_ASAP; if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK && is_in) u |= URB_SHORT_NOT_OK; - if (uurb->flags & USBDEVFS_URB_NO_FSBR) - u |= URB_NO_FSBR; if (uurb->flags & USBDEVFS_URB_ZERO_PACKET) u |= URB_ZERO_PACKET; if (uurb->flags & USBDEVFS_URB_NO_INTERRUPT) diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 9fdf137c4865..796c9b149728 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -479,9 +479,6 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) 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; diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index d40438238938..35fcb826152c 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c @@ -73,8 +73,7 @@ static void uhci_add_fsbr(struct uhci_hcd *uhci, struct urb *urb) { struct urb_priv *urbp = urb->hcpriv; - if (!(urb->transfer_flags & URB_NO_FSBR)) - urbp->fsbr = 1; + urbp->fsbr = 1; } static void uhci_urbp_wants_fsbr(struct uhci_hcd *uhci, struct urb_priv *urbp) diff --git a/drivers/usb/usbip/stub_rx.c b/drivers/usb/usbip/stub_rx.c index 536e037f541f..7a9aa9ff485d 100644 --- a/drivers/usb/usbip/stub_rx.c +++ b/drivers/usb/usbip/stub_rx.c @@ -412,9 +412,6 @@ static void masking_bogus_flags(struct urb *urb) 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; diff --git a/include/linux/usb.h b/include/linux/usb.h index fbbe974661f2..fe665a0d5bce 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1293,7 +1293,6 @@ extern int usb_disabled(void); #define URB_ISO_ASAP 0x0002 /* iso-only; use the first unexpired * slot in the schedule */ #define URB_NO_TRANSFER_DMA_MAP 0x0004 /* urb->transfer_dma valid on submit */ -#define URB_NO_FSBR 0x0020 /* UHCI-specific */ #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt * needed */ diff --git a/include/uapi/linux/usbdevice_fs.h b/include/uapi/linux/usbdevice_fs.h index 70ed5338d447..964e87217be4 100644 --- a/include/uapi/linux/usbdevice_fs.h +++ b/include/uapi/linux/usbdevice_fs.h @@ -79,7 +79,7 @@ struct usbdevfs_connectinfo { #define USBDEVFS_URB_SHORT_NOT_OK 0x01 #define USBDEVFS_URB_ISO_ASAP 0x02 #define USBDEVFS_URB_BULK_CONTINUATION 0x04 -#define USBDEVFS_URB_NO_FSBR 0x20 +#define USBDEVFS_URB_NO_FSBR 0x20 /* Not used */ #define USBDEVFS_URB_ZERO_PACKET 0x40 #define USBDEVFS_URB_NO_INTERRUPT 0x80 |