aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c56
1 files changed, 30 insertions, 26 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 8081b637d97e..942db9de785e 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -11,8 +11,9 @@
11/* SYSFS attributes --------------------------------------------------------- */ 11/* SYSFS attributes --------------------------------------------------------- */
12 12
13static ssize_t 13static ssize_t
14qla2x00_sysfs_read_fw_dump(struct kobject *kobj, char *buf, loff_t off, 14qla2x00_sysfs_read_fw_dump(struct kobject *kobj,
15 size_t count) 15 struct bin_attribute *bin_attr,
16 char *buf, loff_t off, size_t count)
16{ 17{
17 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 18 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
18 struct device, kobj))); 19 struct device, kobj)));
@@ -31,8 +32,9 @@ qla2x00_sysfs_read_fw_dump(struct kobject *kobj, char *buf, loff_t off,
31} 32}
32 33
33static ssize_t 34static ssize_t
34qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off, 35qla2x00_sysfs_write_fw_dump(struct kobject *kobj,
35 size_t count) 36 struct bin_attribute *bin_attr,
37 char *buf, loff_t off, size_t count)
36{ 38{
37 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 39 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
38 struct device, kobj))); 40 struct device, kobj)));
@@ -73,7 +75,6 @@ static struct bin_attribute sysfs_fw_dump_attr = {
73 .attr = { 75 .attr = {
74 .name = "fw_dump", 76 .name = "fw_dump",
75 .mode = S_IRUSR | S_IWUSR, 77 .mode = S_IRUSR | S_IWUSR,
76 .owner = THIS_MODULE,
77 }, 78 },
78 .size = 0, 79 .size = 0,
79 .read = qla2x00_sysfs_read_fw_dump, 80 .read = qla2x00_sysfs_read_fw_dump,
@@ -81,8 +82,9 @@ static struct bin_attribute sysfs_fw_dump_attr = {
81}; 82};
82 83
83static ssize_t 84static ssize_t
84qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off, 85qla2x00_sysfs_read_nvram(struct kobject *kobj,
85 size_t count) 86 struct bin_attribute *bin_attr,
87 char *buf, loff_t off, size_t count)
86{ 88{
87 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 89 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
88 struct device, kobj))); 90 struct device, kobj)));
@@ -101,8 +103,9 @@ qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off,
101} 103}
102 104
103static ssize_t 105static ssize_t
104qla2x00_sysfs_write_nvram(struct kobject *kobj, char *buf, loff_t off, 106qla2x00_sysfs_write_nvram(struct kobject *kobj,
105 size_t count) 107 struct bin_attribute *bin_attr,
108 char *buf, loff_t off, size_t count)
106{ 109{
107 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 110 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
108 struct device, kobj))); 111 struct device, kobj)));
@@ -149,7 +152,6 @@ static struct bin_attribute sysfs_nvram_attr = {
149 .attr = { 152 .attr = {
150 .name = "nvram", 153 .name = "nvram",
151 .mode = S_IRUSR | S_IWUSR, 154 .mode = S_IRUSR | S_IWUSR,
152 .owner = THIS_MODULE,
153 }, 155 },
154 .size = 512, 156 .size = 512,
155 .read = qla2x00_sysfs_read_nvram, 157 .read = qla2x00_sysfs_read_nvram,
@@ -157,8 +159,9 @@ static struct bin_attribute sysfs_nvram_attr = {
157}; 159};
158 160
159static ssize_t 161static ssize_t
160qla2x00_sysfs_read_optrom(struct kobject *kobj, char *buf, loff_t off, 162qla2x00_sysfs_read_optrom(struct kobject *kobj,
161 size_t count) 163 struct bin_attribute *bin_attr,
164 char *buf, loff_t off, size_t count)
162{ 165{
163 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 166 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
164 struct device, kobj))); 167 struct device, kobj)));
@@ -176,8 +179,9 @@ qla2x00_sysfs_read_optrom(struct kobject *kobj, char *buf, loff_t off,
176} 179}
177 180
178static ssize_t 181static ssize_t
179qla2x00_sysfs_write_optrom(struct kobject *kobj, char *buf, loff_t off, 182qla2x00_sysfs_write_optrom(struct kobject *kobj,
180 size_t count) 183 struct bin_attribute *bin_attr,
184 char *buf, loff_t off, size_t count)
181{ 185{
182 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 186 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
183 struct device, kobj))); 187 struct device, kobj)));
@@ -198,7 +202,6 @@ static struct bin_attribute sysfs_optrom_attr = {
198 .attr = { 202 .attr = {
199 .name = "optrom", 203 .name = "optrom",
200 .mode = S_IRUSR | S_IWUSR, 204 .mode = S_IRUSR | S_IWUSR,
201 .owner = THIS_MODULE,
202 }, 205 },
203 .size = OPTROM_SIZE_24XX, 206 .size = OPTROM_SIZE_24XX,
204 .read = qla2x00_sysfs_read_optrom, 207 .read = qla2x00_sysfs_read_optrom,
@@ -206,8 +209,9 @@ static struct bin_attribute sysfs_optrom_attr = {
206}; 209};
207 210
208static ssize_t 211static ssize_t
209qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj, char *buf, loff_t off, 212qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj,
210 size_t count) 213 struct bin_attribute *bin_attr,
214 char *buf, loff_t off, size_t count)
211{ 215{
212 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 216 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
213 struct device, kobj))); 217 struct device, kobj)));
@@ -279,15 +283,15 @@ static struct bin_attribute sysfs_optrom_ctl_attr = {
279 .attr = { 283 .attr = {
280 .name = "optrom_ctl", 284 .name = "optrom_ctl",
281 .mode = S_IWUSR, 285 .mode = S_IWUSR,
282 .owner = THIS_MODULE,
283 }, 286 },
284 .size = 0, 287 .size = 0,
285 .write = qla2x00_sysfs_write_optrom_ctl, 288 .write = qla2x00_sysfs_write_optrom_ctl,
286}; 289};
287 290
288static ssize_t 291static ssize_t
289qla2x00_sysfs_read_vpd(struct kobject *kobj, char *buf, loff_t off, 292qla2x00_sysfs_read_vpd(struct kobject *kobj,
290 size_t count) 293 struct bin_attribute *bin_attr,
294 char *buf, loff_t off, size_t count)
291{ 295{
292 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 296 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
293 struct device, kobj))); 297 struct device, kobj)));
@@ -305,8 +309,9 @@ qla2x00_sysfs_read_vpd(struct kobject *kobj, char *buf, loff_t off,
305} 309}
306 310
307static ssize_t 311static ssize_t
308qla2x00_sysfs_write_vpd(struct kobject *kobj, char *buf, loff_t off, 312qla2x00_sysfs_write_vpd(struct kobject *kobj,
309 size_t count) 313 struct bin_attribute *bin_attr,
314 char *buf, loff_t off, size_t count)
310{ 315{
311 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 316 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
312 struct device, kobj))); 317 struct device, kobj)));
@@ -327,7 +332,6 @@ static struct bin_attribute sysfs_vpd_attr = {
327 .attr = { 332 .attr = {
328 .name = "vpd", 333 .name = "vpd",
329 .mode = S_IRUSR | S_IWUSR, 334 .mode = S_IRUSR | S_IWUSR,
330 .owner = THIS_MODULE,
331 }, 335 },
332 .size = 0, 336 .size = 0,
333 .read = qla2x00_sysfs_read_vpd, 337 .read = qla2x00_sysfs_read_vpd,
@@ -335,8 +339,9 @@ static struct bin_attribute sysfs_vpd_attr = {
335}; 339};
336 340
337static ssize_t 341static ssize_t
338qla2x00_sysfs_read_sfp(struct kobject *kobj, char *buf, loff_t off, 342qla2x00_sysfs_read_sfp(struct kobject *kobj,
339 size_t count) 343 struct bin_attribute *bin_attr,
344 char *buf, loff_t off, size_t count)
340{ 345{
341 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, 346 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
342 struct device, kobj))); 347 struct device, kobj)));
@@ -375,7 +380,6 @@ static struct bin_attribute sysfs_sfp_attr = {
375 .attr = { 380 .attr = {
376 .name = "sfp", 381 .name = "sfp",
377 .mode = S_IRUSR | S_IWUSR, 382 .mode = S_IRUSR | S_IWUSR,
378 .owner = THIS_MODULE,
379 }, 383 },
380 .size = SFP_DEV_SIZE * 2, 384 .size = SFP_DEV_SIZE * 2,
381 .read = qla2x00_sysfs_read_sfp, 385 .read = qla2x00_sysfs_read_sfp,