diff options
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 32 |
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, | |||
2244 | int | 2244 | int |
2245 | mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id) | 2245 | mptscsih_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); | |||
2265 | u8 | 2281 | u8 |
2266 | mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id) | 2282 | mptscsih_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 | } |