lkml.org 
[lkml]   [2020]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 3/3] epic100: allow nesting of ethtool_ops begin() and complete()
> @@ -1435,8 +1436,10 @@ static int ethtool_begin(struct net_device *dev)
> struct epic_private *ep = netdev_priv(dev);
> void __iomem *ioaddr = ep->ioaddr;
>
> + if (ep->ethtool_ops_nesting == U32_MAX)
> + return -EBUSY;
> /* power-up, if interface is down */
> - if (!netif_running(dev)) {
> + if (ep->ethtool_ops_nesting++ && !netif_running(dev)) {
> ew32(GENCTL, 0x0200);
> ew32(NVCTL, (er32(NVCTL) & ~0x003c) | 0x4800);
> }

Hi Michal

In the via-velocity you added:

+ if (vptr->ethtool_ops_nesting == U32_MAX)
+ return -EBUSY;
+ if (!vptr->ethtool_ops_nesting++ && !netif_running(dev))
velocity_set_power_state(vptr, PCI_D0);
return 0;

These two fragments differ by a ! . Is that correct?

Andrew

\
 
 \ /
  Last update: 2020-01-05 23:09    [W:0.048 / U:2.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site