2007-03-25 23:17:49

by Daniel Drake

[permalink] [raw]
Subject: [PATCH] zd1211rw-mac80211: tweak reset-on-probe behaviour

From: Ulrich Kunitz <[email protected]>

This is an update to the earlier commit 8b4ebaabf12. The argument
is directly used and an error condition will be handled.

Here are some sentences about the reason for this commit. There
have been a larger number of reports of problems after rebooting
the machine. According to reports the resetting of the stick
during probe makes this problem disappear. Notify that it doesn't
help while reloading the module.

Signed-off-by: Ulrich Kunitz <[email protected]>
Signed-off-by: Daniel Drake <[email protected]>
---
drivers/net/wireless/mac80211/zd1211rw/zd_usb.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c b/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c
index 418a8ad..8867110 100644
--- a/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c
@@ -917,7 +917,12 @@ static int probe(struct usb_interface *intf, const struct usb_device_id *id)
goto error;
}

- usb_reset_device(interface_to_usbdev(intf));
+ r = usb_reset_device(udev);
+ if (r) {
+ dev_err(&intf->dev,
+ "couldn't reset usb device. Error number %d\n", r);
+ goto error;
+ }

dev = zd_mac_alloc(intf);
if (dev == NULL) {
--
1.5.0.5