aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2007-01-29 11:45:37 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-02-02 22:01:28 -0500
commitb506ade9f3c309ac2ce3ffc4039f731097506038 (patch)
tree26ffb22dd5859977e92ca57f01033da69a6265f5 /drivers/message/fusion/mptscsih.c
parentc6c727a1a0ff90c80425b7226557b2354e00cf7b (diff)
[SCSI] fusion - inactive raid support, and raid event bug fix's
inactive raid support, e.g. exposing hidden raid components belonging to a volume that are inactive. Also misc bug fix's for various raid asyn events. Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 507aa08611d5..f9e11c8db462 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2244,6 +2244,7 @@ mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev,
2244int 2244int
2245mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id) 2245mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id)
2246{ 2246{
2247 struct inactive_raid_component_info *component_info;
2247 int i; 2248 int i;
2248 int rc = 0; 2249 int rc = 0;
2249 2250
@@ -2257,6 +2258,21 @@ mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id)
2257 } 2258 }
2258 } 2259 }
2259 2260
2261 /*
2262 * Check inactive list for matching phys disks
2263 */
2264 if (list_empty(&ioc->raid_data.inactive_list))
2265 goto out;
2266
2267 down(&ioc->raid_data.inactive_list_mutex);
2268 list_for_each_entry(component_info, &ioc->raid_data.inactive_list,
2269 list) {
2270 if ((component_info->d.PhysDiskID == id) &&
2271 (component_info->d.PhysDiskBus == channel))
2272 rc = 1;
2273 }
2274 up(&ioc->raid_data.inactive_list_mutex);
2275
2260 out: 2276 out:
2261 return rc; 2277 return rc;
2262} 2278}
@@ -2265,6 +2281,7 @@ EXPORT_SYMBOL(mptscsih_is_phys_disk);
2265u8 2281u8
2266mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id) 2282mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
2267{ 2283{
2284 struct inactive_raid_component_info *component_info;
2268 int i; 2285 int i;
2269 int rc = -ENXIO; 2286 int rc = -ENXIO;
2270 2287
@@ -2278,6 +2295,21 @@ mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
2278 } 2295 }
2279 } 2296 }
2280 2297
2298 /*
2299 * Check inactive list for matching phys disks
2300 */
2301 if (list_empty(&ioc->raid_data.inactive_list))
2302 goto out;
2303
2304 down(&ioc->raid_data.inactive_list_mutex);
2305 list_for_each_entry(component_info, &ioc->raid_data.inactive_list,
2306 list) {
2307 if ((component_info->d.PhysDiskID == id) &&
2308 (component_info->d.PhysDiskBus == channel))
2309 rc = component_info->d.PhysDiskNum;
2310 }
2311 up(&ioc->raid_data.inactive_list_mutex);
2312
2281 out: 2313 out:
2282 return rc; 2314 return rc;
2283} 2315}