[SCSI] mpt2sas: Fix for dead lock occurring between host_lock and sas_device_lock
authornagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>
Wed, 19 Oct 2011 10:07:14 +0000 (15:37 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 30 Oct 2011 08:53:45 +0000 (12:53 +0400)
commitf3db032f1af6dd3280037ea526fee7cddcc36c41
tree3e81bec7fcc23e0f4bb8b795f3f003d0b5f530aa
parentf881ceadd4d6afafb227bcf8165c1b63ba90065b
[SCSI] mpt2sas: Fix for dead lock occurring between host_lock and sas_device_lock

Fix for dead lock occurring between host_lock and sas_device_lock.

The deadlock is between two spin locks, between the shost->host_lock
and driver ioc->sas_device_lock.

The fix is to rearrange the code in the  FW/Driver device removal
handshake so the ioc->sas_device_lock is not occurring when the
shost->host_lock is taken.

[jejb: zero initialise sas_address to fix spurious compiler warning]
Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/mpt2sas/mpt2sas_scsih.c