cypress_m8: implement graceful failure handling
authorMike Isely <isely@pobox.com>
Wed, 30 Aug 2006 03:07:11 +0000 (22:07 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 27 Sep 2006 18:58:59 +0000 (11:58 -0700)
commit78aef519ed07797f94cff1d0d66dd01704474916
treea0faf74c0e128badd7e7989d45ca0076459d1627
parent48298e50e0f7dfc7273ebfaa37ffd225428e83ed
cypress_m8: implement graceful failure handling

When receiving a fatal error from the USB core, e.g. EILSEQ (which can
happen if the polling interval is too short), fail gracefully.
Previously the driver would fill the log with useless error messages
or (more alarmingly) silently spin forever trying to write updated
control information to the device.  This change implements a new flag
which if cleared indicates that the driver has failed.  The flag will
be set on initialization, cleared on fatal errors, and anything else
that touches the USB port in the driver will abort if the flag is
clear.  When the flag is cleared, a message will be logged indicating
that the driver has failed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/cypress_m8.c