]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sata_promise: fix hardreset lockdep error
authorMikael Pettersson <mikpe@it.uu.se>
Sun, 16 Sep 2012 18:53:43 +0000 (20:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:50:44 +0000 (08:50 -0800)
commit4b693aca7e346fcff0ea5c1548e7b5545bfbfd04
tree968b342de802749fed2d0031ff8f1b4eb6670799
parent370caef9e8e2800a759d9c29e2c4d41375bdad62
sata_promise: fix hardreset lockdep error

commit 3100d49d3cd236443faae9d81137c81b22d36003 upstream.

sata_promise's pdc_hard_reset_port() needs to serialize because it
flips a port-specific bit in controller register that's shared by
all ports. The code takes the ata host lock for this, but that's
broken because an interrupt may arrive on our irq during the hard
reset sequence, and that too will take the ata host lock. With
lockdep enabled a big nasty warning is seen.

Fixed by adding private state to the ata host structure, containing
a second lock used only for serializing the hard reset sequences.
This eliminated the lockdep warnings both on my test rig and on
the original reporter's machine.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Adko Branil <adkobranil@yahoo.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ata/sata_promise.c