From: Mike Isely <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- 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 741dcec..12a265c 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -367,9 +367,7 @@ static int cypress_serial_control (struc if (tries++ >= 3) break; - if (retval == EPIPE) - usb_clear_halt(port->serial->dev, 0x00); - } while (retval != 8 && retval != ENODEV); + } while (retval != 8 && retval != -ENODEV); if (retval != 8) err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); @@ -394,9 +392,7 @@ static int cypress_serial_control (struc if (tries++ >= 3) break; - if (retval == EPIPE) - usb_clear_halt(port->serial->dev, 0x00); - } while (retval != 5 && retval != ENODEV); + } while (retval != 5 && retval != -ENODEV); if (retval != 5) { err("%s - failed to retrieve serial line settings - %d", __FUNCTION__, retval); -- 1.4.2.1 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel