• Mike Isely's avatar
    cypress_m8: implement graceful failure handling · 78aef519
    Mike Isely authored
    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: default avatarMike Isely <isely@pobox.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    78aef519
cypress_m8.c 48.9 KB