[SCSI] mpt2sas: Delete volume before HBA detach.
commitd7384b28afb2bf2b7be835ddc8c852bdc5e0ce1c
authorKashyap, Desai <kashyap.desai@lsi.com>
Wed, 16 Dec 2009 13:20:06 +0000 (16 18:50 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 9 Feb 2010 00:19:37 +0000 (8 18:19 -0600)
treebebd03f6a93e3a7b1d720a5913f8b1adc62ce702
parent0f88009d5cfae890bd3466126d1622ad4f16b798
[SCSI] mpt2sas: Delete volume before HBA detach.

The driver hangs when doing `rmmod mpt2sas` if there are any
IR volumes present.The hang is due the scsi midlayer trying to access the
IR volumes after the driver releases controller resources.  Perhaps when
scsi_remove_host is called,the scsi mid layer is sending some request.
This doesn't occur for bare drives becuase the driver is already reporting
those drives deleted prior to calling mpt2sas_base_detach.
To solve this issue, we need to delete the volumes as well.

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>
drivers/scsi/mpt2sas/mpt2sas_scsih.c