public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ipath: use pci_dev->revision, again
@ 2011-05-07 17:39 Sergei Shtylyov
       [not found] ` <201105072139.37992.sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2011-05-07 17:39 UTC (permalink / raw)
  To: infinipath-h88ZbnxC6KDQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (PCI: Change all drivers to use
pci_device->revision) already converted this driver to using the 'revision'
field of 'struct pci_dev' but commit bb9171448deb1f7ece27674e2e431e4f267fd453
(IB/ipath: Misc changes to prepare for IB7220 introduction) later reverted that
change for some strange reason. Now restore the change...

Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>

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

 drivers/infiniband/hw/ipath/ipath_driver.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Index: linux-2.6/drivers/infiniband/hw/ipath/ipath_driver.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/hw/ipath/ipath_driver.c
+++ linux-2.6/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -398,7 +398,6 @@ static int __devinit ipath_init_one(stru
 	struct ipath_devdata *dd;
 	unsigned long long addr;
 	u32 bar0 = 0, bar1 = 0;
-	u8 rev;
 
 	dd = ipath_alloc_devdata(pdev);
 	if (IS_ERR(dd)) {
@@ -540,13 +539,7 @@ static int __devinit ipath_init_one(stru
 		goto bail_regions;
 	}
 
-	ret = pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
-	if (ret) {
-		ipath_dev_err(dd, "Failed to read PCI revision ID unit "
-			      "%u: err %d\n", dd->ipath_unit, -ret);
-		goto bail_regions;	/* shouldn't ever happen */
-	}
-	dd->ipath_pcirev = rev;
+	dd->ipath_pcirev = pdev->revision;
 
 #if defined(__powerpc__)
 	/* There isn't a generic way to specify writethrough mappings */
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-09 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-07 17:39 [PATCH 1/2] ipath: use pci_dev->revision, again Sergei Shtylyov
     [not found] ` <201105072139.37992.sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-05-09 19:38   ` Mike Marciniszyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox