diff options
author | Moore, Eric <Eric.Moore@lsil.com> | 2006-03-14 09:14:21 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-14 14:35:01 -0600 |
commit | f44e5461d919a344d44f7ca4f06cf8d169da8454 (patch) | |
tree | 9d2d140b44954b41e3b439f098f40643216d529f /drivers/message/fusion/mptscsih.c | |
parent | db9c9174e42bdc8d52bc18df7c55823cf4546eda (diff) | |
download | lwn-f44e5461d919a344d44f7ca4f06cf8d169da8454.tar.gz lwn-f44e5461d919a344d44f7ca4f06cf8d169da8454.zip |
[SCSI] fusion - exposing raid components in mptsas
Suppport for exposing hidden raid components
for sg interface. The sdev->no_uld_attach flag
will set set accordingly.
The sas module supports adding/removing raid
volumes using online storage management application
interface.
This patch rely's on patch's provided to me
by Christoph Hellwig, that exports device_reprobe.
I will post those patch's on behalf of Christoph.
Signed-off-by: Eric Moore <Eric.Moore@lsil.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.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 *)) return SCSI_MLQUEUE_HOST_BUSY; } - if (vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT && + if ((hd->ioc->bus_type == SPI) && + vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT && mptscsih_raid_id_to_num(hd, SCpnt->device->id) < 0) { SCpnt->result = DID_NO_CONNECT << 16; done(SCpnt); @@ -2103,6 +2104,24 @@ mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev, return 0; } +/* Search IOC page 3 to determine if this is hidden physical disk + * + */ +int +mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id) +{ + int i; + + if (!ioc->raid_data.isRaid || !ioc->raid_data.pIocPg3) + return 0; + for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) { + if (id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) + return 1; + } + return 0; +} +EXPORT_SYMBOL(mptscsih_is_phys_disk); + int mptscsih_raid_id_to_num(MPT_SCSI_HOST *hd, uint physdiskid) { |