aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/cciss.c37
-rw-r--r--drivers/block/cciss.h9
-rw-r--r--drivers/block/cciss_cmd.h61
-rw-r--r--drivers/block/cciss_scsi.h18
-rw-r--r--include/linux/cciss_ioctl.h33
5 files changed, 78 insertions, 80 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 873e594860d3..8df23c732c46 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1341,26 +1341,27 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
1341 kfree(buff); 1341 kfree(buff);
1342 return -ENOMEM; 1342 return -ENOMEM;
1343 } 1343 }
1344 // Fill in the command type 1344 /* Fill in the command type */
1345 c->cmd_type = CMD_IOCTL_PEND; 1345 c->cmd_type = CMD_IOCTL_PEND;
1346 // Fill in Command Header 1346 /* Fill in Command Header */
1347 c->Header.ReplyQueue = 0; // unused in simple mode 1347 c->Header.ReplyQueue = 0; /* unused in simple mode */
1348 if (iocommand.buf_size > 0) // buffer to fill 1348 if (iocommand.buf_size > 0) /* buffer to fill */
1349 { 1349 {
1350 c->Header.SGList = 1; 1350 c->Header.SGList = 1;
1351 c->Header.SGTotal = 1; 1351 c->Header.SGTotal = 1;
1352 } else // no buffers to fill 1352 } else /* no buffers to fill */
1353 { 1353 {
1354 c->Header.SGList = 0; 1354 c->Header.SGList = 0;
1355 c->Header.SGTotal = 0; 1355 c->Header.SGTotal = 0;
1356 } 1356 }
1357 c->Header.LUN = iocommand.LUN_info; 1357 c->Header.LUN = iocommand.LUN_info;
1358 c->Header.Tag.lower = c->busaddr; // use the kernel address the cmd block for tag 1358 /* use the kernel address the cmd block for tag */
1359 c->Header.Tag.lower = c->busaddr;
1359 1360
1360 // Fill in Request block 1361 /* Fill in Request block */
1361 c->Request = iocommand.Request; 1362 c->Request = iocommand.Request;
1362 1363
1363 // Fill in the scatter gather information 1364 /* Fill in the scatter gather information */
1364 if (iocommand.buf_size > 0) { 1365 if (iocommand.buf_size > 0) {
1365 temp64.val = pci_map_single(host->pdev, buff, 1366 temp64.val = pci_map_single(host->pdev, buff,
1366 iocommand.buf_size, 1367 iocommand.buf_size,
@@ -1368,7 +1369,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
1368 c->SG[0].Addr.lower = temp64.val32.lower; 1369 c->SG[0].Addr.lower = temp64.val32.lower;
1369 c->SG[0].Addr.upper = temp64.val32.upper; 1370 c->SG[0].Addr.upper = temp64.val32.upper;
1370 c->SG[0].Len = iocommand.buf_size; 1371 c->SG[0].Len = iocommand.buf_size;
1371 c->SG[0].Ext = 0; // we are not chaining 1372 c->SG[0].Ext = 0; /* we are not chaining */
1372 } 1373 }
1373 c->waiting = &wait; 1374 c->waiting = &wait;
1374 1375
@@ -2422,7 +2423,7 @@ static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff,
2422 c->Request.Type.Direction = XFER_READ; 2423 c->Request.Type.Direction = XFER_READ;
2423 c->Request.Timeout = 0; 2424 c->Request.Timeout = 0;
2424 c->Request.CDB[0] = cmd; 2425 c->Request.CDB[0] = cmd;
2425 c->Request.CDB[6] = (size >> 24) & 0xFF; //MSB 2426 c->Request.CDB[6] = (size >> 24) & 0xFF; /* MSB */
2426 c->Request.CDB[7] = (size >> 16) & 0xFF; 2427 c->Request.CDB[7] = (size >> 16) & 0xFF;
2427 c->Request.CDB[8] = (size >> 8) & 0xFF; 2428 c->Request.CDB[8] = (size >> 8) & 0xFF;
2428 c->Request.CDB[9] = size & 0xFF; 2429 c->Request.CDB[9] = size & 0xFF;
@@ -2691,7 +2692,7 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
2691 "cciss: reading geometry failed, volume " 2692 "cciss: reading geometry failed, volume "
2692 "does not support reading geometry\n"); 2693 "does not support reading geometry\n");
2693 drv->heads = 255; 2694 drv->heads = 255;
2694 drv->sectors = 32; // Sectors per track 2695 drv->sectors = 32; /* Sectors per track */
2695 drv->cylinders = total_size + 1; 2696 drv->cylinders = total_size + 1;
2696 drv->raid_level = RAID_UNKNOWN; 2697 drv->raid_level = RAID_UNKNOWN;
2697 } else { 2698 } else {
@@ -3109,19 +3110,19 @@ static void do_cciss_request(struct request_queue *q)
3109 3110
3110 /* fill in the request */ 3111 /* fill in the request */
3111 drv = creq->rq_disk->private_data; 3112 drv = creq->rq_disk->private_data;
3112 c->Header.ReplyQueue = 0; // unused in simple mode 3113 c->Header.ReplyQueue = 0; /* unused in simple mode */
3113 /* got command from pool, so use the command block index instead */ 3114 /* got command from pool, so use the command block index instead */
3114 /* for direct lookups. */ 3115 /* for direct lookups. */
3115 /* The first 2 bits are reserved for controller error reporting. */ 3116 /* The first 2 bits are reserved for controller error reporting. */
3116 c->Header.Tag.lower = (c->cmdindex << 3); 3117 c->Header.Tag.lower = (c->cmdindex << 3);
3117 c->Header.Tag.lower |= 0x04; /* flag for direct lookup. */ 3118 c->Header.Tag.lower |= 0x04; /* flag for direct lookup. */
3118 memcpy(&c->Header.LUN, drv->LunID, sizeof(drv->LunID)); 3119 memcpy(&c->Header.LUN, drv->LunID, sizeof(drv->LunID));
3119 c->Request.CDBLen = 10; // 12 byte commands not in FW yet; 3120 c->Request.CDBLen = 10; /* 12 byte commands not in FW yet; */
3120 c->Request.Type.Type = TYPE_CMD; // It is a command. 3121 c->Request.Type.Type = TYPE_CMD; /* It is a command. */
3121 c->Request.Type.Attribute = ATTR_SIMPLE; 3122 c->Request.Type.Attribute = ATTR_SIMPLE;
3122 c->Request.Type.Direction = 3123 c->Request.Type.Direction =
3123 (rq_data_dir(creq) == READ) ? XFER_READ : XFER_WRITE; 3124 (rq_data_dir(creq) == READ) ? XFER_READ : XFER_WRITE;
3124 c->Request.Timeout = 0; // Don't time out 3125 c->Request.Timeout = 0; /* Don't time out */
3125 c->Request.CDB[0] = 3126 c->Request.CDB[0] =
3126 (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write; 3127 (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write;
3127 start_blk = blk_rq_pos(creq); 3128 start_blk = blk_rq_pos(creq);
@@ -3206,11 +3207,11 @@ static void do_cciss_request(struct request_queue *q)
3206 if (likely(blk_fs_request(creq))) { 3207 if (likely(blk_fs_request(creq))) {
3207 if(h->cciss_read == CCISS_READ_10) { 3208 if(h->cciss_read == CCISS_READ_10) {
3208 c->Request.CDB[1] = 0; 3209 c->Request.CDB[1] = 0;
3209 c->Request.CDB[2] = (start_blk >> 24) & 0xff; //MSB 3210 c->Request.CDB[2] = (start_blk >> 24) & 0xff; /* MSB */
3210 c->Request.CDB[3] = (start_blk >> 16) & 0xff; 3211 c->Request.CDB[3] = (start_blk >> 16) & 0xff;
3211 c->Request.CDB[4] = (start_blk >> 8) & 0xff; 3212 c->Request.CDB[4] = (start_blk >> 8) & 0xff;
3212 c->Request.CDB[5] = start_blk & 0xff; 3213 c->Request.CDB[5] = start_blk & 0xff;
3213 c->Request.CDB[6] = 0; // (sect >> 24) & 0xff; MSB 3214 c->Request.CDB[6] = 0; /* (sect >> 24) & 0xff; MSB */
3214 c->Request.CDB[7] = (blk_rq_sectors(creq) >> 8) & 0xff; 3215 c->Request.CDB[7] = (blk_rq_sectors(creq) >> 8) & 0xff;
3215 c->Request.CDB[8] = blk_rq_sectors(creq) & 0xff; 3216 c->Request.CDB[8] = blk_rq_sectors(creq) & 0xff;
3216 c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0; 3217 c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0;
@@ -3219,7 +3220,7 @@ static void do_cciss_request(struct request_queue *q)
3219 3220
3220 c->Request.CDBLen = 16; 3221 c->Request.CDBLen = 16;
3221 c->Request.CDB[1]= 0; 3222 c->Request.CDB[1]= 0;
3222 c->Request.CDB[2]= (upper32 >> 24) & 0xff; //MSB 3223 c->Request.CDB[2]= (upper32 >> 24) & 0xff; /* MSB */
3223 c->Request.CDB[3]= (upper32 >> 16) & 0xff; 3224 c->Request.CDB[3]= (upper32 >> 16) & 0xff;
3224 c->Request.CDB[4]= (upper32 >> 8) & 0xff; 3225 c->Request.CDB[4]= (upper32 >> 8) & 0xff;
3225 c->Request.CDB[5]= upper32 & 0xff; 3226 c->Request.CDB[5]= upper32 & 0xff;
diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h
index 1d95db254069..2b07bdacbd12 100644
--- a/drivers/block/cciss.h
+++ b/drivers/block/cciss.h
@@ -66,7 +66,7 @@ struct ctlr_info
66 int ctlr; 66 int ctlr;
67 char devname[8]; 67 char devname[8];
68 char *product_name; 68 char *product_name;
69 char firm_ver[4]; // Firmware version 69 char firm_ver[4]; /* Firmware version */
70 struct pci_dev *pdev; 70 struct pci_dev *pdev;
71 __u32 board_id; 71 __u32 board_id;
72 void __iomem *vaddr; 72 void __iomem *vaddr;
@@ -103,7 +103,7 @@ struct ctlr_info
103 BYTE cciss_write; 103 BYTE cciss_write;
104 BYTE cciss_read_capacity; 104 BYTE cciss_read_capacity;
105 105
106 // information about each logical volume 106 /* information about each logical volume */
107 drive_info_struct *drv[CISS_MAX_LUN]; 107 drive_info_struct *drv[CISS_MAX_LUN];
108 108
109 struct access_method access; 109 struct access_method access;
@@ -116,7 +116,7 @@ struct ctlr_info
116 unsigned int maxSG; 116 unsigned int maxSG;
117 spinlock_t lock; 117 spinlock_t lock;
118 118
119 //* pointers to command and error info pool */ 119 /* pointers to command and error info pool */
120 CommandList_struct *cmd_pool; 120 CommandList_struct *cmd_pool;
121 dma_addr_t cmd_pool_dhandle; 121 dma_addr_t cmd_pool_dhandle;
122 ErrorInfo_struct *errinfo_pool; 122 ErrorInfo_struct *errinfo_pool;
@@ -134,7 +134,7 @@ struct ctlr_info
134 */ 134 */
135 int next_to_run; 135 int next_to_run;
136 136
137 // Disk structures we need to pass back 137 /* Disk structures we need to pass back */
138 struct gendisk *gendisk[CISS_MAX_LUN]; 138 struct gendisk *gendisk[CISS_MAX_LUN];
139#ifdef CONFIG_CISS_SCSI_TAPE 139#ifdef CONFIG_CISS_SCSI_TAPE
140 void *scsi_ctlr; /* ptr to structure containing scsi related stuff */ 140 void *scsi_ctlr; /* ptr to structure containing scsi related stuff */
@@ -315,4 +315,3 @@ struct board_type {
315#define CCISS_LOCK(i) (&hba[i]->lock) 315#define CCISS_LOCK(i) (&hba[i]->lock)
316 316
317#endif /* CCISS_H */ 317#endif /* CCISS_H */
318
diff --git a/drivers/block/cciss_cmd.h b/drivers/block/cciss_cmd.h
index 6afa700890ff..277422b7e060 100644
--- a/drivers/block/cciss_cmd.h
+++ b/drivers/block/cciss_cmd.h
@@ -1,17 +1,16 @@
1#ifndef CCISS_CMD_H 1#ifndef CCISS_CMD_H
2#define CCISS_CMD_H 2#define CCISS_CMD_H
3//########################################################################### 3/* DEFINES */
4//DEFINES
5//###########################################################################
6#define CISS_VERSION "1.00" 4#define CISS_VERSION "1.00"
7 5
8//general boundary definitions 6/* general boundary definitions */
9#define SENSEINFOBYTES 32//note that this value may vary between host implementations 7#define SENSEINFOBYTES 32 /* note that this value may vary
8 between host implementations */
10#define MAXSGENTRIES 32 9#define MAXSGENTRIES 32
11#define CCISS_SG_CHAIN 0x80000000 10#define CCISS_SG_CHAIN 0x80000000
12#define MAXREPLYQS 256 11#define MAXREPLYQS 256
13 12
14//Command Status value 13/* Command Status value */
15#define CMD_SUCCESS 0x0000 14#define CMD_SUCCESS 0x0000
16#define CMD_TARGET_STATUS 0x0001 15#define CMD_TARGET_STATUS 0x0001
17#define CMD_DATA_UNDERRUN 0x0002 16#define CMD_DATA_UNDERRUN 0x0002
@@ -49,30 +48,30 @@
49#define ASYM_ACCESS_CHANGED 0x06 48#define ASYM_ACCESS_CHANGED 0x06
50#define LUN_CAPACITY_CHANGED 0x09 49#define LUN_CAPACITY_CHANGED 0x09
51 50
52//transfer direction 51/* transfer direction */
53#define XFER_NONE 0x00 52#define XFER_NONE 0x00
54#define XFER_WRITE 0x01 53#define XFER_WRITE 0x01
55#define XFER_READ 0x02 54#define XFER_READ 0x02
56#define XFER_RSVD 0x03 55#define XFER_RSVD 0x03
57 56
58//task attribute 57/* task attribute */
59#define ATTR_UNTAGGED 0x00 58#define ATTR_UNTAGGED 0x00
60#define ATTR_SIMPLE 0x04 59#define ATTR_SIMPLE 0x04
61#define ATTR_HEADOFQUEUE 0x05 60#define ATTR_HEADOFQUEUE 0x05
62#define ATTR_ORDERED 0x06 61#define ATTR_ORDERED 0x06
63#define ATTR_ACA 0x07 62#define ATTR_ACA 0x07
64 63
65//cdb type 64/* cdb type */
66#define TYPE_CMD 0x00 65#define TYPE_CMD 0x00
67#define TYPE_MSG 0x01 66#define TYPE_MSG 0x01
68 67
69//config space register offsets 68/* config space register offsets */
70#define CFG_VENDORID 0x00 69#define CFG_VENDORID 0x00
71#define CFG_DEVICEID 0x02 70#define CFG_DEVICEID 0x02
72#define CFG_I2OBAR 0x10 71#define CFG_I2OBAR 0x10
73#define CFG_MEM1BAR 0x14 72#define CFG_MEM1BAR 0x14
74 73
75//i2o space register offsets 74/* i2o space register offsets */
76#define I2O_IBDB_SET 0x20 75#define I2O_IBDB_SET 0x20
77#define I2O_IBDB_CLEAR 0x70 76#define I2O_IBDB_CLEAR 0x70
78#define I2O_INT_STATUS 0x30 77#define I2O_INT_STATUS 0x30
@@ -81,7 +80,7 @@
81#define I2O_OBPOST_Q 0x44 80#define I2O_OBPOST_Q 0x44
82#define I2O_DMA1_CFG 0x214 81#define I2O_DMA1_CFG 0x214
83 82
84//Configuration Table 83/* Configuration Table */
85#define CFGTBL_ChangeReq 0x00000001l 84#define CFGTBL_ChangeReq 0x00000001l
86#define CFGTBL_AccCmds 0x00000001l 85#define CFGTBL_AccCmds 0x00000001l
87 86
@@ -103,24 +102,22 @@ typedef union _u64bit
103 __u64 val; 102 __u64 val;
104} u64bit; 103} u64bit;
105 104
106// Type defs used in the following structs 105/* Type defs used in the following structs */
107#define BYTE __u8 106#define BYTE __u8
108#define WORD __u16 107#define WORD __u16
109#define HWORD __u16 108#define HWORD __u16
110#define DWORD __u32 109#define DWORD __u32
111#define QWORD vals32 110#define QWORD vals32
112 111
113//########################################################################### 112/* STRUCTURES */
114//STRUCTURES
115//###########################################################################
116#define CISS_MAX_LUN 1024 113#define CISS_MAX_LUN 1024
117#define CISS_MAX_PHYS_LUN 1024 114#define CISS_MAX_PHYS_LUN 1024
118// SCSI-3 Cmmands 115/* SCSI-3 Cmmands */
119 116
120#pragma pack(1) 117#pragma pack(1)
121 118
122#define CISS_INQUIRY 0x12 119#define CISS_INQUIRY 0x12
123//Date returned 120/* Date returned */
124typedef struct _InquiryData_struct 121typedef struct _InquiryData_struct
125{ 122{
126 BYTE data_byte[36]; 123 BYTE data_byte[36];
@@ -128,7 +125,7 @@ typedef struct _InquiryData_struct
128 125
129#define CISS_REPORT_LOG 0xc2 /* Report Logical LUNs */ 126#define CISS_REPORT_LOG 0xc2 /* Report Logical LUNs */
130#define CISS_REPORT_PHYS 0xc3 /* Report Physical LUNs */ 127#define CISS_REPORT_PHYS 0xc3 /* Report Physical LUNs */
131// Data returned 128/* Data returned */
132typedef struct _ReportLUNdata_struct 129typedef struct _ReportLUNdata_struct
133{ 130{
134 BYTE LUNListLength[4]; 131 BYTE LUNListLength[4];
@@ -139,8 +136,8 @@ typedef struct _ReportLUNdata_struct
139#define CCISS_READ_CAPACITY 0x25 /* Read Capacity */ 136#define CCISS_READ_CAPACITY 0x25 /* Read Capacity */
140typedef struct _ReadCapdata_struct 137typedef struct _ReadCapdata_struct
141{ 138{
142 BYTE total_size[4]; // Total size in blocks 139 BYTE total_size[4]; /* Total size in blocks */
143 BYTE block_size[4]; // Size of blocks in bytes 140 BYTE block_size[4]; /* Size of blocks in bytes */
144} ReadCapdata_struct; 141} ReadCapdata_struct;
145 142
146#define CCISS_READ_CAPACITY_16 0x9e /* Read Capacity 16 */ 143#define CCISS_READ_CAPACITY_16 0x9e /* Read Capacity 16 */
@@ -172,29 +169,29 @@ typedef struct _ReadCapdata_struct_16
172#define CDB_LEN10 10 169#define CDB_LEN10 10
173#define CDB_LEN16 16 170#define CDB_LEN16 16
174 171
175// BMIC commands 172/* BMIC commands */
176#define BMIC_READ 0x26 173#define BMIC_READ 0x26
177#define BMIC_WRITE 0x27 174#define BMIC_WRITE 0x27
178#define BMIC_CACHE_FLUSH 0xc2 175#define BMIC_CACHE_FLUSH 0xc2
179#define CCISS_CACHE_FLUSH 0x01 //C2 was already being used by CCISS 176#define CCISS_CACHE_FLUSH 0x01 /* C2 was already being used by CCISS */
180 177
181//Command List Structure 178/* Command List Structure */
182typedef union _SCSI3Addr_struct { 179typedef union _SCSI3Addr_struct {
183 struct { 180 struct {
184 BYTE Dev; 181 BYTE Dev;
185 BYTE Bus:6; 182 BYTE Bus:6;
186 BYTE Mode:2; // b00 183 BYTE Mode:2; /* b00 */
187 } PeripDev; 184 } PeripDev;
188 struct { 185 struct {
189 BYTE DevLSB; 186 BYTE DevLSB;
190 BYTE DevMSB:6; 187 BYTE DevMSB:6;
191 BYTE Mode:2; // b01 188 BYTE Mode:2; /* b01 */
192 } LogDev; 189 } LogDev;
193 struct { 190 struct {
194 BYTE Dev:5; 191 BYTE Dev:5;
195 BYTE Bus:3; 192 BYTE Bus:3;
196 BYTE Targ:6; 193 BYTE Targ:6;
197 BYTE Mode:2; // b10 194 BYTE Mode:2; /* b10 */
198 } LogUnit; 195 } LogUnit;
199} SCSI3Addr_struct; 196} SCSI3Addr_struct;
200 197
@@ -202,7 +199,7 @@ typedef struct _PhysDevAddr_struct {
202 DWORD TargetId:24; 199 DWORD TargetId:24;
203 DWORD Bus:6; 200 DWORD Bus:6;
204 DWORD Mode:2; 201 DWORD Mode:2;
205 SCSI3Addr_struct Target[2]; //2 level target device addr 202 SCSI3Addr_struct Target[2]; /* 2 level target device addr */
206} PhysDevAddr_struct; 203} PhysDevAddr_struct;
207 204
208typedef struct _LogDevAddr_struct { 205typedef struct _LogDevAddr_struct {
@@ -255,8 +252,8 @@ typedef union _MoreErrInfo_struct{
255 }Common_Info; 252 }Common_Info;
256 struct{ 253 struct{
257 BYTE Reserved[2]; 254 BYTE Reserved[2];
258 BYTE offense_size;//size of offending entry 255 BYTE offense_size; /* size of offending entry */
259 BYTE offense_num; //byte # of offense 0-base 256 BYTE offense_num; /* byte # of offense 0-base */
260 DWORD offense_value; 257 DWORD offense_value;
261 }Invalid_Cmd; 258 }Invalid_Cmd;
262}MoreErrInfo_struct; 259}MoreErrInfo_struct;
@@ -300,7 +297,7 @@ typedef struct _CommandList_struct {
300 char pad[PADSIZE]; 297 char pad[PADSIZE];
301} CommandList_struct; 298} CommandList_struct;
302 299
303//Configuration Table Structure 300/* Configuration Table Structure */
304typedef struct _HostWrite_struct { 301typedef struct _HostWrite_struct {
305 DWORD TransportRequest; 302 DWORD TransportRequest;
306 DWORD Reserved; 303 DWORD Reserved;
@@ -326,4 +323,4 @@ typedef struct _CfgTable_struct {
326 DWORD MaxPhysicalDrivesPerLogicalUnit; 323 DWORD MaxPhysicalDrivesPerLogicalUnit;
327} CfgTable_struct; 324} CfgTable_struct;
328#pragma pack() 325#pragma pack()
329#endif // CCISS_CMD_H 326#endif /* CCISS_CMD_H */
diff --git a/drivers/block/cciss_scsi.h b/drivers/block/cciss_scsi.h
index 7b750245ae76..6d5822fe851a 100644
--- a/drivers/block/cciss_scsi.h
+++ b/drivers/block/cciss_scsi.h
@@ -25,16 +25,16 @@
25 25
26#include <scsi/scsicam.h> /* possibly irrelevant, since we don't show disks */ 26#include <scsi/scsicam.h> /* possibly irrelevant, since we don't show disks */
27 27
28 // the scsi id of the adapter... 28 /* the scsi id of the adapter... */
29#define SELF_SCSI_ID 15 29#define SELF_SCSI_ID 15
30 // 15 is somewhat arbitrary, since the scsi-2 bus 30 /* 15 is somewhat arbitrary, since the scsi-2 bus
31 // that's presented by the driver to the OS is 31 that's presented by the driver to the OS is
32 // fabricated. The "real" scsi-3 bus the 32 fabricated. The "real" scsi-3 bus the
33 // hardware presents is fabricated too. 33 hardware presents is fabricated too.
34 // The actual, honest-to-goodness physical 34 The actual, honest-to-goodness physical
35 // bus that the devices are attached to is not 35 bus that the devices are attached to is not
36 // addressible natively, and may in fact turn 36 addressible natively, and may in fact turn
37 // out to be not scsi at all. 37 out to be not scsi at all. */
38 38
39#define SCSI_CCISS_CAN_QUEUE 2 39#define SCSI_CCISS_CAN_QUEUE 2
40 40
diff --git a/include/linux/cciss_ioctl.h b/include/linux/cciss_ioctl.h
index eb130b4d8e72..e7343a1a9ea8 100644
--- a/include/linux/cciss_ioctl.h
+++ b/include/linux/cciss_ioctl.h
@@ -37,12 +37,13 @@ typedef __u32 DriverVer_type;
37#define MAX_KMALLOC_SIZE 128000 37#define MAX_KMALLOC_SIZE 128000
38 38
39#ifndef CCISS_CMD_H 39#ifndef CCISS_CMD_H
40// This defines are duplicated in cciss_cmd.h in the driver directory 40/* This defines are duplicated in cciss_cmd.h in the driver directory */
41 41
42//general boundary definitions 42/* general boundary definitions */
43#define SENSEINFOBYTES 32//note that this value may vary between host implementations 43#define SENSEINFOBYTES 32 /* note that this value may vary
44 between host implementations */
44 45
45//Command Status value 46/* Command Status value */
46#define CMD_SUCCESS 0x0000 47#define CMD_SUCCESS 0x0000
47#define CMD_TARGET_STATUS 0x0001 48#define CMD_TARGET_STATUS 0x0001
48#define CMD_DATA_UNDERRUN 0x0002 49#define CMD_DATA_UNDERRUN 0x0002
@@ -57,24 +58,24 @@ typedef __u32 DriverVer_type;
57#define CMD_TIMEOUT 0x000B 58#define CMD_TIMEOUT 0x000B
58#define CMD_UNABORTABLE 0x000C 59#define CMD_UNABORTABLE 0x000C
59 60
60//transfer direction 61/* transfer direction */
61#define XFER_NONE 0x00 62#define XFER_NONE 0x00
62#define XFER_WRITE 0x01 63#define XFER_WRITE 0x01
63#define XFER_READ 0x02 64#define XFER_READ 0x02
64#define XFER_RSVD 0x03 65#define XFER_RSVD 0x03
65 66
66//task attribute 67/* task attribute */
67#define ATTR_UNTAGGED 0x00 68#define ATTR_UNTAGGED 0x00
68#define ATTR_SIMPLE 0x04 69#define ATTR_SIMPLE 0x04
69#define ATTR_HEADOFQUEUE 0x05 70#define ATTR_HEADOFQUEUE 0x05
70#define ATTR_ORDERED 0x06 71#define ATTR_ORDERED 0x06
71#define ATTR_ACA 0x07 72#define ATTR_ACA 0x07
72 73
73//cdb type 74/* cdb type */
74#define TYPE_CMD 0x00 75#define TYPE_CMD 0x00
75#define TYPE_MSG 0x01 76#define TYPE_MSG 0x01
76 77
77// Type defs used in the following structs 78/* Type defs used in the following structs */
78#define BYTE __u8 79#define BYTE __u8
79#define WORD __u16 80#define WORD __u16
80#define HWORD __u16 81#define HWORD __u16
@@ -82,28 +83,28 @@ typedef __u32 DriverVer_type;
82 83
83#define CISS_MAX_LUN 1024 84#define CISS_MAX_LUN 1024
84 85
85#define LEVEL2LUN 1 // index into Target(x) structure, due to byte swapping 86#define LEVEL2LUN 1 /* index into Target(x) structure, due to byte swapping */
86#define LEVEL3LUN 0 87#define LEVEL3LUN 0
87 88
88#pragma pack(1) 89#pragma pack(1)
89 90
90//Command List Structure 91/* Command List Structure */
91typedef union _SCSI3Addr_struct { 92typedef union _SCSI3Addr_struct {
92 struct { 93 struct {
93 BYTE Dev; 94 BYTE Dev;
94 BYTE Bus:6; 95 BYTE Bus:6;
95 BYTE Mode:2; // b00 96 BYTE Mode:2; /* b00 */
96 } PeripDev; 97 } PeripDev;
97 struct { 98 struct {
98 BYTE DevLSB; 99 BYTE DevLSB;
99 BYTE DevMSB:6; 100 BYTE DevMSB:6;
100 BYTE Mode:2; // b01 101 BYTE Mode:2; /* b01 */
101 } LogDev; 102 } LogDev;
102 struct { 103 struct {
103 BYTE Dev:5; 104 BYTE Dev:5;
104 BYTE Bus:3; 105 BYTE Bus:3;
105 BYTE Targ:6; 106 BYTE Targ:6;
106 BYTE Mode:2; // b10 107 BYTE Mode:2; /* b10 */
107 } LogUnit; 108 } LogUnit;
108} SCSI3Addr_struct; 109} SCSI3Addr_struct;
109 110
@@ -111,7 +112,7 @@ typedef struct _PhysDevAddr_struct {
111 DWORD TargetId:24; 112 DWORD TargetId:24;
112 DWORD Bus:6; 113 DWORD Bus:6;
113 DWORD Mode:2; 114 DWORD Mode:2;
114 SCSI3Addr_struct Target[2]; //2 level target device addr 115 SCSI3Addr_struct Target[2]; /* 2 level target device addr */
115} PhysDevAddr_struct; 116} PhysDevAddr_struct;
116 117
117typedef struct _LogDevAddr_struct { 118typedef struct _LogDevAddr_struct {
@@ -146,8 +147,8 @@ typedef union _MoreErrInfo_struct{
146 }Common_Info; 147 }Common_Info;
147 struct{ 148 struct{
148 BYTE Reserved[2]; 149 BYTE Reserved[2];
149 BYTE offense_size;//size of offending entry 150 BYTE offense_size; /* size of offending entry */
150 BYTE offense_num; //byte # of offense 0-base 151 BYTE offense_num; /* byte # of offense 0-base */
151 DWORD offense_value; 152 DWORD offense_value;
152 }Invalid_Cmd; 153 }Invalid_Cmd;
153}MoreErrInfo_struct; 154}MoreErrInfo_struct;