diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-04-09 12:24:49 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-04-09 12:24:49 +0200 |
commit | 383b3cb658f99f3fd9aea3fe94e9060e895a7568 (patch) | |
tree | 4418324917cc79ee911c542485340ce1cddeccd6 /drivers/usb/core/usb.c | |
parent | 731cc538f3bdce594095d31af9bc288dcd511ab9 (diff) | |
parent | 3f4dfa9077cb189da4895e9408e8556adec69b26 (diff) | |
download | barebox-383b3cb658f99f3fd9aea3fe94e9060e895a7568.tar.gz barebox-383b3cb658f99f3fd9aea3fe94e9060e895a7568.tar.xz |
Merge branch 'for-next/usb-storage'
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 7b008435fd..d29cd1328b 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -63,7 +63,6 @@ static int dev_count; static int dev_index; -static int asynch_allowed; static LIST_HEAD(host_list); LIST_HEAD(usb_device_list); @@ -98,7 +97,6 @@ int usb_register_host(struct usb_host *host) list_add_tail(&host->list, &host_list); host->busnum = host_busnum++; host->sem = 0; - asynch_allowed = 1; return 0; } @@ -559,16 +557,6 @@ void usb_rescan(void) pr_info("%d USB Device(s) found\n", dev_count); } -/* - * disables the asynch behaviour of the control message. This is used for data - * transfers that uses the exclusiv access to the control and bulk messages. - */ -void usb_disable_asynch(int disable) -{ - asynch_allowed = !disable; -} - - /*------------------------------------------------------------------- * Message wrappers. * @@ -597,10 +585,9 @@ int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, /* * submits a control message and waits for completion (at least timeout * 1ms) * If timeout is 0, we don't wait for completion (used as example to set and - * clear keyboards LEDs). For data transfers, (storage transfers) we don't - * allow control messages with 0 timeout, by previously resetting the flag - * asynch_allowed (usb_disable_asynch(1)). - * returns the transfered length if OK or -1 if error. The transfered length + * clear keyboards LEDs). + * + * Returns the transfered length if OK or -1 if error. The transfered length * and the current status are stored in the dev->act_len and dev->status. */ int usb_control_msg(struct usb_device *dev, unsigned int pipe, @@ -612,11 +599,6 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, int ret; struct devrequest *setup_packet = dev->setup_packet; - if ((timeout == 0) && (!asynch_allowed)) { - /* request for a asynch control pipe is not allowed */ - return -1; - } - ret = usb_host_acquire(host); if (ret) return ret; |