]> git.baikalelectronics.ru Git - kernel.git/commit
EtherExpress16: fix printing timed out status
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 30 Dec 2008 02:42:33 +0000 (18:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Dec 2008 02:42:33 +0000 (18:42 -0800)
commit760cb439f3758d6a099b22e21b92cce1737f5a60
tree7388e9ff9e1bdc60526731b242dc10f8f1a294bb
parent47f0a640301a3c10b98b4ffb15b8d709753ce8a2
EtherExpress16: fix printing timed out status

in drivers/net/eexpress.c:558, function unstick_cu()

while (!SCB_complete(rsst=scb_status(dev))) {
...
if (...)
printk(KERN_WARNING "%s: Reset timed out status %04x, retrying...\n",
                                                       dev->name,rsst);
}

but this will become

while (!((rsst = scb_status(dev) & 0x8000) != 0) ...

because of the macro:

#define SCB_complete(s) ((s&0x8000)!=0)

so rsst can only become either 0x8000 or 0, but in the latter case the
loop ends, I think the wrong timed out status is printed. This also
cleans up similar macros.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/eexpress.h