Commit 72e0661c authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by David S. Miller

[IRDA]: Stir driver usb reset fix

<Patch from Stephen Hemminger>

o [CORRECT] stir4200 - get rid of reset on speed change

The Sigmatel 4200 doesn't accept the address setting which gets done on
USB reset.  The USB core recently changed to resend address (or
something like that), so usb_reset_device is failing.

The device works without doing the USB reset on speed change, it just
will be less robust in recovering when things get wedged (like coming
out of FIR mode).
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a4ff624
......@@ -168,7 +168,6 @@ enum StirTestMask {
struct stir_cb {
struct usb_device *usbdev; /* init: probe_irda */
struct usb_interface *usbintf;
struct net_device *netdev; /* network layer */
struct irlap_cb *irlap; /* The link layer we are binded to */
struct net_device_stats stats; /* network statistics */
......@@ -509,7 +508,6 @@ static int change_speed(struct stir_cb *stir, unsigned speed)
{
int i, err;
__u8 mode;
int rc;
for (i = 0; i < ARRAY_SIZE(stir_modes); ++i) {
if (speed == stir_modes[i].speed)
......@@ -522,18 +520,6 @@ static int change_speed(struct stir_cb *stir, unsigned speed)
found:
pr_debug("speed change from %d to %d\n", stir->speed, speed);
/* sometimes needed to get chip out of stuck state */
rc = usb_lock_device_for_reset(stir->usbdev, stir->usbintf);
if (rc < 0) {
err = rc;
goto out;
}
err = usb_reset_device(stir->usbdev);
if (rc)
usb_unlock_device(stir->usbdev);
if (err)
goto out;
/* Reset modulator */
err = write_reg(stir, REG_CTRL1, CTRL1_SRESET);
if (err)
......@@ -1075,7 +1061,6 @@ static int stir_probe(struct usb_interface *intf,
stir = net->priv;
stir->netdev = net;
stir->usbdev = dev;
stir->usbintf = intf;
ret = usb_reset_configuration(dev);
if (ret != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment