From: Doug Ledford <dledford@redhat.com>
To: Sinan Kaya <okaya@kernel.org>, linux-pci@vger.kernel.org
Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>,
Dennis Dalessandro <dennis.dalessandro@intel.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH for-rc v2 3/3] IB/hfi1: Prefer new __pci_reset_function_locked() API with reset type
Date: Wed, 05 Sep 2018 12:17:31 -0400 [thread overview]
Message-ID: <b2120f18825daa4a239ffba0f84a5a5909c1cc7b.camel@redhat.com> (raw)
In-Reply-To: <20180905160805.5680-3-okaya@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
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@kernel.org>
Acked-by: Doug Ledford <dledford@redhat.com>
> ---
> 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@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-09-05 20:48 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 ` [PATCH for-rc v2 3/3] IB/hfi1: Prefer new __pci_reset_function_locked() API with reset type Sinan Kaya
2018-09-05 16:17 ` Doug Ledford [this message]
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=b2120f18825daa4a239ffba0f84a5a5909c1cc7b.camel@redhat.com \
--to=dledford@redhat.com \
--cc=dennis.dalessandro@intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-pci@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
--cc=okaya@kernel.org \
/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).