Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2ca39c48ea0d2fd265479d0b62f2ac8878900360
Commit:     2ca39c48ea0d2fd265479d0b62f2ac8878900360
Parent:     0c27f5bd00aba65a2a3313859ebce1c77c90000e
Author:     Salyzyn, Mark <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 17 09:24:56 2008 -0800
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Wed Jan 23 11:29:34 2008 -0600

    [SCSI] aacraid: add new driver features flags
    
    Feature enhancement, adding a 'flags' entry that will reside in the
    host controller's tree, with a newline separated list of arbitrary
    ascii named features that indicate whether the combination of driver
    and controller has support for said feature. Breaking from the
    one-line output typical of sysfs entries, newline was added to tailor
    for grep, or simple gets line by line string match within an
    application. I added one for a compiler time check for existence of
    debug print output, one for an optional manifest defined enhanced
    status reporting in the logs, and one for runtime reporting whether
    the controller and driver supports arrays larger than 2TB. Adaptec's
    storage management software uses the last flag to determine whether to
    make available the creation of arrays larger than 2TB, otherwise a
    warning is posted.
    
    Signed-off-by: Mark Salyzyn <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/aacraid/linit.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 6650f6f..5ab733d 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -790,6 +790,23 @@ static ssize_t aac_show_vendor(struct class_device 
*class_dev,
        return len;
 }
 
+static ssize_t aac_show_flags(struct class_device *class_dev, char *buf)
+{
+       int len = 0;
+       struct aac_dev *dev = (struct 
aac_dev*)class_to_shost(class_dev)->hostdata;
+
+       if (nblank(dprintk(x)))
+               len = snprintf(buf, PAGE_SIZE, "dprintk\n");
+#ifdef AAC_DETAILED_STATUS_INFO
+       len += snprintf(buf + len, PAGE_SIZE - len,
+                       "AAC_DETAILED_STATUS_INFO\n");
+#endif
+       if (dev->raw_io_interface && dev->raw_io_64)
+               len += snprintf(buf + len, PAGE_SIZE - len,
+                               "SAI_READ_CAPACITY_16\n");
+       return len;
+}
+
 static ssize_t aac_show_kernel_version(struct class_device *class_dev,
                char *buf)
 {
@@ -899,6 +916,13 @@ static struct class_device_attribute aac_vendor = {
        },
        .show = aac_show_vendor,
 };
+static struct class_device_attribute aac_flags = {
+       .attr = {
+               .name = "flags",
+               .mode = S_IRUGO,
+       },
+       .show = aac_show_flags,
+};
 static struct class_device_attribute aac_kernel_version = {
        .attr = {
                .name = "hba_kernel_version",
@@ -953,6 +977,7 @@ static struct class_device_attribute aac_reset = {
 static struct class_device_attribute *aac_attrs[] = {
        &aac_model,
        &aac_vendor,
+       &aac_flags,
        &aac_kernel_version,
        &aac_monitor_version,
        &aac_bios_version,
-
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