[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110410152336.GA14182@rere.qmqm.pl>
Date: Sun, 10 Apr 2011 17:23:36 +0200
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: Vladislav Zolotarov <vladz@...adcom.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eilon Greenstein <eilong@...adcom.com>
Subject: Re: [PATCH] net: bnx2x: convert to hw_features
On Sun, Apr 10, 2011 at 06:10:14PM +0300, Vladislav Zolotarov wrote:
> > +int bnx2x_set_features(struct net_device *dev, u32 features)
> > +{
> > + struct bnx2x *bp = netdev_priv(dev);
> > + u32 flags = bp->flags;
> > +
> > + if (features & NETIF_F_LRO)
> > + flags |= TPA_ENABLE_FLAG;
> > + else
> > + flags &= ~TPA_ENABLE_FLAG;
> > +
> > + if (flags ^ bp->flags) {
> > + bp->flags = flags;
> > +
> > + return bnx2x_reload_if_running(dev);
> > }
> >
> > - return rc;
> > + return 0;
> > }
>
> Thanks a lot, Michal. Looks ok but one remark below.
>
> Every time bnx2x_reload_if_running(dev) is called one has to check if
> there is still a recovery process in progress like u did in the
> bnx2x_fix_features(). So this check is missing in the function above.
bnx2x_set_features() might be called only if bnx2x_fix_features() returns
different feature set than what's already set in dev->features. So this
case is implicitly covered. I'll add a comment for this.
Best Regards,
Michał Mirosław
--
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