aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2007-06-08 18:46:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:02:10 -0400
commit44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (patch)
tree6e16d3ec80c87490dc743f72da086356f2906ace /drivers/net/bnx2.c
parentb8a3a5214d7cc115f1ca3a3967b7229d97c46f4a (diff)
PCI: Change all drivers to use pci_device->revision
Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index ce3ed67a878e..23958f73c421 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6363,10 +6363,9 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
6363 while ((amd_8132 = pci_get_device(PCI_VENDOR_ID_AMD, 6363 while ((amd_8132 = pci_get_device(PCI_VENDOR_ID_AMD,
6364 PCI_DEVICE_ID_AMD_8132_BRIDGE, 6364 PCI_DEVICE_ID_AMD_8132_BRIDGE,
6365 amd_8132))) { 6365 amd_8132))) {
6366 u8 rev;
6367 6366
6368 pci_read_config_byte(amd_8132, PCI_REVISION_ID, &rev); 6367 if (amd_8132->revision >= 0x10 &&
6369 if (rev >= 0x10 && rev <= 0x13) { 6368 amd_8132->revision <= 0x13) {
6370 disable_msi = 1; 6369 disable_msi = 1;
6371 pci_dev_put(amd_8132); 6370 pci_dev_put(amd_8132);
6372 break; 6371 break;