From: Oliver Neukum <oneukum-l3A5Bk7waGM@public•gmane.org>
To: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public•gmane.org>
Cc: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public•gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public•gmane.org>,
"Greg Kroah-Hartman"
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public•gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
Subject: Re: [PATCH -v1 3/3] usbnet: handle remote wakeup asap
Date: Wed, 20 Jun 2012 13:24:00 +0200 [thread overview]
Message-ID: <201206201324.00338.oneukum@suse.de> (raw)
In-Reply-To: <4FE1ADB4.4060302-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
Am Mittwoch, 20. Juni 2012, 13:02:12 schrieb Sergei Shtylyov:
> > Without the patch, usbnet can't recieve any packets from peer
> > in runtime suspend state if runtime PM is enabled and
> > autosuspend_delay is set as zero.
>
> > Signed-off-by: Ming Lei<ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public•gmane.org>
> > ---
> > drivers/net/usb/usbnet.c | 42 ++++++++++++++++++++++++++----------------
> > 1 file changed, 26 insertions(+), 16 deletions(-)
>
> > diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> > index 9bfa775..a89d6c5 100644
> > --- a/drivers/net/usb/usbnet.c
> > +++ b/drivers/net/usb/usbnet.c
> > @@ -1201,6 +1201,21 @@ deferred:
> > }
> > EXPORT_SYMBOL_GPL(usbnet_start_xmit);
> >
> > +static void rx_alloc_submit(struct usbnet *dev, gfp_t flags)
> > +{
> > + struct urb *urb;
> > + int i;
> > +
> > + /* don't refill the queue all at once */
> > + for (i = 0; i< 10&& dev->rxq.qlen< RX_QLEN(dev); i++) {
> > + urb = usb_alloc_urb(0, flags);
> > + if (urb != NULL) {
> > + if (rx_submit(dev, urb, flags) == -ENOLINK)
>
> The above 2 if statements can be collapsed into single one.
>
That would not improve readability.
Regards
Oliver
--
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:[~2012-06-20 11:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 7:15 [PATCH -v1 0/3] usbnet: usbnet: PM related fixes Ming Lei
2012-06-20 7:15 ` [PATCH -v1 1/3] usbnet: clear OPEN flag in failure path Ming Lei
2012-06-20 7:44 ` Oliver Neukum
2012-06-20 7:46 ` [PATCH -v1 0/3] usbnet: usbnet: PM related fixes Oliver Neukum
[not found] ` <1340176553-32225-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-06-20 7:15 ` [PATCH -v1 2/3] usbnet: decrease suspend count if returning -EBUSY for runtime suspend Ming Lei
[not found] ` <1340176553-32225-3-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-06-20 7:45 ` Oliver Neukum
2012-06-20 7:15 ` [PATCH -v1 3/3] usbnet: handle remote wakeup asap Ming Lei
2012-06-20 7:46 ` Oliver Neukum
[not found] ` <1340176553-32225-4-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-06-20 11:02 ` Sergei Shtylyov
[not found] ` <4FE1ADB4.4060302-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2012-06-20 11:24 ` Oliver Neukum [this message]
2012-06-23 0:34 ` [PATCH -v1 0/3] usbnet: usbnet: PM related fixes David Miller
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=201206201324.00338.oneukum@suse.de \
--to=oneukum-l3a5bk7wagm@public$(echo .)gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public$(echo .)gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public$(echo .)gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public$(echo .)gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public$(echo .)gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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