Re: [PATCH] usbnet: ignore get interface retval of -EINPROGRESS
flat view
From: Jim Wylder <hidden>
Date: 2011-09-03 17:32:47
Oliver, Thanks for the quick feedback. True usbnet_start_xmit() could be running at anytime, but the usb_autopm_get_interface_async() will only return -EINPROGRESS when rpm_resume detects that dev->power.runtime_status == RPM_RESUMING. My understanding is that for an asynchronous request, the promise that the device is resuming would be equivalent to cases where usb_autopm_get_interface_async() returns success. In all other cases, when we are not attempting to resume an already resuming interface, this change should have no impact. Are you recommending that I add an additional check for DEV_ASLEEP, possibly to decide whether to drop the or continue on? Or am I missing your point? I had not done anything similar because my understanding was that knowing that the device is in fact resuming would be sufficient. Jim On Sat, Sep 3, 2011 at 11:37 AM, Oliver Neukum [off-list ref] wrote:
Am Samstag, 3. September 2011, 16:21:00 schrieb Jim Wylder:quoted
When calling pm_runtime_get, usb_autopm_get_interface_async treats a return value of -EINPROGRESS as a success and increments the usage count. Since the interface is resuming, it is safe for usbnet_start_xmit to submit the urb.usbnet_start_xmit() is exported, so simply stating that it is called when the interface is resumingisn't enough. It seems to me that the later check for DEV_ASLEEP will save as, but have you checked for that? Regards Oliver