From: Sinan Kaya <okaya@kernel.org>
To: linux-pci@vger.kernel.org
Cc: Sinan Kaya <okaya@kernel.org>,
Mike Marciniszyn <mike.marciniszyn@intel.com>,
Dennis Dalessandro <dennis.dalessandro@intel.com>,
Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Subject: [PATCH for-rc v2 3/3] IB/hfi1: Prefer new __pci_reset_function_locked() API with reset type
Date: Wed, 5 Sep 2018 16:08:05 +0000 [thread overview]
Message-ID: <20180905160805.5680-3-okaya@kernel.org> (raw)
In-Reply-To: <20180905160805.5680-1-okaya@kernel.org>
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@kernel.org>
---
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);
}
/*
--
2.18.0
next prev parent reply other threads:[~2018-09-05 20:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 16:08 [PATCH for-rc v2 1/3] PCI: Fix faulty logic in pci_reset_bus() Sinan Kaya
2018-09-05 16:08 ` [PATCH for-rc v2 2/3] PCI: Request reset type as part of function reset Sinan Kaya
2018-09-05 23:07 ` Boris Ostrovsky
2018-09-05 16:08 ` Sinan Kaya [this message]
2018-09-05 16:17 ` [PATCH for-rc v2 3/3] IB/hfi1: Prefer new __pci_reset_function_locked() API with reset type Doug Ledford
2018-09-05 17:21 ` Dennis Dalessandro
2018-09-12 1:09 ` Bjorn Helgaas
2018-09-12 1:23 ` Sinan Kaya
2018-09-12 1:59 ` Bjorn Helgaas
2018-09-12 2:05 ` Sinan Kaya
2018-09-12 2:23 ` Dennis Dalessandro
2018-09-12 2:34 ` Alex Williamson
2018-09-12 2:47 ` Sinan Kaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180905160805.5680-3-okaya@kernel.org \
--to=okaya@kernel.org \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-pci@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).