linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Oliver Neukum <oneukum@suse.de>
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
	Takashi Iwai <tiwai@suse.de>,
	trenn@suse.de, linux-pci@vger.kernel.org,
	Michal Marek <MMarek@suse.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [RFC v2] USB: Fix handoff when BIOS disables host PCI device.
Date: Thu, 16 Feb 2012 06:33:21 -0800	[thread overview]
Message-ID: <20120216143321.GA9127@xanatos> (raw)
In-Reply-To: <201202161115.48524.oneukum@suse.de>

On Thu, Feb 16, 2012 at 11:15:48AM +0100, Oliver Neukum wrote:
> Am Mittwoch, 15. Februar 2012, 17:38:07 schrieb Sarah Sharp:
> > On Wed, Feb 15, 2012 at 09:48:07AM +0100, Oliver Neukum wrote:
> > > Am Dienstag, 14. Februar 2012, 21:33:11 schrieb Sarah Sharp:
> > > > Hi Oliver,
> > > > 
> > > > Have you gotten a chance to test this patch on your test system?  I'd
> > > > like to get it out, but I want to make sure it fixes your problem.
> > > 
> > > Did I forget to answer? Anyway, yes it works. However it seems a bad idea
> > > to me to unconditionally disable the device, on second thought.
> > 
> > Why?  The USB core will re-enable the device during the PCI probe, so I
> 
> Provided the device is probed. Typically of course it wii be, but
> we cannot assume that the xhci driver will always be loaded.

Sure.  That's why I want to balance the enable/disable calls in the PCI
quirks handler.  If we don't disable the PCI device, and the driver
never gets loaded, then the PCI device will remain enabled.  I'm not
sure if that's a terrible thing, but it does mean the ref count never
goes to zero.

Jesse?

> > don't see the harm in it.  What else might be accessing the PCI device?
> > Obviously the PCI core didn't care if the device was enabled or not
> > pre-probe, or it would have enabled the PCI device itself.
> 
> The BIOS might touch it. Are you really willing to say that there won't
> be BIOSes that assume that what they enabled must stay enabled?

Once the xHCI PCI quirk handler runs, we've taken the host controller
away from the BIOS with the BIOS/OS semaphore handshake.  (If the BIOS
is smart enough to actually handle that.)  Any BIOS that touches the
xHCI host controller after that point is just broken.  There is only so
much we can do about the BIOS breakage. :)

Sarah Sharp

  reply	other threads:[~2012-02-16 14:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 11:22 [PATCH] USB:xhci: fix port switching on PantherPoint Oliver Neukum
2012-02-03 15:16 ` Alan Stern
2012-02-03 16:21   ` Oliver Neukum
2012-02-03 15:27 ` Sarah Sharp
2012-02-07 23:31   ` [RFC] xhci: Fix BIOS handoff failure on some Intel systems Sarah Sharp
2012-02-08 15:11     ` Oliver Neukum
2012-02-08 21:48       ` Sarah Sharp
2012-02-09  8:56         ` Oliver Neukum
2012-02-09 15:08           ` Sarah Sharp
2012-02-09 20:13             ` [RFC v2] USB: Fix handoff when BIOS disables host PCI device Sarah Sharp
2012-02-14 20:33               ` Sarah Sharp
2012-02-15  8:48                 ` Oliver Neukum
2012-02-15 16:38                   ` Sarah Sharp
2012-02-16 10:15                     ` Oliver Neukum
2012-02-16 14:33                       ` Sarah Sharp [this message]
2012-02-16 14:48                         ` Oliver Neukum
2012-02-16 16:54                           ` Sarah Sharp
2012-02-16 17:50                             ` Oliver Neukum

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=20120216143321.GA9127@xanatos \
    --to=sarah.a.sharp@linux.intel.com \
    --cc=MMarek@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.de \
    --cc=stern@rowland.harvard.edu \
    --cc=tiwai@suse.de \
    --cc=trenn@suse.de \
    /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).