ata_piix: fix locking around SIDPR access
commitda2756b5e1129785dc107a90fcb729728c427c50
authorTejun Heo <tj@kernel.org>
Tue, 20 Jul 2010 14:20:01 +0000 (20 16:20 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:30:37 +0000 (13 13:30 -0700)
treecd3d73b5e59cbfce43afa34d55082630ac19eacb
parent94f6da84e80c01e655df88479d7b57a6d89965f2
ata_piix: fix locking around SIDPR access

commit 213373cf974fe69e78ec894b07f45ae2f5a3a078 upstream.

SIDPR window registers are shared across ports and as each access is
done in two steps, accesses to different ports under EH may race.
This primarily is caused by incorrect host locking in EH context and
should be fixed by defining locking requirements for each EH operation
which can be used during EH and enforcing them but for now work around
the problem by adding a dedicated SIDPR lock and grabbing it for each
SIDPR access.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mark Knecht <markknecht@gmail.com>
Reported-by: Paul Check <paul@thechecks.ca>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/ata_piix.c