aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2010-06-17 04:18:10 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:02:21 -0400
commitd417d1c3a3c3b4d89a285f82a4e7710372e40a24 (patch)
tree73529cc96a70beb5d82a0f0d1a0a2bcd2b407fb6 /drivers
parent3e2e833a547cbd0cb3fbe85a5f6ee71a93931fde (diff)
[SCSI] mpt2sas: Add additional check for responding volumes after Host Reset
ISSUE DESCRIPTION: This test case involves creating two RAID1 volumes, then simultaneiously issue host reset and pull all the drives associated to the 1st raid volume. The observed behavour is the physical drives are removed, however the volume remains. The expected behavour is the volume as well as physical drives should be removed from OS. FIX: Add support in the post host reset device scan logic for raid volumes where the driver will have an additional check for responding raid volume where the status should be either online, optimal, or degraded. So for voluemes that have a status of missing or failed, the driver will mark them for deletion. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index b327d60fad1b..228961b94a68 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -5952,6 +5952,7 @@ static void
5952_scsih_search_responding_raid_devices(struct MPT2SAS_ADAPTER *ioc) 5952_scsih_search_responding_raid_devices(struct MPT2SAS_ADAPTER *ioc)
5953{ 5953{
5954 Mpi2RaidVolPage1_t volume_pg1; 5954 Mpi2RaidVolPage1_t volume_pg1;
5955 Mpi2RaidVolPage0_t volume_pg0;
5955 Mpi2RaidPhysDiskPage0_t pd_pg0; 5956 Mpi2RaidPhysDiskPage0_t pd_pg0;
5956 Mpi2ConfigReply_t mpi_reply; 5957 Mpi2ConfigReply_t mpi_reply;
5957 u16 ioc_status; 5958 u16 ioc_status;
@@ -5971,8 +5972,17 @@ _scsih_search_responding_raid_devices(struct MPT2SAS_ADAPTER *ioc)
5971 if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) 5972 if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE)
5972 break; 5973 break;
5973 handle = le16_to_cpu(volume_pg1.DevHandle); 5974 handle = le16_to_cpu(volume_pg1.DevHandle);
5974 _scsih_mark_responding_raid_device(ioc, 5975
5975 le64_to_cpu(volume_pg1.WWID), handle); 5976 if (mpt2sas_config_get_raid_volume_pg0(ioc, &mpi_reply,
5977 &volume_pg0, MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle,
5978 sizeof(Mpi2RaidVolPage0_t)))
5979 continue;
5980
5981 if (volume_pg0.VolumeState == MPI2_RAID_VOL_STATE_OPTIMAL ||
5982 volume_pg0.VolumeState == MPI2_RAID_VOL_STATE_ONLINE ||
5983 volume_pg0.VolumeState == MPI2_RAID_VOL_STATE_DEGRADED)
5984 _scsih_mark_responding_raid_device(ioc,
5985 le64_to_cpu(volume_pg1.WWID), handle);
5976 } 5986 }
5977 5987
5978 /* refresh the pd_handles */ 5988 /* refresh the pd_handles */