be2net: fix a bug in UE detection logic
authorAjit Khaparde <ajitk@serverengines.com>
Fri, 3 Sep 2010 06:23:30 +0000 (06:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Sep 2010 16:52:46 +0000 (09:52 -0700)
commitd053de911bff69ba7cdda36d3107c1da0fba7ccd
tree4b15644f3e1ebe9b4e09629739b7515f142c7de0
parent1ef78abec6b5e9e3062e3ae6660eabaf055a718d
be2net: fix a bug in UE detection logic

The ONLINE registers can return 0xFFFFFFFF on more than one
occassion. On systems that care, reading these registers could
lead to problems.

So the new code decides that the ASIC has encountered and error
by reading the UE_STATUS_LOW/HIGH registers. AND them with
the mask values and a non-zero result indicates an error.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_cmds.c
drivers/net/benet/be_cmds.h
drivers/net/benet/be_main.c