* [PATCH 2/2] qib: use pci_dev->revision
@ 2011-05-07 17:41 Sergei Shtylyov
[not found] ` <201105072141.56328.sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2011-05-07 17:41 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
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-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
---
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;
--
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[parent not found: <201105072141.56328.sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>]
* RE: [PATCH 2/2] qib: use pci_dev->revision [not found] ` <201105072141.56328.sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org> @ 2011-05-09 19:39 ` Mike Marciniszyn 0 siblings, 0 replies; 2+ messages in thread From: Mike Marciniszyn @ 2011-05-09 19:39 UTC (permalink / raw) To: Sergei Shtylyov, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-kernel > 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 <mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> -----Original Message----- From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Sergei Shtylyov Sent: Saturday, May 07, 2011 1:42 PM To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org; sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org; hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; 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 <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org> --- 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; -- 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 This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message. -- 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:39 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:41 [PATCH 2/2] qib: use pci_dev->revision Sergei Shtylyov
[not found] ` <201105072141.56328.sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-05-09 19:39 ` Mike Marciniszyn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox