* [PATCH] [IB/QIB] Fix failure to load driver if PCI error reporting doesn't enable
@ 2010-10-22 20:42 Jason Gunthorpe
[not found] ` <20101022204245.GC30241-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2010-10-22 20:42 UTC (permalink / raw)
To: Ralph Campbell, RDMA list
This seems to be the intention of the code, since the jump to bail
is missing. PCI-E advanced error reporting seems optional, but
I wonder if pci_set_consistent_dma_mask is also optional?
This also fixes one case where the PCI region is leaked during
device startup. qib_init_one assumes that qib_pcie_init cleans up if
it fails.
Note: There appear to be several other leaks of the PCI region in
qib_init_one between qib_pcie_init and qib_init that I did not attempt
to fix, and a null pointer de-reference if CONFIG_PCI_MSI is not set
for 6120.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
drivers/infiniband/hw/qib/qib_pcie.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
index 7fa6e55..16ce9e7 100644
--- a/drivers/infiniband/hw/qib/qib_pcie.c
+++ b/drivers/infiniband/hw/qib/qib_pcie.c
@@ -113,6 +113,7 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent)
qib_early_err(&pdev->dev,
"Unable to enable pcie error reporting: %d\n",
ret);
+ ret = 0;
goto done;
bail:
--
1.6.0.4
--
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] 4+ messages in thread
* RE: [PATCH] [IB/QIB] Fix failure to load driver if PCI error reporting doesn't enable
[not found] ` <20101022204245.GC30241-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2010-10-22 21:28 ` Ralph Campbell
[not found] ` <35AAF1E4A771E142979F27B51793A488873ABE076D-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Ralph Campbell @ 2010-10-22 21:28 UTC (permalink / raw)
To: Jason Gunthorpe, RDMA list
I'm not sure this is the right change. I agree there are a lot of clean up on error
bugs. pci_set_consistent_dma_mask() isn't optional because the chip doesn't
support 32-bit PCIe addressing.
I'll look it over and try to come up with something better.
I'll submit a patch for the CONFIG_PCI_MSI not set case.
________________________________________
From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Jason Gunthorpe [jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
Sent: Friday, October 22, 2010 1:42 PM
To: Ralph Campbell; RDMA list
Subject: [PATCH] [IB/QIB] Fix failure to load driver if PCI error reporting doesn't enable
This seems to be the intention of the code, since the jump to bail
is missing. PCI-E advanced error reporting seems optional, but
I wonder if pci_set_consistent_dma_mask is also optional?
This also fixes one case where the PCI region is leaked during
device startup. qib_init_one assumes that qib_pcie_init cleans up if
it fails.
Note: There appear to be several other leaks of the PCI region in
qib_init_one between qib_pcie_init and qib_init that I did not attempt
to fix, and a null pointer de-reference if CONFIG_PCI_MSI is not set
for 6120.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
drivers/infiniband/hw/qib/qib_pcie.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
index 7fa6e55..16ce9e7 100644
--- a/drivers/infiniband/hw/qib/qib_pcie.c
+++ b/drivers/infiniband/hw/qib/qib_pcie.c
@@ -113,6 +113,7 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent)
qib_early_err(&pdev->dev,
"Unable to enable pcie error reporting: %d\n",
ret);
+ ret = 0;
goto done;
bail:
--
1.6.0.4
--
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
--
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] 4+ messages in thread
* Re: [PATCH] [IB/QIB] Fix failure to load driver if PCI error reporting doesn't enable
[not found] ` <35AAF1E4A771E142979F27B51793A488873ABE076D-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
@ 2010-10-22 21:36 ` Jason Gunthorpe
[not found] ` <20101022213647.GD30241-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2010-10-22 21:36 UTC (permalink / raw)
To: Ralph Campbell; +Cc: RDMA list
On Fri, Oct 22, 2010 at 02:28:54PM -0700, Ralph Campbell wrote:
> I'm not sure this is the right change. I agree there are a lot of
> clean up on error bugs. pci_set_consistent_dma_mask() isn't optional
> because the chip doesn't support 32-bit PCIe addressing.
Do you think pci_enable_pcie_error_reporting is optional? My test
machine doesn't have a chipset with AER so that will always fail (or
something), the driver hasn't exploded yet ... :)
> I'll look it over and try to come up with something better.
>
> I'll submit a patch for the CONFIG_PCI_MSI not set case.
The resource leaks suck too, since you have to reboot to try again.
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] 4+ messages in thread
* RE: [PATCH] [IB/QIB] Fix failure to load driver if PCI error reporting doesn't enable
[not found] ` <20101022213647.GD30241-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2010-10-22 21:39 ` Ralph Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ralph Campbell @ 2010-10-22 21:39 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: RDMA list
pci_enable_pcie_error_reporting() is optional.
________________________________________
From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Jason Gunthorpe [jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
Sent: Friday, October 22, 2010 2:36 PM
To: Ralph Campbell
Cc: RDMA list
Subject: Re: [PATCH] [IB/QIB] Fix failure to load driver if PCI error reporting doesn't enable
On Fri, Oct 22, 2010 at 02:28:54PM -0700, Ralph Campbell wrote:
> I'm not sure this is the right change. I agree there are a lot of
> clean up on error bugs. pci_set_consistent_dma_mask() isn't optional
> because the chip doesn't support 32-bit PCIe addressing.
Do you think pci_enable_pcie_error_reporting is optional? My test
machine doesn't have a chipset with AER so that will always fail (or
something), the driver hasn't exploded yet ... :)
> I'll look it over and try to come up with something better.
>
> I'll submit a patch for the CONFIG_PCI_MSI not set case.
The resource leaks suck too, since you have to reboot to try again.
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
--
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] 4+ messages in thread
end of thread, other threads:[~2010-10-22 21:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 20:42 [PATCH] [IB/QIB] Fix failure to load driver if PCI error reporting doesn't enable Jason Gunthorpe
[not found] ` <20101022204245.GC30241-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-10-22 21:28 ` Ralph Campbell
[not found] ` <35AAF1E4A771E142979F27B51793A488873ABE076D-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2010-10-22 21:36 ` Jason Gunthorpe
[not found] ` <20101022213647.GD30241-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-10-22 21:39 ` Ralph Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox