lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201206201324.00338.oneukum@suse.de>
Date:	Wed, 20 Jun 2012 13:24:00 +0200
From:	Oliver Neukum <oneukum@...e.de>
To:	Sergei Shtylyov <sshtylyov@...sta.com>
Cc:	Ming Lei <ming.lei@...onical.com>,
	"David S. Miller" <davem@...emloft.net>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	netdev@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH -v1 3/3] usbnet: handle remote wakeup asap

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@...onical.com>
> > ---
> >   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 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ