]> Pileus Git - ~andy/linux/commit
firewire: ohci: Check LPS before register access on pci removal
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 27 Mar 2013 10:59:59 +0000 (06:59 -0400)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 28 Apr 2013 21:36:44 +0000 (23:36 +0200)
commit8db491490b88c8b016b41ad56ac980c4cbb06d7a
treeb8f50183704e6e232fcf076f1ca543338a094b1e
parent247fd50b5953d2b07832a07bd1d1c3b8e221fe9e
firewire: ohci: Check LPS before register access on pci removal

A pci device can be removed while in its suspended state. If the ohci
host controller is suspended, the PHY is also in low-power mode and
LPS is disabled. If LPS is disabled, most of the host registers aren't
accessible, including IntMaskClear. Furthermore, access to these registers
when LPS is disabled can cause hard lockups on some hardware. Since
interrupts are already disabled in this mode, further action is
unnecessary.

Test LPS before attempting to write IntMaskClear to disable interrupts.

[Stefan R: whitespace changes]

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/ohci.c