Commit 7fe06326 authored by Andrew Patterson's avatar Andrew Patterson Committed by Jens Axboe

cciss: add cciss driver sysfs entries

Add sysfs entries to the cciss driver needed for the dm/multipath tools.

A file for vendor, model, rev, and unique_id is added for each logical
drive under directory /sys/bus/pci/devices/<dev>/ccissX/cXdY.  Where X =
the controller (or host) number and Y is the logical drive number.

A link from /sys/bus/pci/devices/<dev>/ccissX/cXdY/block:cciss!cXdY to
/sys/block/cciss!cXdY/device is also created.  A bus is created in
/sys/bus/cciss.  A link is created from the pci ccissX entry to
/sys/bus/cciss/devices/ccissX.  Please consider this for inclusion.
Signed-off-by: default avatarMike Miller <mike.miller@hp.com>
Cc: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 88f627ae
Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/model
Date: March 2009
Kernel Version: 2.6.30
Contact: iss_storagedev@hp.com
Description: Displays the SCSI INQUIRY page 0 model for logical drive
Y of controller X.
Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/rev
Date: March 2009
Kernel Version: 2.6.30
Contact: iss_storagedev@hp.com
Description: Displays the SCSI INQUIRY page 0 revision for logical
drive Y of controller X.
Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/unique_id
Date: March 2009
Kernel Version: 2.6.30
Contact: iss_storagedev@hp.com
Description: Displays the SCSI INQUIRY page 83 serial number for logical
drive Y of controller X.
Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/vendor
Date: March 2009
Kernel Version: 2.6.30
Contact: iss_storagedev@hp.com
Description: Displays the SCSI INQUIRY page 0 vendor for logical drive
Y of controller X.
Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/block:cciss!cXdY
Date: March 2009
Kernel Version: 2.6.30
Contact: iss_storagedev@hp.com
Description: A symbolic link to /sys/block/cciss!cXdY
This diff is collapsed.
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
#define IO_OK 0 #define IO_OK 0
#define IO_ERROR 1 #define IO_ERROR 1
#define VENDOR_LEN 8
#define MODEL_LEN 16
#define REV_LEN 4
struct ctlr_info; struct ctlr_info;
typedef struct ctlr_info ctlr_info_t; typedef struct ctlr_info ctlr_info_t;
...@@ -34,13 +38,18 @@ typedef struct _drive_info_struct ...@@ -34,13 +38,18 @@ typedef struct _drive_info_struct
int cylinders; int cylinders;
int raid_level; /* set to -1 to indicate that int raid_level; /* set to -1 to indicate that
* the drive is not in use/configured * the drive is not in use/configured
*/ */
int busy_configuring; /*This is set when the drive is being removed int busy_configuring; /* This is set when a drive is being removed
*to prevent it from being opened or it's queue * to prevent it from being opened or it's
*from being started. * queue from being started.
*/ */
__u8 serial_no[16]; /* from inquiry page 0x83, */ struct device dev;
/* not necc. null terminated. */ __u8 serial_no[16]; /* from inquiry page 0x83,
* not necc. null terminated.
*/
char vendor[VENDOR_LEN + 1]; /* SCSI vendor string */
char model[MODEL_LEN + 1]; /* SCSI model string */
char rev[REV_LEN + 1]; /* SCSI revision string */
} drive_info_struct; } drive_info_struct;
#ifdef CONFIG_CISS_SCSI_TAPE #ifdef CONFIG_CISS_SCSI_TAPE
...@@ -123,6 +132,7 @@ struct ctlr_info ...@@ -123,6 +132,7 @@ struct ctlr_info
unsigned char alive; unsigned char alive;
struct completion *rescan_wait; struct completion *rescan_wait;
struct task_struct *cciss_scan_thread; struct task_struct *cciss_scan_thread;
struct device dev;
}; };
/* Defining the diffent access_menthods */ /* Defining the diffent access_menthods */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment