mpt2sas: Prevent sending command to FW while Host Reset
commitfa278da6aa524b25fddee76c7eaca0b1eff2a56d
authorKashyap, Desai <kashyap.desai@lsi.com>
Thu, 20 Aug 2009 07:52:00 +0000 (20 13:22 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Sep 2009 15:43:48 +0000 (24 08:43 -0700)
treee6bfc539f87e59cd1302d88c4b4064aec5daf77e
parent38032be19da873f705202370f63772e0f5b610b5
mpt2sas: Prevent sending command to FW while Host Reset

commit 155dd4c763694222c125e65438d823f58ea653bc upstream.

This patch renames the flag for indicating host reset from
ioc_reset_in_progress to shost_recovery. It also removes the spin locks
surrounding the setting of this flag, which are unnecessary.   Sanity checks on
the shost_recovery flag were added thru out the code so as to prevent sending
firmware commands during host reset.  Also, the setting of the shost state to
SHOST_RECOVERY was removed to prevent deadlocks, this is actually better
handled by the shost_recovery flag.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/mpt2sas/mpt2sas_base.c
drivers/scsi/mpt2sas/mpt2sas_base.h
drivers/scsi/mpt2sas/mpt2sas_ctl.c
drivers/scsi/mpt2sas/mpt2sas_scsih.c
drivers/scsi/mpt2sas/mpt2sas_transport.c