When a device supported by the option driver is suspended, the interrupt
urb is killed and option_instat_callback() is invoked with the urb's
status set to -ENOENT. The patch prevents the option driver from
spamming the log with a message 'option_instat_callback: error -2' under
such scenario.
BUG=chrome-os-partner:17918
TEST=Tested the following on link:
1. Put the system on battery so that USB auto-suspend is turned on for
the Novatel E362 modem.
2. Verify that the option kernel drive no longer prints the following
error to /var/log/messages:
option: option_instat_callback: error -2
(cherry picked from commit
b09ec140d31136176eee94bfb49f46eb7cf2ffda)
Change-Id: I6e286a3cbf4087a88a06682f8b32d45109d84364
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43907
dbg("%s: type %x req %x", __func__,
req_pkt->bRequestType, req_pkt->bRequest);
}
- } else
+ } else if (status != -ESHUTDOWN && status != -ENOENT)
err("%s: error %d", __func__, status);
/* Resubmit urb so we continue receiving IRQ data */