usb_autopm_get_interface() returns an error if runtime PM is disabled, yet this should not impede the ability to submit URBs. This can happen just as the device is removed but the interface driver's disconnect() routine has not been called. Thus any client wishing to call read or write may errorneously continue to call and might eventually flood the console with excessive printks which could cause a watchdog timeout. So treat -EAGAIN and -EACCES as okay and only bail on other error values. Also, rate-limit the printks associated with reading/writing on the bridge to further avoid the possibility of excessive logging during similar corner cases. Finally, use -ENODEV as an indicator that read/write should halt. This will handle the case when an URB fails to submit late in the device disconnect stage, and the client should not attempt any more submissions. CRs-fixed: 370694 Change-Id: Ia5f4a4bd7ed620eedd2cd00c117066b8c7eb4f8c Signed-off-by: Jack Pham <jackp@codeaurora.org>