From: Paul Stewart <pstew-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCHv4] usbnet: Resubmit interrupt URB once if halted
Date: Wed, 20 Apr 2011 14:17:10 -0700 [thread overview]
Message-ID: <BANLkTi=N3T-V8VNOcbKu6COKvbEHqMoAog@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1104201658280.1686-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
On Wed, Apr 20, 2011 at 2:08 PM, Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org> wrote:
> On Tue, 19 Apr 2011, Paul Stewart wrote:
>
>> Set a flag if the interrupt URB completes with ENOENT as this
>> occurs legitimately during system suspend. When the usbnet_bh
>> is called after resume, test this flag and try once to resubmit
>> the interrupt URB.
>
> No doubt there's a good reason for doing things this way, but it isn't
> clear. Why wait until usbnet_bh() is called after resume? Why not
> resubmit the interrupt URB _during_ usbnet_resume()?
Actually, I was doing this in the bh because of feedback I had gained
early in this process about not doing submit_urb in the resume(). If
that issue doesn't exist, that makes my work a lot easier. In testing
I found that just setting this to happen in the bh might be problematic
due to firing too early, so this is good news.
> This would seem
> to be the logical approach, seeing as how usbnet_suspend() kills the
> interrupt URB.
Aha! But you'll see from the current version of my patch that we don't
actually ever kill the interrupt URB. It gets killed all on its own (by the
hcd?) and handed back to us in intr_complete(). This last bit about the
complete function being called was lost on me for a while which is why
in a previous iteration of the patch I was trying to kill the urb in suspend().
> For that matter, where does the interrupt URB get deallocated? It
> obviously gets allocated in init_status(), but it doesn't seem to be
> freed anywhere.
That's a very interesting question and one that I noticed as well.
I was going to tackle that as a separate issue.
>
> Alan Stern
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-04-20 21:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 16:35 [PATCH] usbnet: Resubmit interrupt URB more often Paul Stewart
2011-04-19 17:11 ` Ben Hutchings
2011-04-19 17:44 ` [PATCHv2] " Paul Stewart
2011-04-20 8:24 ` David Miller
[not found] ` <20110420182234.GB8143@kroah.com>
[not found] ` <Pine.LNX.4.44L0.1104201252010.2159-100000@iolanthe.rowland.org>
2011-04-19 17:44 ` [PATCHv4] usbnet: Resubmit interrupt URB once if halted Paul Stewart
2011-04-20 21:08 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1104201658280.1686-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2011-04-20 21:17 ` Paul Stewart [this message]
[not found] ` <BANLkTi=N3T-V8VNOcbKu6COKvbEHqMoAog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-19 17:44 ` Paul Stewart
[not found] ` <20110420214452.C599321126-6A69KNNYBwgF248FYctl9mCaruZE5nAUZeezCHUQhQ4@public.gmane.org>
2011-04-21 14:03 ` Alan Stern
2011-04-21 14:58 ` Paul Stewart
2011-04-21 16:27 ` Alan Stern
2011-04-21 20:00 ` Oliver Neukum
[not found] ` <201104212200.26551.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2011-04-21 21:40 ` Alan Stern
2011-04-21 13:43 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1104210937360.1939-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2011-04-21 14:44 ` Paul Stewart
[not found] ` <20110420.012431.104074243.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-04-19 17:44 ` [PATCHv3] " Paul Stewart
2011-04-19 17:51 ` [PATCH] usbnet: Resubmit interrupt URB more often Paul Stewart
[not found] <BANLkTinhmAfe1V2SvoY+J6Tu_DdnZMoYgw@mail.gmail.com>
2011-04-21 18:48 ` [PATCHv4] usbnet: Resubmit interrupt URB once if halted Alan Stern
2011-04-22 14:59 ` Paul Stewart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=N3T-V8VNOcbKu6COKvbEHqMoAog@mail.gmail.com' \
--to=pstew-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).