Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c653357 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Roland Dreier
Browse files

IB/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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: default avatarMike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent ec03d677
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -526,11 +526,8 @@ static int qib_tune_pcie_coalesce(struct qib_devdata *dd)
	 */
	 */
	devid = parent->device;
	devid = parent->device;
	if (devid >= 0x25e2 && devid <= 0x25fa) {
	if (devid >= 0x25e2 && devid <= 0x25fa) {
		u8 rev;

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