On Wed, 2018-09-05 at 16:08 +0000, Sinan Kaya wrote: > pci_reset_bus() is being called from the probe context and causes > a deadlock since pci_reset_bus() also tries to obtain kernel lock. > > Use __pci_reset_function_locked() that provides locking guarantees. > > Fixes: 811c5cb37df4 ("PCI: Unify try slot and bus reset API") > Link: https://bugzilla.kernel.org/show_bug.cgi?id=200985 > Signed-off-by: Sinan Kaya <okaya@xxxxxxxxxx> Acked-by: Doug Ledford <dledford@xxxxxxxxxx> > --- > drivers/infiniband/hw/hfi1/pcie.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c > index eec83757d55f..13162289b748 100644 > --- a/drivers/infiniband/hw/hfi1/pcie.c > +++ b/drivers/infiniband/hw/hfi1/pcie.c > @@ -900,7 +900,7 @@ static int trigger_sbr(struct hfi1_devdata *dd) > * delay after a reset is required. Per spec requirements, > * the link is either working or not after that point. > */ > - return pci_reset_bus(dev); > + return __pci_reset_function_locked(dev, PCI_RESET_LINK); > } > > /* -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Attachment:
signature.asc
Description: This is a digitally signed message part