diff options
author | Mark Haverkamp <markh@linux-foundation.org> | 2007-01-26 12:23:32 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-27 10:28:14 -0500 |
commit | e37ee4bec6c6d6d67aebafeecbbb32aa33d502bc (patch) | |
tree | 8461b82913f7c11f68b0d4f112eae3105f0154ea /drivers/scsi/aacraid/linit.c | |
parent | e8f32de52c0d74d397d21afc655a4e2a7dfe1f98 (diff) |
[SCSI] aacraid: expanded expose physical device code (new)
Received from Mark Salyzyn,
Take the expose_physicals flag and allow the user to select default (physicals
available via /dev/sg), exposed (physicals available via /dev/sd for
experimental reasons) and hidden (physicals blocked from all access). This
expands the functionality of the previous expose_physicals insmod parameter
which was added to support some experimental configurations.
Signed-off-by Mark Haverkamp <markh@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 1326c0a1bdae..1feda449aedc 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -398,11 +398,15 @@ static int aac_slave_configure(struct scsi_device *sdev) | |||
398 | sdev->skip_ms_page_3f = 1; | 398 | sdev->skip_ms_page_3f = 1; |
399 | } | 399 | } |
400 | if ((sdev->type == TYPE_DISK) && | 400 | if ((sdev->type == TYPE_DISK) && |
401 | !expose_physicals && | ||
402 | (sdev_channel(sdev) != CONTAINER_CHANNEL)) { | 401 | (sdev_channel(sdev) != CONTAINER_CHANNEL)) { |
403 | struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; | 402 | if (expose_physicals == 0) |
404 | if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2)) | 403 | return -ENXIO; |
405 | sdev->no_uld_attach = 1; | 404 | if (expose_physicals < 0) { |
405 | struct aac_dev *aac = | ||
406 | (struct aac_dev *)sdev->host->hostdata; | ||
407 | if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2)) | ||
408 | sdev->no_uld_attach = 1; | ||
409 | } | ||
406 | } | 410 | } |
407 | if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && | 411 | if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && |
408 | (sdev_channel(sdev) == CONTAINER_CHANNEL)) { | 412 | (sdev_channel(sdev) == CONTAINER_CHANNEL)) { |