diff options
author | Christian Lamparter <chunkeey@web.de> | 2009-01-16 14:24:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:43 -0500 |
commit | c88a768d7ed1bc38eedf18d16419ef2f01cd2d0d (patch) | |
tree | 16d58531ca245e55c341b1ac6dd9a1c563f2cf61 /drivers | |
parent | c656bbb582cebd988d8c39c4912722dc47578eab (diff) |
p54usb: fix conflict with recent usb changes
A recent change in the usb core "USB: change interface to usb_lock_device_for_reset()"
conflicts with "p54usb: utilize usb_reset_device for 3887".
Sadly, we have to call usb_reset_device before we can upload the firmware on 3887.
Unless someone figures out how to reliably stop the 3887 so the hardware is still usable
next time we want to start it.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/p54/p54usb.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 44d6855bd17c..9539ddcf379f 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -430,14 +430,16 @@ static const char p54u_firmware_upload_3887[] = "<\r"; | |||
430 | static int p54u_device_reset_3887(struct ieee80211_hw *dev) | 430 | static int p54u_device_reset_3887(struct ieee80211_hw *dev) |
431 | { | 431 | { |
432 | struct p54u_priv *priv = dev->priv; | 432 | struct p54u_priv *priv = dev->priv; |
433 | int ret, lock; | 433 | int ret, lock = (priv->intf->condition != USB_INTERFACE_BINDING); |
434 | u8 buf[4]; | 434 | u8 buf[4]; |
435 | 435 | ||
436 | ret = lock = usb_lock_device_for_reset(priv->udev, priv->intf); | 436 | if (lock) { |
437 | if (ret < 0) { | 437 | ret = usb_lock_device_for_reset(priv->udev, priv->intf); |
438 | dev_err(&priv->udev->dev, "(p54usb) unable to lock device for " | 438 | if (ret < 0) { |
439 | "reset: %d\n", ret); | 439 | dev_err(&priv->udev->dev, "(p54usb) unable to lock " |
440 | return ret; | 440 | " device for reset: %d\n", ret); |
441 | return ret; | ||
442 | } | ||
441 | } | 443 | } |
442 | 444 | ||
443 | ret = usb_reset_device(priv->udev); | 445 | ret = usb_reset_device(priv->udev); |