Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Oliver Neukum <oliver@neukum.org>
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 08:54:24 -0800	[thread overview]
Message-ID: <20120216165424.GA4703@xanatos> (raw)
In-Reply-To: <201202161548.53556.oliver@neukum.org>

On Thu, Feb 16, 2012 at 03:48:53PM +0100, Oliver Neukum wrote:
> Am Donnerstag, 16. Februar 2012, 15:33:21 schrieb Sarah Sharp:
> > > 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. :)
> 
> What about S3 when the BIOS takes control?

If that was a problem, we would see BIOS issues during S3 with the
current code when a host controller driver wasn't loaded before
suspend.  In fact, I think several distros used to unload the USB
drivers when the user selected suspend from the menu.

When the driver is unloaded, usb_hcd_pci_remove() is called, which will
call pci_disable_device().  If the ref counts were balanced (and I
believe they are), then the PCI device would have been disabled before
S3 for distros that unloaded the USB drivers on suspend.  So the BIOS
would have seen a disabled PCI device for these distros, just like it
would with my patch if the driver never got loaded.

I don't think this is an issue.

Sarah Sharp

  reply	other threads:[~2012-02-16 16:54 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
2012-02-16 14:48                         ` Oliver Neukum
2012-02-16 16:54                           ` Sarah Sharp [this message]
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=20120216165424.GA4703@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=oliver@neukum.org \
    --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