summaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore/security.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-10-27 17:12:33 +0000
committerDavid Vrabel <david.vrabel@csr.com>2008-10-28 12:10:25 +0000
commit4656d5de9555e263c5b4c0462b5af7e7bded1b42 (patch)
treec8406b562bd8f7796da869ce152c7d75480e2dda /drivers/usb/wusbcore/security.c
parent1cde7f68ced8d10a20dd2370e9d1d22ab3c1ea5c (diff)
downloadblackbird-op-linux-4656d5de9555e263c5b4c0462b5af7e7bded1b42.tar.gz
blackbird-op-linux-4656d5de9555e263c5b4c0462b5af7e7bded1b42.zip
wusb: reset WUSB devices with SetAddress(0)
Using a Reset Device IE to reset a WUSB device is too heavyweight as it causes the devcie to disconnect (which the USB stack does not expect and cannot handle). Instead, do a SetAddress(0); SetAddress(AuthAddr) for authenticated devices. Unauthenticated devices will not be reset and the stack will have to rely on the device timing out after TrustTimeout and disconnecting. Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/usb/wusbcore/security.c')
-rw-r--r--drivers/usb/wusbcore/security.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c
index a101cad6a8d4..ac00640bba64 100644
--- a/drivers/usb/wusbcore/security.c
+++ b/drivers/usb/wusbcore/security.c
@@ -338,8 +338,7 @@ static void hs_printk(unsigned level, struct device *dev,
* Before the device's address (as known by it) was usb_dev->devnum |
* 0x80 (unauthenticated address). With this we update it to usb_dev->devnum.
*/
-static int wusb_dev_update_address(struct wusbhc *wusbhc,
- struct wusb_dev *wusb_dev)
+int wusb_dev_update_address(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
{
int result = -ENOMEM;
struct usb_device *usb_dev = wusb_dev->usb_dev;
OpenPOWER on IntegriCloud