* [PATCH 1/2] IB/qib: fix uninitialized pointer if CONFIG_PCI_MSI not set
@ 2010-10-22 22:29 Ralph Campbell
[not found] ` <20101022222937.28161.50341.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Ralph Campbell @ 2010-10-22 22:29 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
If CONFIG_PCI_MSI is not set, and a QLE7140 is present, the
pointer "dd" was uninitialized.
Signed-off-by: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/qib/qib_init.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c
index f1d16d3..f3b5039 100644
--- a/drivers/infiniband/hw/qib/qib_init.c
+++ b/drivers/infiniband/hw/qib/qib_init.c
@@ -1243,6 +1243,7 @@ static int __devinit qib_init_one(struct pci_dev *pdev,
qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot "
"work if CONFIG_PCI_MSI is not enabled\n",
ent->device);
+ dd = ERR_PTR(-ENODEV);
#endif
break;
--
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 related [flat|nested] 8+ messages in thread[parent not found: <20101022222937.28161.50341.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>]
* [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails [not found] ` <20101022222937.28161.50341.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> @ 2010-10-22 22:29 ` Ralph Campbell [not found] ` <20101022222951.28161.23347.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Ralph Campbell @ 2010-10-22 22:29 UTC (permalink / raw) To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA Some PCIe root complex chip sets don't support advanced error reporting. Allow the driver to load OK if pci_enable_pcie_error_reporting() fails. Signed-off-by: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> --- drivers/infiniband/hw/qib/qib_pcie.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 7fa6e55..8a64426 100644 --- a/drivers/infiniband/hw/qib/qib_pcie.c +++ b/drivers/infiniband/hw/qib/qib_pcie.c @@ -109,10 +109,12 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) pci_set_master(pdev); ret = pci_enable_pcie_error_reporting(pdev); - if (ret) + if (ret) { qib_early_err(&pdev->dev, "Unable to enable pcie error reporting: %d\n", ret); + ret = 0; + } goto done; bail: -- 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 related [flat|nested] 8+ messages in thread
[parent not found: <20101022222951.28161.23347.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>]
* Re: [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails [not found] ` <20101022222951.28161.23347.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> @ 2010-10-22 22:57 ` Jason Gunthorpe [not found] ` <20101022225710.GD15514-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Jason Gunthorpe @ 2010-10-22 22:57 UTC (permalink / raw) To: Ralph Campbell; +Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA On Fri, Oct 22, 2010 at 03:29:54PM -0700, Ralph Campbell wrote: > Some PCIe root complex chip sets don't support advanced error reporting. > Allow the driver to load OK if pci_enable_pcie_error_reporting() fails. Thanks If you use this solution you'll want this hunk as well to avoid a leak: diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 16ce9e7..2913af2 100644 --- a/drivers/infiniband/hw/qib/qib_pcie.c +++ b/drivers/infiniband/hw/qib/qib_pcie.c @@ -103,9 +103,11 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); } else ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (ret) + if (ret) { qib_early_err(&pdev->dev, "Unable to set DMA consistent mask: %d\n", ret); + goto bail; + } pci_set_master(pdev); ret = pci_enable_pcie_error_reporting(pdev); Jason -- 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 related [flat|nested] 8+ messages in thread
[parent not found: <20101022225710.GD15514-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>]
* Re: [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails [not found] ` <20101022225710.GD15514-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> @ 2010-10-23 20:54 ` Roland Dreier [not found] ` <adabp6ksk83.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Roland Dreier @ 2010-10-23 20:54 UTC (permalink / raw) To: Jason Gunthorpe; +Cc: Ralph Campbell, linux-rdma-u79uwXL29TY76Z2rM5mHXA I'm lost on which initialization / cleanup fixes are the right ones to take for qib. Can someone point me to the definitive set of patches? - R. -- 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] 8+ messages in thread
[parent not found: <adabp6ksk83.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails [not found] ` <adabp6ksk83.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> @ 2010-10-25 20:35 ` Ralph Campbell [not found] ` <1288038933.27343.392.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Ralph Campbell @ 2010-10-25 20:35 UTC (permalink / raw) To: Roland Dreier Cc: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [-- Attachment #1: Type: text/plain, Size: 357 bytes --] On Sat, 2010-10-23 at 13:54 -0700, Roland Dreier wrote: > I'm lost on which initialization / cleanup fixes are the right ones to > take for qib. Can someone point me to the definitive set of patches? > > - R. If Jason agrees, they are the attached. There are probably more error paths that need fixing but I think separate patches make sense for those. [-- Attachment #2: Attached message - [PATCH 1/2] IB/qib: fix uninitialized pointer if CONFIG_PCI_MSI not set --] [-- Type: message/rfc822, Size: 4088 bytes --] From: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Subject: [PATCH 1/2] IB/qib: fix uninitialized pointer if CONFIG_PCI_MSI not set Date: Fri, 22 Oct 2010 15:29:46 -0700 Message-ID: <20101022222937.28161.50341.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> If CONFIG_PCI_MSI is not set, and a QLE7140 is present, the pointer "dd" was uninitialized. Signed-off-by: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> --- drivers/infiniband/hw/qib/qib_init.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index f1d16d3..f3b5039 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -1243,6 +1243,7 @@ static int __devinit qib_init_one(struct pci_dev *pdev, qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot " "work if CONFIG_PCI_MSI is not enabled\n", ent->device); + dd = ERR_PTR(-ENODEV); #endif break; -- 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 [-- Attachment #3: Attached message - [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails --] [-- Type: message/rfc822, Size: 4514 bytes --] From: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Subject: [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails Date: Fri, 22 Oct 2010 15:29:54 -0700 Message-ID: <20101022222951.28161.23347.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> Some PCIe root complex chip sets don't support advanced error reporting. Allow the driver to load OK if pci_enable_pcie_error_reporting() fails. Signed-off-by: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> --- drivers/infiniband/hw/qib/qib_pcie.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 7fa6e55..8a64426 100644 --- a/drivers/infiniband/hw/qib/qib_pcie.c +++ b/drivers/infiniband/hw/qib/qib_pcie.c @@ -109,10 +109,12 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) pci_set_master(pdev); ret = pci_enable_pcie_error_reporting(pdev); - if (ret) + if (ret) { qib_early_err(&pdev->dev, "Unable to enable pcie error reporting: %d\n", ret); + ret = 0; + } goto done; bail: -- 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 [-- Attachment #4: Attached message - [PATCH] IB/qib: clean up properly if pci_set_consistent_dma_mask() fails --] [-- Type: message/rfc822, Size: 4317 bytes --] From: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Subject: [PATCH] IB/qib: clean up properly if pci_set_consistent_dma_mask() fails Date: Fri, 22 Oct 2010 17:09:30 -0700 Message-ID: <20101023000925.30641.2559.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Clean up properly if pci_set_consistent_dma_mask() fails. Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> --- drivers/infiniband/hw/qib/qib_pcie.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 8a64426..48b6674 100644 --- a/drivers/infiniband/hw/qib/qib_pcie.c +++ b/drivers/infiniband/hw/qib/qib_pcie.c @@ -103,9 +103,11 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); } else ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (ret) + if (ret) { qib_early_err(&pdev->dev, "Unable to set DMA consistent mask: %d\n", ret); + goto bail; + } pci_set_master(pdev); ret = pci_enable_pcie_error_reporting(pdev); -- 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 related [flat|nested] 8+ messages in thread
[parent not found: <1288038933.27343.392.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>]
* Re: [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails [not found] ` <1288038933.27343.392.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> @ 2010-10-25 20:41 ` Jason Gunthorpe 2010-10-26 4:19 ` Roland Dreier 1 sibling, 0 replies; 8+ messages in thread From: Jason Gunthorpe @ 2010-10-25 20:41 UTC (permalink / raw) To: Ralph Campbell Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Oct 25, 2010 at 01:35:33PM -0700, Ralph Campbell wrote: > On Sat, 2010-10-23 at 13:54 -0700, Roland Dreier wrote: > > I'm lost on which initialization / cleanup fixes are the right ones to > > take for qib. Can someone point me to the definitive set of patches? > > If Jason agrees, they are the attached. > There are probably more error paths that need fixing > but I think separate patches make sense for those. Yes, there are more error paths that leak things, but this fixes up some obvious ones and makes the driver work (and not leak) on older PCI-E systems. Please include the 3 patches from Ralph in this round. Thanks, Jason -- 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] 8+ messages in thread
* Re: [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails [not found] ` <1288038933.27343.392.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> 2010-10-25 20:41 ` Jason Gunthorpe @ 2010-10-26 4:19 ` Roland Dreier [not found] ` <ada1v7dh9gc.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 8+ messages in thread From: Roland Dreier @ 2010-10-26 4:19 UTC (permalink / raw) To: Ralph Campbell; +Cc: Jason Gunthorpe, linux-rdma@vger.kernel.org OK, I got those 3 patches. -- 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] 8+ messages in thread
[parent not found: <ada1v7dh9gc.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails [not found] ` <ada1v7dh9gc.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> @ 2010-10-26 4:25 ` Jason Gunthorpe 0 siblings, 0 replies; 8+ messages in thread From: Jason Gunthorpe @ 2010-10-26 4:25 UTC (permalink / raw) To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Oct 25, 2010 at 09:19:47PM -0700, Roland Dreier wrote: > OK, I got those 3 patches. Thanks While you are looking at patches, did you have any comment on: https://patchwork.kernel.org/patch/151491/ https://patchwork.kernel.org/patch/151501/ ? Jason -- 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] 8+ messages in thread
end of thread, other threads:[~2010-10-26 4:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 22:29 [PATCH 1/2] IB/qib: fix uninitialized pointer if CONFIG_PCI_MSI not set Ralph Campbell
[not found] ` <20101022222937.28161.50341.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
2010-10-22 22:29 ` [PATCH 2/2] IB/qib: Allow driver to load if PCIe advanced error reporting fails Ralph Campbell
[not found] ` <20101022222951.28161.23347.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
2010-10-22 22:57 ` Jason Gunthorpe
[not found] ` <20101022225710.GD15514-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-10-23 20:54 ` Roland Dreier
[not found] ` <adabp6ksk83.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-25 20:35 ` Ralph Campbell
[not found] ` <1288038933.27343.392.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
2010-10-25 20:41 ` Jason Gunthorpe
2010-10-26 4:19 ` Roland Dreier
[not found] ` <ada1v7dh9gc.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-26 4:25 ` Jason Gunthorpe
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.