diff options
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index c99a918feb58..3729062db317 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -1235,7 +1235,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
1235 | return SCSI_MLQUEUE_HOST_BUSY; | 1235 | return SCSI_MLQUEUE_HOST_BUSY; |
1236 | } | 1236 | } |
1237 | 1237 | ||
1238 | if (vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT && | 1238 | if ((hd->ioc->bus_type == SPI) && |
1239 | vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT && | ||
1239 | mptscsih_raid_id_to_num(hd, SCpnt->device->id) < 0) { | 1240 | mptscsih_raid_id_to_num(hd, SCpnt->device->id) < 0) { |
1240 | SCpnt->result = DID_NO_CONNECT << 16; | 1241 | SCpnt->result = DID_NO_CONNECT << 16; |
1241 | done(SCpnt); | 1242 | done(SCpnt); |
@@ -2103,6 +2104,24 @@ mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev, | |||
2103 | return 0; | 2104 | return 0; |
2104 | } | 2105 | } |
2105 | 2106 | ||
2107 | /* Search IOC page 3 to determine if this is hidden physical disk | ||
2108 | * | ||
2109 | */ | ||
2110 | int | ||
2111 | mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id) | ||
2112 | { | ||
2113 | int i; | ||
2114 | |||
2115 | if (!ioc->raid_data.isRaid || !ioc->raid_data.pIocPg3) | ||
2116 | return 0; | ||
2117 | for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { | ||
2118 | if (id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) | ||
2119 | return 1; | ||
2120 | } | ||
2121 | return 0; | ||
2122 | } | ||
2123 | EXPORT_SYMBOL(mptscsih_is_phys_disk); | ||
2124 | |||
2106 | int | 2125 | int |
2107 | mptscsih_raid_id_to_num(MPT_SCSI_HOST *hd, uint physdiskid) | 2126 | mptscsih_raid_id_to_num(MPT_SCSI_HOST *hd, uint physdiskid) |
2108 | { | 2127 | { |