]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7ec3bc3324f8c4ce4a2208824786c5ec74e21d4e
treea0faf74c0e128badd7e7989d45ca0076459d1627
parent3a0cadedae5379a335475f9afb3388910bd8345d
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