linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Dalessandro <dennis.dalessandro@intel.com>
To: Sinan Kaya <okaya@codeaurora.org>,
	bhelgaas@google.com, linux-pci@vger.kernel.org
Subject: Re: bug in pci_try_reset_bus
Date: Mon, 27 Aug 2018 16:48:50 -0400	[thread overview]
Message-ID: <980dc79b-a1b7-08ab-294f-1cb318d996fe@intel.com> (raw)
In-Reply-To: <4bf1a54c-4622-0472-7a43-a6d6ff049322@codeaurora.org>

On 8/27/2018 4:18 PM, Sinan Kaya wrote:
> On 8/27/2018 3:52 PM, Dennis Dalessandro wrote:
>>>
>>> can you please confirm?
>>
>> Ah yes, silly me. pci_bus_reset() returns 0 and it does go on but 
>> doesn't make it to the trylock, it gets hung calling 
>> pci_bus_save_and_disable().
>>
> 
> OK. That makes sense now. pci_bus_save_and_disable() is also trying to
> obtain a device lock via pci_dev_lock().
> 
> Since you are calling this from probe time, you are getting dead lock
> because device is locked.
> 
> Is it possible to defer this secondary bus reset operation to post probe?

I don't think so. We need to do a gen3 bump at probe. I don't know that 
there is any other hardware that does is so probably why it hasn't been 
noticed.

> Possible solutions are:
> 1. introduce a locked reset API > 2. skip lock during probe
> 3. bring back raw reset API even though it is undesirable.

I think the first option is the cleanest. I can put together a patch and 
post it soon.

> Other opinions?
> 
> BTW, please file a bugzilla and capture your email details there so that we
> can have record of what we are doing?

I can certainly do that.

Thanks for your help on this!

-Denny

  reply	other threads:[~2018-08-28  0:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3d3d78fb-f1f2-ec4f-38f9-0b0d14564f53@intel.com>
     [not found] ` <323b3bbe-d255-8a5d-2a9c-d64e1f86cb64@codeaurora.org>
     [not found]   ` <bd7dbd5a-eebc-9142-f9a2-3b5ff8de9b8b@intel.com>
     [not found]     ` <d437400c-7eed-19d3-9cf2-b8a42217136b@codeaurora.org>
     [not found]       ` <2f0fb394-f1c9-d782-ffec-dac04b1ac0a9@intel.com>
2018-08-27 19:08         ` bug in pci_try_reset_bus Sinan Kaya
2018-08-27 19:52           ` Dennis Dalessandro
2018-08-27 20:18             ` Sinan Kaya
2018-08-27 20:48               ` Dennis Dalessandro [this message]
2018-08-28 13:25                 ` 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=980dc79b-a1b7-08ab-294f-1cb318d996fe@intel.com \
    --to=dennis.dalessandro@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=okaya@codeaurora.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).