aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/DAC960.c2
-rw-r--r--drivers/block/cciss.c37
-rw-r--r--drivers/block/cciss.h9
-rw-r--r--drivers/block/cciss_cmd.h150
-rw-r--r--drivers/block/cciss_scsi.h18
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/block/virtio_blk.c2
-rw-r--r--drivers/block/xen-blkfront.c2
-rw-r--r--drivers/block/xsysace.c2
10 files changed, 58 insertions, 168 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index ce1fa923c414..7412b5d4f5f3 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -7134,7 +7134,7 @@ static struct DAC960_privdata DAC960_P_privdata = {
7134 .MemoryWindowSize = DAC960_PD_RegisterWindowSize, 7134 .MemoryWindowSize = DAC960_PD_RegisterWindowSize,
7135}; 7135};
7136 7136
7137static struct pci_device_id DAC960_id_table[] = { 7137static const struct pci_device_id DAC960_id_table[] = {
7138 { 7138 {
7139 .vendor = PCI_VENDOR_ID_MYLEX, 7139 .vendor = PCI_VENDOR_ID_MYLEX,
7140 .device = PCI_DEVICE_ID_MYLEX_DAC960_GEM, 7140 .device = PCI_DEVICE_ID_MYLEX_DAC960_GEM,
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 9291614ac6b7..86acdca5d0ce 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1344,26 +1344,27 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
1344 kfree(buff); 1344 kfree(buff);
1345 return -ENOMEM; 1345 return -ENOMEM;
1346 } 1346 }
1347 // Fill in the command type 1347 /* Fill in the command type */
1348 c->cmd_type = CMD_IOCTL_PEND; 1348 c->cmd_type = CMD_IOCTL_PEND;
1349 // Fill in Command Header 1349 /* Fill in Command Header */
1350 c->Header.ReplyQueue = 0; // unused in simple mode 1350 c->Header.ReplyQueue = 0; /* unused in simple mode */
1351 if (iocommand.buf_size > 0) // buffer to fill 1351 if (iocommand.buf_size > 0) /* buffer to fill */
1352 { 1352 {
1353 c->Header.SGList = 1; 1353 c->Header.SGList = 1;
1354 c->Header.SGTotal = 1; 1354 c->Header.SGTotal = 1;
1355 } else // no buffers to fill 1355 } else /* no buffers to fill */
1356 { 1356 {
1357 c->Header.SGList = 0; 1357 c->Header.SGList = 0;
1358 c->Header.SGTotal = 0; 1358 c->Header.SGTotal = 0;
1359 } 1359 }
1360 c->Header.LUN = iocommand.LUN_info; 1360 c->Header.LUN = iocommand.LUN_info;
1361 c->Header.Tag.lower = c->busaddr; // use the kernel address the cmd block for tag 1361 /* use the kernel address the cmd block for tag */
1362 c->Header.Tag.lower = c->busaddr;
1362 1363
1363 // Fill in Request block 1364 /* Fill in Request block */
1364 c->Request = iocommand.Request; 1365 c->Request = iocommand.Request;
1365 1366
1366 // Fill in the scatter gather information 1367 /* Fill in the scatter gather information */
1367 if (iocommand.buf_size > 0) { 1368 if (iocommand.buf_size > 0) {
1368 temp64.val = pci_map_single(host->pdev, buff, 1369 temp64.val = pci_map_single(host->pdev, buff,
1369 iocommand.buf_size, 1370 iocommand.buf_size,
@@ -1371,7 +1372,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
1371 c->SG[0].Addr.lower = temp64.val32.lower; 1372 c->SG[0].Addr.lower = temp64.val32.lower;
1372 c->SG[0].Addr.upper = temp64.val32.upper; 1373 c->SG[0].Addr.upper = temp64.val32.upper;
1373 c->SG[0].Len = iocommand.buf_size; 1374 c->SG[0].Len = iocommand.buf_size;
1374 c->SG[0].Ext = 0; // we are not chaining 1375 c->SG[0].Ext = 0; /* we are not chaining */
1375 } 1376 }
1376 c->waiting = &wait; 1377 c->waiting = &wait;
1377 1378
@@ -2425,7 +2426,7 @@ static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff,
2425 c->Request.Type.Direction = XFER_READ; 2426 c->Request.Type.Direction = XFER_READ;
2426 c->Request.Timeout = 0; 2427 c->Request.Timeout = 0;
2427 c->Request.CDB[0] = cmd; 2428 c->Request.CDB[0] = cmd;
2428 c->Request.CDB[6] = (size >> 24) & 0xFF; //MSB 2429 c->Request.CDB[6] = (size >> 24) & 0xFF; /* MSB */
2429 c->Request.CDB[7] = (size >> 16) & 0xFF; 2430 c->Request.CDB[7] = (size >> 16) & 0xFF;
2430 c->Request.CDB[8] = (size >> 8) & 0xFF; 2431 c->Request.CDB[8] = (size >> 8) & 0xFF;
2431 c->Request.CDB[9] = size & 0xFF; 2432 c->Request.CDB[9] = size & 0xFF;
@@ -2694,7 +2695,7 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
2694 "cciss: reading geometry failed, volume " 2695 "cciss: reading geometry failed, volume "
2695 "does not support reading geometry\n"); 2696 "does not support reading geometry\n");
2696 drv->heads = 255; 2697 drv->heads = 255;
2697 drv->sectors = 32; // Sectors per track 2698 drv->sectors = 32; /* Sectors per track */
2698 drv->cylinders = total_size + 1; 2699 drv->cylinders = total_size + 1;
2699 drv->raid_level = RAID_UNKNOWN; 2700 drv->raid_level = RAID_UNKNOWN;
2700 } else { 2701 } else {
@@ -3112,19 +3113,19 @@ static void do_cciss_request(struct request_queue *q)
3112 3113
3113 /* fill in the request */ 3114 /* fill in the request */
3114 drv = creq->rq_disk->private_data; 3115 drv = creq->rq_disk->private_data;
3115 c->Header.ReplyQueue = 0; // unused in simple mode 3116 c->Header.ReplyQueue = 0; /* unused in simple mode */
3116 /* got command from pool, so use the command block index instead */ 3117 /* got command from pool, so use the command block index instead */
3117 /* for direct lookups. */ 3118 /* for direct lookups. */
3118 /* The first 2 bits are reserved for controller error reporting. */ 3119 /* The first 2 bits are reserved for controller error reporting. */
3119 c->Header.Tag.lower = (c->cmdindex << 3); 3120 c->Header.Tag.lower = (c->cmdindex << 3);
3120 c->Header.Tag.lower |= 0x04; /* flag for direct lookup. */ 3121 c->Header.Tag.lower |= 0x04; /* flag for direct lookup. */
3121 memcpy(&c->Header.LUN, drv->LunID, sizeof(drv->LunID)); 3122 memcpy(&c->Header.LUN, drv->LunID, sizeof(drv->LunID));
3122 c->Request.CDBLen = 10; // 12 byte commands not in FW yet; 3123 c->Request.CDBLen = 10; /* 12 byte commands not in FW yet; */
3123 c->Request.Type.Type = TYPE_CMD; // It is a command. 3124 c->Request.Type.Type = TYPE_CMD; /* It is a command. */
3124 c->Request.Type.Attribute = ATTR_SIMPLE; 3125 c->Request.Type.Attribute = ATTR_SIMPLE;
3125 c->Request.Type.Direction = 3126 c->Request.Type.Direction =
3126 (rq_data_dir(creq) == READ) ? XFER_READ : XFER_WRITE; 3127 (rq_data_dir(creq) == READ) ? XFER_READ : XFER_WRITE;
3127 c->Request.Timeout = 0; // Don't time out 3128 c->Request.Timeout = 0; /* Don't time out */
3128 c->Request.CDB[0] = 3129 c->Request.CDB[0] =
3129 (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write; 3130 (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write;
3130 start_blk = blk_rq_pos(creq); 3131 start_blk = blk_rq_pos(creq);
@@ -3209,11 +3210,11 @@ static void do_cciss_request(struct request_queue *q)
3209 if (likely(blk_fs_request(creq))) { 3210 if (likely(blk_fs_request(creq))) {
3210 if(h->cciss_read == CCISS_READ_10) { 3211 if(h->cciss_read == CCISS_READ_10) {
3211 c->Request.CDB[1] = 0; 3212 c->Request.CDB[1] = 0;
3212 c->Request.CDB[2] = (start_blk >> 24) & 0xff; //MSB 3213 c->Request.CDB[2] = (start_blk >> 24) & 0xff; /* MSB */
3213 c->Request.CDB[3] = (start_blk >> 16) & 0xff; 3214 c->Request.CDB[3] = (start_blk >> 16) & 0xff;
3214 c->Request.CDB[4] = (start_blk >> 8) & 0xff; 3215 c->Request.CDB[4] = (start_blk >> 8) & 0xff;
3215 c->Request.CDB[5] = start_blk & 0xff; 3216 c->Request.CDB[5] = start_blk & 0xff;
3216 c->Request.CDB[6] = 0; // (sect >> 24) & 0xff; MSB 3217 c->Request.CDB[6] = 0; /* (sect >> 24) & 0xff; MSB */
3217 c->Request.CDB[7] = (blk_rq_sectors(creq) >> 8) & 0xff; 3218 c->Request.CDB[7] = (blk_rq_sectors(creq) >> 8) & 0xff;
3218 c->Request.CDB[8] = blk_rq_sectors(creq) & 0xff; 3219 c->Request.CDB[8] = blk_rq_sectors(creq) & 0xff;
3219 c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0; 3220 c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0;
@@ -3222,7 +3223,7 @@ static void do_cciss_request(struct request_queue *q)
3222 3223
3223 c->Request.CDBLen = 16; 3224 c->Request.CDBLen = 16;
3224 c->Request.CDB[1]= 0; 3225 c->Request.CDB[1]= 0;
3225 c->Request.CDB[2]= (upper32 >> 24) & 0xff; //MSB 3226 c->Request.CDB[2]= (upper32 >> 24) & 0xff; /* MSB */
3226 c->Request.CDB[3]= (upper32 >> 16) & 0xff; 3227 c->Request.CDB[3]= (upper32 >> 16) & 0xff;
3227 c->Request.CDB[4]= (upper32 >> 8) & 0xff; 3228 c->Request.CDB[4]= (upper32 >> 8) & 0xff;
3228 c->Request.CDB[5]= upper32 & 0xff; 3229 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..25f97623bacf 100644
--- a/drivers/block/cciss_cmd.h
+++ b/drivers/block/cciss_cmd.h
@@ -1,31 +1,16 @@
1#ifndef CCISS_CMD_H 1#ifndef CCISS_CMD_H
2#define CCISS_CMD_H 2#define CCISS_CMD_H
3//########################################################################### 3
4//DEFINES 4#include <linux/cciss_defs.h>
5//########################################################################### 5
6/* DEFINES */
6#define CISS_VERSION "1.00" 7#define CISS_VERSION "1.00"
7 8
8//general boundary definitions 9/* general boundary definitions */
9#define SENSEINFOBYTES 32//note that this value may vary between host implementations
10#define MAXSGENTRIES 32 10#define MAXSGENTRIES 32
11#define CCISS_SG_CHAIN 0x80000000 11#define CCISS_SG_CHAIN 0x80000000
12#define MAXREPLYQS 256 12#define MAXREPLYQS 256
13 13
14//Command Status value
15#define CMD_SUCCESS 0x0000
16#define CMD_TARGET_STATUS 0x0001
17#define CMD_DATA_UNDERRUN 0x0002
18#define CMD_DATA_OVERRUN 0x0003
19#define CMD_INVALID 0x0004
20#define CMD_PROTOCOL_ERR 0x0005
21#define CMD_HARDWARE_ERR 0x0006
22#define CMD_CONNECTION_LOST 0x0007
23#define CMD_ABORTED 0x0008
24#define CMD_ABORT_FAILED 0x0009
25#define CMD_UNSOLICITED_ABORT 0x000A
26#define CMD_TIMEOUT 0x000B
27#define CMD_UNABORTABLE 0x000C
28
29/* Unit Attentions ASC's as defined for the MSA2012sa */ 14/* Unit Attentions ASC's as defined for the MSA2012sa */
30#define POWER_OR_RESET 0x29 15#define POWER_OR_RESET 0x29
31#define STATE_CHANGED 0x2a 16#define STATE_CHANGED 0x2a
@@ -49,30 +34,13 @@
49#define ASYM_ACCESS_CHANGED 0x06 34#define ASYM_ACCESS_CHANGED 0x06
50#define LUN_CAPACITY_CHANGED 0x09 35#define LUN_CAPACITY_CHANGED 0x09
51 36
52//transfer direction 37/* config space register offsets */
53#define XFER_NONE 0x00
54#define XFER_WRITE 0x01
55#define XFER_READ 0x02
56#define XFER_RSVD 0x03
57
58//task attribute
59#define ATTR_UNTAGGED 0x00
60#define ATTR_SIMPLE 0x04
61#define ATTR_HEADOFQUEUE 0x05
62#define ATTR_ORDERED 0x06
63#define ATTR_ACA 0x07
64
65//cdb type
66#define TYPE_CMD 0x00
67#define TYPE_MSG 0x01
68
69//config space register offsets
70#define CFG_VENDORID 0x00 38#define CFG_VENDORID 0x00
71#define CFG_DEVICEID 0x02 39#define CFG_DEVICEID 0x02
72#define CFG_I2OBAR 0x10 40#define CFG_I2OBAR 0x10
73#define CFG_MEM1BAR 0x14 41#define CFG_MEM1BAR 0x14
74 42
75//i2o space register offsets 43/* i2o space register offsets */
76#define I2O_IBDB_SET 0x20 44#define I2O_IBDB_SET 0x20
77#define I2O_IBDB_CLEAR 0x70 45#define I2O_IBDB_CLEAR 0x70
78#define I2O_INT_STATUS 0x30 46#define I2O_INT_STATUS 0x30
@@ -81,7 +49,7 @@
81#define I2O_OBPOST_Q 0x44 49#define I2O_OBPOST_Q 0x44
82#define I2O_DMA1_CFG 0x214 50#define I2O_DMA1_CFG 0x214
83 51
84//Configuration Table 52/* Configuration Table */
85#define CFGTBL_ChangeReq 0x00000001l 53#define CFGTBL_ChangeReq 0x00000001l
86#define CFGTBL_AccCmds 0x00000001l 54#define CFGTBL_AccCmds 0x00000001l
87 55
@@ -103,24 +71,17 @@ typedef union _u64bit
103 __u64 val; 71 __u64 val;
104} u64bit; 72} u64bit;
105 73
106// Type defs used in the following structs 74/* Type defs used in the following structs */
107#define BYTE __u8
108#define WORD __u16
109#define HWORD __u16
110#define DWORD __u32
111#define QWORD vals32 75#define QWORD vals32
112 76
113//########################################################################### 77/* STRUCTURES */
114//STRUCTURES
115//###########################################################################
116#define CISS_MAX_LUN 1024
117#define CISS_MAX_PHYS_LUN 1024 78#define CISS_MAX_PHYS_LUN 1024
118// SCSI-3 Cmmands 79/* SCSI-3 Cmmands */
119 80
120#pragma pack(1) 81#pragma pack(1)
121 82
122#define CISS_INQUIRY 0x12 83#define CISS_INQUIRY 0x12
123//Date returned 84/* Date returned */
124typedef struct _InquiryData_struct 85typedef struct _InquiryData_struct
125{ 86{
126 BYTE data_byte[36]; 87 BYTE data_byte[36];
@@ -128,7 +89,7 @@ typedef struct _InquiryData_struct
128 89
129#define CISS_REPORT_LOG 0xc2 /* Report Logical LUNs */ 90#define CISS_REPORT_LOG 0xc2 /* Report Logical LUNs */
130#define CISS_REPORT_PHYS 0xc3 /* Report Physical LUNs */ 91#define CISS_REPORT_PHYS 0xc3 /* Report Physical LUNs */
131// Data returned 92/* Data returned */
132typedef struct _ReportLUNdata_struct 93typedef struct _ReportLUNdata_struct
133{ 94{
134 BYTE LUNListLength[4]; 95 BYTE LUNListLength[4];
@@ -139,8 +100,8 @@ typedef struct _ReportLUNdata_struct
139#define CCISS_READ_CAPACITY 0x25 /* Read Capacity */ 100#define CCISS_READ_CAPACITY 0x25 /* Read Capacity */
140typedef struct _ReadCapdata_struct 101typedef struct _ReadCapdata_struct
141{ 102{
142 BYTE total_size[4]; // Total size in blocks 103 BYTE total_size[4]; /* Total size in blocks */
143 BYTE block_size[4]; // Size of blocks in bytes 104 BYTE block_size[4]; /* Size of blocks in bytes */
144} ReadCapdata_struct; 105} ReadCapdata_struct;
145 106
146#define CCISS_READ_CAPACITY_16 0x9e /* Read Capacity 16 */ 107#define CCISS_READ_CAPACITY_16 0x9e /* Read Capacity 16 */
@@ -172,52 +133,13 @@ typedef struct _ReadCapdata_struct_16
172#define CDB_LEN10 10 133#define CDB_LEN10 10
173#define CDB_LEN16 16 134#define CDB_LEN16 16
174 135
175// BMIC commands 136/* BMIC commands */
176#define BMIC_READ 0x26 137#define BMIC_READ 0x26
177#define BMIC_WRITE 0x27 138#define BMIC_WRITE 0x27
178#define BMIC_CACHE_FLUSH 0xc2 139#define BMIC_CACHE_FLUSH 0xc2
179#define CCISS_CACHE_FLUSH 0x01 //C2 was already being used by CCISS 140#define CCISS_CACHE_FLUSH 0x01 /* C2 was already being used by CCISS */
180
181//Command List Structure
182typedef union _SCSI3Addr_struct {
183 struct {
184 BYTE Dev;
185 BYTE Bus:6;
186 BYTE Mode:2; // b00
187 } PeripDev;
188 struct {
189 BYTE DevLSB;
190 BYTE DevMSB:6;
191 BYTE Mode:2; // b01
192 } LogDev;
193 struct {
194 BYTE Dev:5;
195 BYTE Bus:3;
196 BYTE Targ:6;
197 BYTE Mode:2; // b10
198 } LogUnit;
199} SCSI3Addr_struct;
200
201typedef struct _PhysDevAddr_struct {
202 DWORD TargetId:24;
203 DWORD Bus:6;
204 DWORD Mode:2;
205 SCSI3Addr_struct Target[2]; //2 level target device addr
206} PhysDevAddr_struct;
207
208typedef struct _LogDevAddr_struct {
209 DWORD VolId:30;
210 DWORD Mode:2;
211 BYTE reserved[4];
212} LogDevAddr_struct;
213
214typedef union _LUNAddr_struct {
215 BYTE LunAddrBytes[8];
216 SCSI3Addr_struct SCSI3Lun[4];
217 PhysDevAddr_struct PhysDev;
218 LogDevAddr_struct LogDev;
219} LUNAddr_struct;
220 141
142/* Command List Structure */
221#define CTLR_LUNID "\0\0\0\0\0\0\0\0" 143#define CTLR_LUNID "\0\0\0\0\0\0\0\0"
222 144
223typedef struct _CommandListHeader_struct { 145typedef struct _CommandListHeader_struct {
@@ -227,16 +149,6 @@ typedef struct _CommandListHeader_struct {
227 QWORD Tag; 149 QWORD Tag;
228 LUNAddr_struct LUN; 150 LUNAddr_struct LUN;
229} CommandListHeader_struct; 151} CommandListHeader_struct;
230typedef struct _RequestBlock_struct {
231 BYTE CDBLen;
232 struct {
233 BYTE Type:3;
234 BYTE Attribute:3;
235 BYTE Direction:2;
236 } Type;
237 HWORD Timeout;
238 BYTE CDB[16];
239} RequestBlock_struct;
240typedef struct _ErrDescriptor_struct { 152typedef struct _ErrDescriptor_struct {
241 QWORD Addr; 153 QWORD Addr;
242 DWORD Len; 154 DWORD Len;
@@ -247,28 +159,6 @@ typedef struct _SGDescriptor_struct {
247 DWORD Ext; 159 DWORD Ext;
248} SGDescriptor_struct; 160} SGDescriptor_struct;
249 161
250typedef union _MoreErrInfo_struct{
251 struct {
252 BYTE Reserved[3];
253 BYTE Type;
254 DWORD ErrorInfo;
255 }Common_Info;
256 struct{
257 BYTE Reserved[2];
258 BYTE offense_size;//size of offending entry
259 BYTE offense_num; //byte # of offense 0-base
260 DWORD offense_value;
261 }Invalid_Cmd;
262}MoreErrInfo_struct;
263typedef struct _ErrorInfo_struct {
264 BYTE ScsiStatus;
265 BYTE SenseLen;
266 HWORD CommandStatus;
267 DWORD ResidualCnt;
268 MoreErrInfo_struct MoreErrInfo;
269 BYTE SenseInfo[SENSEINFOBYTES];
270} ErrorInfo_struct;
271
272/* Command types */ 162/* Command types */
273#define CMD_RWREQ 0x00 163#define CMD_RWREQ 0x00
274#define CMD_IOCTL_PEND 0x01 164#define CMD_IOCTL_PEND 0x01
@@ -300,7 +190,7 @@ typedef struct _CommandList_struct {
300 char pad[PADSIZE]; 190 char pad[PADSIZE];
301} CommandList_struct; 191} CommandList_struct;
302 192
303//Configuration Table Structure 193/* Configuration Table Structure */
304typedef struct _HostWrite_struct { 194typedef struct _HostWrite_struct {
305 DWORD TransportRequest; 195 DWORD TransportRequest;
306 DWORD Reserved; 196 DWORD Reserved;
@@ -326,4 +216,4 @@ typedef struct _CfgTable_struct {
326 DWORD MaxPhysicalDrivesPerLogicalUnit; 216 DWORD MaxPhysicalDrivesPerLogicalUnit;
327} CfgTable_struct; 217} CfgTable_struct;
328#pragma pack() 218#pragma pack()
329#endif // CCISS_CMD_H 219#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/drivers/block/sx8.c b/drivers/block/sx8.c
index a7c4184f4a63..7bd7b2f83116 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -409,7 +409,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
409static void carm_remove_one (struct pci_dev *pdev); 409static void carm_remove_one (struct pci_dev *pdev);
410static int carm_bdev_getgeo(struct block_device *bdev, struct hd_geometry *geo); 410static int carm_bdev_getgeo(struct block_device *bdev, struct hd_geometry *geo);
411 411
412static struct pci_device_id carm_pci_tbl[] = { 412static const struct pci_device_id carm_pci_tbl[] = {
413 { PCI_VENDOR_ID_PROMISE, 0x8000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, 413 { PCI_VENDOR_ID_PROMISE, 0x8000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
414 { PCI_VENDOR_ID_PROMISE, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, 414 { PCI_VENDOR_ID_PROMISE, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
415 { } /* terminate list */ 415 { } /* terminate list */
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index c739b203fe91..d86d1357ccef 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -393,7 +393,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum);
393#define ub_usb_ids usb_storage_usb_ids 393#define ub_usb_ids usb_storage_usb_ids
394#else 394#else
395 395
396static struct usb_device_id ub_usb_ids[] = { 396static const struct usb_device_id ub_usb_ids[] = {
397 { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) }, 397 { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
398 { } 398 { }
399}; 399};
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 51042f0ba7e1..c17e622f85ee 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -404,7 +404,7 @@ static void __devexit virtblk_remove(struct virtio_device *vdev)
404 kfree(vblk); 404 kfree(vblk);
405} 405}
406 406
407static struct virtio_device_id id_table[] = { 407static const struct virtio_device_id id_table[] = {
408 { VIRTIO_ID_BLOCK, VIRTIO_DEV_ANY_ID }, 408 { VIRTIO_ID_BLOCK, VIRTIO_DEV_ANY_ID },
409 { 0 }, 409 { 0 },
410}; 410};
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 05a31e55d278..a84702d1a35e 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1050,7 +1050,7 @@ static const struct block_device_operations xlvbd_block_fops =
1050}; 1050};
1051 1051
1052 1052
1053static struct xenbus_device_id blkfront_ids[] = { 1053static const struct xenbus_device_id blkfront_ids[] = {
1054 { "vbd" }, 1054 { "vbd" },
1055 { "" } 1055 { "" }
1056}; 1056};
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index e5c5415eb45e..e1c95e208a66 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1227,7 +1227,7 @@ static int __devexit ace_of_remove(struct of_device *op)
1227} 1227}
1228 1228
1229/* Match table for of_platform binding */ 1229/* Match table for of_platform binding */
1230static struct of_device_id ace_of_match[] __devinitdata = { 1230static const struct of_device_id ace_of_match[] __devinitconst = {
1231 { .compatible = "xlnx,opb-sysace-1.00.b", }, 1231 { .compatible = "xlnx,opb-sysace-1.00.b", },
1232 { .compatible = "xlnx,opb-sysace-1.00.c", }, 1232 { .compatible = "xlnx,opb-sysace-1.00.c", },
1233 { .compatible = "xlnx,xps-sysace-1.00.a", }, 1233 { .compatible = "xlnx,xps-sysace-1.00.a", },