diff options
author | Mike Isely <isely@pobox.com> | 2006-08-29 23:07:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 14:58:58 -0400 |
commit | 48298e50e0f7dfc7273ebfaa37ffd225428e83ed (patch) | |
tree | c70741f603c5a65571dc70b846de1f28471eeadf /drivers/usb | |
parent | 9aa8dae7b1fa7af099a403fc3766e068a0ea6d68 (diff) |
cypress_m8: improve control endpoint error handling
Fix usb core function error return checks to look for negative errno
values, not positive errno values. This bug had rendered those checks
useless. Also remove attempted error recovery on control endpoints
for EPIPE - with control endpoints EPIPE does not indicate a halted
endpoint so trying to recover with usb_clear_halt() is not the correct
action.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 741dcec36d41..12a265c4a13b 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -367,9 +367,7 @@ static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_m | |||
367 | if (tries++ >= 3) | 367 | if (tries++ >= 3) |
368 | break; | 368 | break; |
369 | 369 | ||
370 | if (retval == EPIPE) | 370 | } while (retval != 8 && retval != -ENODEV); |
371 | usb_clear_halt(port->serial->dev, 0x00); | ||
372 | } while (retval != 8 && retval != ENODEV); | ||
373 | 371 | ||
374 | if (retval != 8) | 372 | if (retval != 8) |
375 | err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); | 373 | err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); |
@@ -394,9 +392,7 @@ static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_m | |||
394 | if (tries++ >= 3) | 392 | if (tries++ >= 3) |
395 | break; | 393 | break; |
396 | 394 | ||
397 | if (retval == EPIPE) | 395 | } while (retval != 5 && retval != -ENODEV); |
398 | usb_clear_halt(port->serial->dev, 0x00); | ||
399 | } while (retval != 5 && retval != ENODEV); | ||
400 | 396 | ||
401 | if (retval != 5) { | 397 | if (retval != 5) { |
402 | err("%s - failed to retrieve serial line settings - %d", __FUNCTION__, retval); | 398 | err("%s - failed to retrieve serial line settings - %d", __FUNCTION__, retval); |