[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPopfEWi0v9VXeDYcBfEgnWYxg7WcTTj3GBc6USzwcN+aGrKOQ@mail.gmail.com>
Date: Sat, 3 Sep 2011 12:32:44 -0500
From: Jim Wylder <jwylder1@...orola.com>
To: Oliver Neukum <oliver@...kum.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] usbnet: ignore get interface retval of -EINPROGRESS
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 <oliver@...kum.org> wrote:
> Am Samstag, 3. September 2011, 16:21:00 schrieb Jim Wylder:
>> 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
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists