Skip to content

Commit

Permalink
IB/qib: Use pci_dev->revision
Browse files Browse the repository at this point in the history
The driver reads PCI revision ID from the PCI configuration register
while it's already stored by PCI subsystem in the revision field of
struct pci_dev.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Sergei Shtylyov authored and Roland Dreier committed May 12, 2011
1 parent ec03d67 commit 1c65335
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/infiniband/hw/qib/qib_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,8 @@ static int qib_tune_pcie_coalesce(struct qib_devdata *dd)
*/
devid = parent->device;
if (devid >= 0x25e2 && devid <= 0x25fa) {
u8 rev;

/* 5000 P/V/X/Z */
pci_read_config_byte(parent, PCI_REVISION_ID, &rev);
if (rev <= 0xb2)
if (parent->revision <= 0xb2)
bits = 1U << 10;
else
bits = 7U << 10;
Expand Down

0 comments on commit 1c65335

Please sign in to comment.