diff options
author | Andrew Patterson <andrew.patterson@hp.com> | 2009-06-02 08:48:39 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-06-02 08:48:39 -0400 |
commit | 7fe063268e73681cdca1a6496a25f93d3332f517 (patch) | |
tree | 97c9b5f53012908343af83c481c0b8fad888690e /drivers/block/cciss.h | |
parent | 88f627ae394eadd75ada669904269f1a4a77b3bd (diff) |
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: Mike Miller <mike.miller@hp.com>
Cc: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/cciss.h')
-rw-r--r-- | drivers/block/cciss.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h index 703e08038fb9..dd1926d8cd97 100644 --- a/drivers/block/cciss.h +++ b/drivers/block/cciss.h | |||
@@ -12,6 +12,10 @@ | |||
12 | #define IO_OK 0 | 12 | #define IO_OK 0 |
13 | #define IO_ERROR 1 | 13 | #define IO_ERROR 1 |
14 | 14 | ||
15 | #define VENDOR_LEN 8 | ||
16 | #define MODEL_LEN 16 | ||
17 | #define REV_LEN 4 | ||
18 | |||
15 | struct ctlr_info; | 19 | struct ctlr_info; |
16 | typedef struct ctlr_info ctlr_info_t; | 20 | typedef struct ctlr_info ctlr_info_t; |
17 | 21 | ||
@@ -34,13 +38,18 @@ typedef struct _drive_info_struct | |||
34 | int cylinders; | 38 | int cylinders; |
35 | int raid_level; /* set to -1 to indicate that | 39 | int raid_level; /* set to -1 to indicate that |
36 | * the drive is not in use/configured | 40 | * the drive is not in use/configured |
37 | */ | 41 | */ |
38 | int busy_configuring; /*This is set when the drive is being removed | 42 | int busy_configuring; /* This is set when a drive is being removed |
39 | *to prevent it from being opened or it's queue | 43 | * to prevent it from being opened or it's |
40 | *from being started. | 44 | * queue from being started. |
41 | */ | 45 | */ |
42 | __u8 serial_no[16]; /* from inquiry page 0x83, */ | 46 | struct device dev; |
43 | /* not necc. null terminated. */ | 47 | __u8 serial_no[16]; /* from inquiry page 0x83, |
48 | * not necc. null terminated. | ||
49 | */ | ||
50 | char vendor[VENDOR_LEN + 1]; /* SCSI vendor string */ | ||
51 | char model[MODEL_LEN + 1]; /* SCSI model string */ | ||
52 | char rev[REV_LEN + 1]; /* SCSI revision string */ | ||
44 | } drive_info_struct; | 53 | } drive_info_struct; |
45 | 54 | ||
46 | #ifdef CONFIG_CISS_SCSI_TAPE | 55 | #ifdef CONFIG_CISS_SCSI_TAPE |
@@ -123,6 +132,7 @@ struct ctlr_info | |||
123 | unsigned char alive; | 132 | unsigned char alive; |
124 | struct completion *rescan_wait; | 133 | struct completion *rescan_wait; |
125 | struct task_struct *cciss_scan_thread; | 134 | struct task_struct *cciss_scan_thread; |
135 | struct device dev; | ||
126 | }; | 136 | }; |
127 | 137 | ||
128 | /* Defining the diffent access_menthods */ | 138 | /* Defining the diffent access_menthods */ |