2011-05-07 17:43:54

by Sergei Shtylyov

[permalink] [raw]
Subject: [PATCH 2/2] qib: use pci_dev->revision

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 <[email protected]>

---
The patch is against the recent Linus' tree.

drivers/infiniband/hw/qib/qib_pcie.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Index: linux-2.6/drivers/infiniband/hw/qib/qib_pcie.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/hw/qib/qib_pcie.c
+++ linux-2.6/drivers/infiniband/hw/qib/qib_pcie.c
@@ -526,11 +526,8 @@ static int qib_tune_pcie_coalesce(struct
*/
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;


2011-05-09 19:40:04

by Mike Marciniszyn

[permalink] [raw]
Subject: RE: [PATCH 2/2] qib: use pci_dev->revision

> 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'...

Thanks for the patch.

qib: use pci_dev->revision

Acked-by: Mike Marciniszyn <[email protected]>


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Sergei Shtylyov
Sent: Saturday, May 07, 2011 1:42 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; linux-kernel
Subject: [PATCH 2/2] qib: use pci_dev->revision

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 <[email protected]>

---
The patch is against the recent Linus' tree.

drivers/infiniband/hw/qib/qib_pcie.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Index: linux-2.6/drivers/infiniband/hw/qib/qib_pcie.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/hw/qib/qib_pcie.c
+++ linux-2.6/drivers/infiniband/hw/qib/qib_pcie.c
@@ -526,11 +526,8 @@ static int qib_tune_pcie_coalesce(struct
*/
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;