bnx2x: Prevent probe as early as possible
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Sun, 29 Mar 2015 07:05:01 +0000 (10:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2015 17:34:10 +0000 (13:34 -0400)
commit0f587f1bfb1fb15d9ebd94c565dd11ae6d4e03b6
tree418790613ce71a53794396ec5cb64caa062ef77a
parentfcd02d27b5c543f2d4538d2ac402fed1154c6dfb
bnx2x: Prevent probe as early as possible

It's possible that due to errors [either on PCI or on device itself]
registers reads would fail, returning all-Fs.

This adds a check as early as possible so that driver will not read junk
values and make incorrect probe decisions according to them; instead,
gracefully fail the probe.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c