Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e37ee4bec6c6d6d67aebafeecbbb32aa33d502bc
Commit:     e37ee4bec6c6d6d67aebafeecbbb32aa33d502bc
Parent:     e8f32de52c0d74d397d21afc655a4e2a7dfe1f98
Author:     Mark Haverkamp <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 26 09:23:32 2007 -0800
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Sat Jan 27 09:28:14 2007 -0600

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/aacraid/aachba.c |    4 ++--
 drivers/scsi/aacraid/linit.c  |   12 ++++++++----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 9714255..ddb33b0 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -170,9 +170,9 @@ int acbsize = -1;
 module_param(acbsize, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(acbsize, "Request a specific adapter control block (FIB) 
size. Valid values are 512, 2048, 4096 and 8192. Default is to use suggestion 
from Firmware.");
 
-int expose_physicals = 0;
+int expose_physicals = -1;
 module_param(expose_physicals, int, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(expose_physicals, "Expose physical components of the arrays. 
0=off, 1=on");
+MODULE_PARM_DESC(expose_physicals, "Expose physical components of the arrays. 
-1=protect 0=off, 1=on");
 /**
  *     aac_get_config_status   -       check the adapter configuration
  *     @common: adapter to query
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 1326c0a..1feda44 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)
                sdev->skip_ms_page_3f = 1;
        }
        if ((sdev->type == TYPE_DISK) &&
-                       !expose_physicals &&
                        (sdev_channel(sdev) != CONTAINER_CHANNEL)) {
-               struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
-               if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))
-                       sdev->no_uld_attach = 1;
+               if (expose_physicals == 0)
+                       return -ENXIO;
+               if (expose_physicals < 0) {
+                       struct aac_dev *aac =
+                               (struct aac_dev *)sdev->host->hostdata;
+                       if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))
+                               sdev->no_uld_attach = 1;
+               }
        }
        if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
                        (sdev_channel(sdev) == CONTAINER_CHANNEL)) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to