OHCI: fix regression caused by nVidia shutdown workaround
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 16 May 2011 16:15:19 +0000 (12:15 -0400)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:21:07 +0000 (12:21 -0500)
commit0412ced96ae305b5904df1376d772834eb418cc8
tree552a313f4ddc1d36a6a1253e61850d1a5bb47822
parentbeaa89dd06225e2cab62d372d86f03bb4ed9b35a
OHCI: fix regression caused by nVidia shutdown workaround

BugLink: http://bugs.launchpad.net/bugs/793702

commit 2b7aaf503d56216b847c8265421d2a7d9b42df3e upstream.

This patch (as1463) fixes a regression caused by commit
3df7169e73fc1d71a39cffeacc969f6840cdf52b (OHCI: work around for nVidia
shutdown problem).

The original problem encountered by people using NVIDIA chipsets was
that USB devices were not turning off when the system shut down.  For
example, the LED on an optical mouse would remain on, draining a
laptop's battery.  The problem was caused by a bug in the chipset; an
OHCI controller in the Reset state would continue to drive a bus reset
signal even after system shutdown.  The workaround was to put the
controllers into the Suspend state instead.

It turns out that later NVIDIA chipsets do not suffer from this bug.
Instead some have the opposite bug: If a system is shut down while an
OHCI controller is in the Suspend state, USB devices remain powered!
On other systems, shutting down with a Suspended controller causes the
system to reboot immediately.  Thus, working around the original bug
on some machines exposes other bugs on other machines.

The best solution seems to be to limit the workaround to OHCI
controllers with a low-numbered PCI product ID.  I don't know exactly
at what point NVIDIA changed their chipsets; the value used here is a
guess.  So far it was worked out okay for all the people who have
tested it.

This fixes Bugzilla #35032.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Andre "Osku" Schmidt <andre.osku.schmidt@googlemail.com>
Tested-by: Yury Siamashka <yurand2@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/usb/host/ohci-pci.c