diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_attr.c | 15 | ||||
-rw-r--r-- | drivers/scsi/ipr.c | 18 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 16 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 12 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 50 |
5 files changed, 69 insertions, 42 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_attr.c b/drivers/scsi/arcmsr/arcmsr_attr.c index 8908228bc134..06c0dce3b839 100644 --- a/drivers/scsi/arcmsr/arcmsr_attr.c +++ b/drivers/scsi/arcmsr/arcmsr_attr.c | |||
@@ -59,8 +59,9 @@ | |||
59 | struct class_device_attribute *arcmsr_host_attrs[]; | 59 | struct class_device_attribute *arcmsr_host_attrs[]; |
60 | 60 | ||
61 | static ssize_t | 61 | static ssize_t |
62 | arcmsr_sysfs_iop_message_read(struct kobject *kobj, char *buf, loff_t off, | 62 | arcmsr_sysfs_iop_message_read(struct kobject *kobj, |
63 | size_t count) | 63 | struct bin_attribute *bin_attr, |
64 | char *buf, loff_t off, size_t count) | ||
64 | { | 65 | { |
65 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 66 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
66 | struct Scsi_Host *host = class_to_shost(cdev); | 67 | struct Scsi_Host *host = class_to_shost(cdev); |
@@ -105,8 +106,9 @@ arcmsr_sysfs_iop_message_read(struct kobject *kobj, char *buf, loff_t off, | |||
105 | } | 106 | } |
106 | 107 | ||
107 | static ssize_t | 108 | static ssize_t |
108 | arcmsr_sysfs_iop_message_write(struct kobject *kobj, char *buf, loff_t off, | 109 | arcmsr_sysfs_iop_message_write(struct kobject *kobj, |
109 | size_t count) | 110 | struct bin_attribute *bin_attr, |
111 | char *buf, loff_t off, size_t count) | ||
110 | { | 112 | { |
111 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 113 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
112 | struct Scsi_Host *host = class_to_shost(cdev); | 114 | struct Scsi_Host *host = class_to_shost(cdev); |
@@ -152,8 +154,9 @@ arcmsr_sysfs_iop_message_write(struct kobject *kobj, char *buf, loff_t off, | |||
152 | } | 154 | } |
153 | 155 | ||
154 | static ssize_t | 156 | static ssize_t |
155 | arcmsr_sysfs_iop_message_clear(struct kobject *kobj, char *buf, loff_t off, | 157 | arcmsr_sysfs_iop_message_clear(struct kobject *kobj, |
156 | size_t count) | 158 | struct bin_attribute *bin_attr, |
159 | char *buf, loff_t off, size_t count) | ||
157 | { | 160 | { |
158 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 161 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
159 | struct Scsi_Host *host = class_to_shost(cdev); | 162 | struct Scsi_Host *host = class_to_shost(cdev); |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index fa6ff295e568..4a3083ea59d5 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -2465,6 +2465,7 @@ restart: | |||
2465 | /** | 2465 | /** |
2466 | * ipr_read_trace - Dump the adapter trace | 2466 | * ipr_read_trace - Dump the adapter trace |
2467 | * @kobj: kobject struct | 2467 | * @kobj: kobject struct |
2468 | * @bin_attr: bin_attribute struct | ||
2468 | * @buf: buffer | 2469 | * @buf: buffer |
2469 | * @off: offset | 2470 | * @off: offset |
2470 | * @count: buffer size | 2471 | * @count: buffer size |
@@ -2472,8 +2473,9 @@ restart: | |||
2472 | * Return value: | 2473 | * Return value: |
2473 | * number of bytes printed to buffer | 2474 | * number of bytes printed to buffer |
2474 | **/ | 2475 | **/ |
2475 | static ssize_t ipr_read_trace(struct kobject *kobj, char *buf, | 2476 | static ssize_t ipr_read_trace(struct kobject *kobj, |
2476 | loff_t off, size_t count) | 2477 | struct bin_attribute *bin_attr, |
2478 | char *buf, loff_t off, size_t count) | ||
2477 | { | 2479 | { |
2478 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 2480 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
2479 | struct Scsi_Host *shost = class_to_shost(cdev); | 2481 | struct Scsi_Host *shost = class_to_shost(cdev); |
@@ -3166,6 +3168,7 @@ static struct class_device_attribute *ipr_ioa_attrs[] = { | |||
3166 | /** | 3168 | /** |
3167 | * ipr_read_dump - Dump the adapter | 3169 | * ipr_read_dump - Dump the adapter |
3168 | * @kobj: kobject struct | 3170 | * @kobj: kobject struct |
3171 | * @bin_attr: bin_attribute struct | ||
3169 | * @buf: buffer | 3172 | * @buf: buffer |
3170 | * @off: offset | 3173 | * @off: offset |
3171 | * @count: buffer size | 3174 | * @count: buffer size |
@@ -3173,8 +3176,9 @@ static struct class_device_attribute *ipr_ioa_attrs[] = { | |||
3173 | * Return value: | 3176 | * Return value: |
3174 | * number of bytes printed to buffer | 3177 | * number of bytes printed to buffer |
3175 | **/ | 3178 | **/ |
3176 | static ssize_t ipr_read_dump(struct kobject *kobj, char *buf, | 3179 | static ssize_t ipr_read_dump(struct kobject *kobj, |
3177 | loff_t off, size_t count) | 3180 | struct bin_attribute *bin_attr, |
3181 | char *buf, loff_t off, size_t count) | ||
3178 | { | 3182 | { |
3179 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 3183 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
3180 | struct Scsi_Host *shost = class_to_shost(cdev); | 3184 | struct Scsi_Host *shost = class_to_shost(cdev); |
@@ -3327,6 +3331,7 @@ static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg) | |||
3327 | /** | 3331 | /** |
3328 | * ipr_write_dump - Setup dump state of adapter | 3332 | * ipr_write_dump - Setup dump state of adapter |
3329 | * @kobj: kobject struct | 3333 | * @kobj: kobject struct |
3334 | * @bin_attr: bin_attribute struct | ||
3330 | * @buf: buffer | 3335 | * @buf: buffer |
3331 | * @off: offset | 3336 | * @off: offset |
3332 | * @count: buffer size | 3337 | * @count: buffer size |
@@ -3334,8 +3339,9 @@ static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg) | |||
3334 | * Return value: | 3339 | * Return value: |
3335 | * number of bytes printed to buffer | 3340 | * number of bytes printed to buffer |
3336 | **/ | 3341 | **/ |
3337 | static ssize_t ipr_write_dump(struct kobject *kobj, char *buf, | 3342 | static ssize_t ipr_write_dump(struct kobject *kobj, |
3338 | loff_t off, size_t count) | 3343 | struct bin_attribute *bin_attr, |
3344 | char *buf, loff_t off, size_t count) | ||
3339 | { | 3345 | { |
3340 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 3346 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
3341 | struct Scsi_Host *shost = class_to_shost(cdev); | 3347 | struct Scsi_Host *shost = class_to_shost(cdev); |
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 578ed79f4148..23e90c5f8f35 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -38,8 +38,10 @@ static int sas_disable_routing(struct domain_device *dev, u8 *sas_addr); | |||
38 | 38 | ||
39 | #if 0 | 39 | #if 0 |
40 | /* FIXME: smp needs to migrate into the sas class */ | 40 | /* FIXME: smp needs to migrate into the sas class */ |
41 | static ssize_t smp_portal_read(struct kobject *, char *, loff_t, size_t); | 41 | static ssize_t smp_portal_read(struct kobject *, struct bin_attribute *, |
42 | static ssize_t smp_portal_write(struct kobject *, char *, loff_t, size_t); | 42 | char *, loff_t, size_t); |
43 | static ssize_t smp_portal_write(struct kobject *, struct bin_attribute *, | ||
44 | char *, loff_t, size_t); | ||
43 | #endif | 45 | #endif |
44 | 46 | ||
45 | /* ---------- SMP task management ---------- */ | 47 | /* ---------- SMP task management ---------- */ |
@@ -1845,8 +1847,9 @@ out: | |||
1845 | #if 0 | 1847 | #if 0 |
1846 | /* ---------- SMP portal ---------- */ | 1848 | /* ---------- SMP portal ---------- */ |
1847 | 1849 | ||
1848 | static ssize_t smp_portal_write(struct kobject *kobj, char *buf, loff_t offs, | 1850 | static ssize_t smp_portal_write(struct kobject *kobj, |
1849 | size_t size) | 1851 | struct bin_attribute *bin_attr, |
1852 | char *buf, loff_t offs, size_t size) | ||
1850 | { | 1853 | { |
1851 | struct domain_device *dev = to_dom_device(kobj); | 1854 | struct domain_device *dev = to_dom_device(kobj); |
1852 | struct expander_device *ex = &dev->ex_dev; | 1855 | struct expander_device *ex = &dev->ex_dev; |
@@ -1872,8 +1875,9 @@ static ssize_t smp_portal_write(struct kobject *kobj, char *buf, loff_t offs, | |||
1872 | return size; | 1875 | return size; |
1873 | } | 1876 | } |
1874 | 1877 | ||
1875 | static ssize_t smp_portal_read(struct kobject *kobj, char *buf, loff_t offs, | 1878 | static ssize_t smp_portal_read(struct kobject *kobj, |
1876 | size_t size) | 1879 | struct bin_attribute *bin_attr, |
1880 | char *buf, loff_t offs, size_t size) | ||
1877 | { | 1881 | { |
1878 | struct domain_device *dev = to_dom_device(kobj); | 1882 | struct domain_device *dev = to_dom_device(kobj); |
1879 | struct expander_device *ex = &dev->ex_dev; | 1883 | struct expander_device *ex = &dev->ex_dev; |
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index f81fe501a4a1..5dfda9778c80 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -1133,7 +1133,8 @@ struct class_device_attribute *lpfc_host_attrs[] = { | |||
1133 | }; | 1133 | }; |
1134 | 1134 | ||
1135 | static ssize_t | 1135 | static ssize_t |
1136 | sysfs_ctlreg_write(struct kobject *kobj, char *buf, loff_t off, size_t count) | 1136 | sysfs_ctlreg_write(struct kobject *kobj, struct bin_attribute *bin_attr, |
1137 | char *buf, loff_t off, size_t count) | ||
1137 | { | 1138 | { |
1138 | size_t buf_off; | 1139 | size_t buf_off; |
1139 | struct Scsi_Host *host = class_to_shost(container_of(kobj, | 1140 | struct Scsi_Host *host = class_to_shost(container_of(kobj, |
@@ -1165,7 +1166,8 @@ sysfs_ctlreg_write(struct kobject *kobj, char *buf, loff_t off, size_t count) | |||
1165 | } | 1166 | } |
1166 | 1167 | ||
1167 | static ssize_t | 1168 | static ssize_t |
1168 | sysfs_ctlreg_read(struct kobject *kobj, char *buf, loff_t off, size_t count) | 1169 | sysfs_ctlreg_read(struct kobject *kobj, struct bin_attribute *bin_attr, |
1170 | char *buf, loff_t off, size_t count) | ||
1169 | { | 1171 | { |
1170 | size_t buf_off; | 1172 | size_t buf_off; |
1171 | uint32_t * tmp_ptr; | 1173 | uint32_t * tmp_ptr; |
@@ -1221,7 +1223,8 @@ sysfs_mbox_idle (struct lpfc_hba * phba) | |||
1221 | } | 1223 | } |
1222 | 1224 | ||
1223 | static ssize_t | 1225 | static ssize_t |
1224 | sysfs_mbox_write(struct kobject *kobj, char *buf, loff_t off, size_t count) | 1226 | sysfs_mbox_write(struct kobject *kobj, struct bin_attribute *bin_attr, |
1227 | char *buf, loff_t off, size_t count) | ||
1225 | { | 1228 | { |
1226 | struct Scsi_Host * host = | 1229 | struct Scsi_Host * host = |
1227 | class_to_shost(container_of(kobj, struct class_device, kobj)); | 1230 | class_to_shost(container_of(kobj, struct class_device, kobj)); |
@@ -1273,7 +1276,8 @@ sysfs_mbox_write(struct kobject *kobj, char *buf, loff_t off, size_t count) | |||
1273 | } | 1276 | } |
1274 | 1277 | ||
1275 | static ssize_t | 1278 | static ssize_t |
1276 | sysfs_mbox_read(struct kobject *kobj, char *buf, loff_t off, size_t count) | 1279 | sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr, |
1280 | char *buf, loff_t off, size_t count) | ||
1277 | { | 1281 | { |
1278 | struct Scsi_Host *host = | 1282 | struct Scsi_Host *host = |
1279 | class_to_shost(container_of(kobj, struct class_device, | 1283 | class_to_shost(container_of(kobj, struct class_device, |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 96587253bfa9..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 | ||
13 | static ssize_t | 13 | static ssize_t |
14 | qla2x00_sysfs_read_fw_dump(struct kobject *kobj, char *buf, loff_t off, | 14 | qla2x00_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 | ||
33 | static ssize_t | 34 | static ssize_t |
34 | qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off, | 35 | qla2x00_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))); |
@@ -80,8 +82,9 @@ static struct bin_attribute sysfs_fw_dump_attr = { | |||
80 | }; | 82 | }; |
81 | 83 | ||
82 | static ssize_t | 84 | static ssize_t |
83 | qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off, | 85 | qla2x00_sysfs_read_nvram(struct kobject *kobj, |
84 | size_t count) | 86 | struct bin_attribute *bin_attr, |
87 | char *buf, loff_t off, size_t count) | ||
85 | { | 88 | { |
86 | 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, |
87 | struct device, kobj))); | 90 | struct device, kobj))); |
@@ -100,8 +103,9 @@ qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off, | |||
100 | } | 103 | } |
101 | 104 | ||
102 | static ssize_t | 105 | static ssize_t |
103 | qla2x00_sysfs_write_nvram(struct kobject *kobj, char *buf, loff_t off, | 106 | qla2x00_sysfs_write_nvram(struct kobject *kobj, |
104 | size_t count) | 107 | struct bin_attribute *bin_attr, |
108 | char *buf, loff_t off, size_t count) | ||
105 | { | 109 | { |
106 | 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, |
107 | struct device, kobj))); | 111 | struct device, kobj))); |
@@ -155,8 +159,9 @@ static struct bin_attribute sysfs_nvram_attr = { | |||
155 | }; | 159 | }; |
156 | 160 | ||
157 | static ssize_t | 161 | static ssize_t |
158 | qla2x00_sysfs_read_optrom(struct kobject *kobj, char *buf, loff_t off, | 162 | qla2x00_sysfs_read_optrom(struct kobject *kobj, |
159 | size_t count) | 163 | struct bin_attribute *bin_attr, |
164 | char *buf, loff_t off, size_t count) | ||
160 | { | 165 | { |
161 | 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, |
162 | struct device, kobj))); | 167 | struct device, kobj))); |
@@ -174,8 +179,9 @@ qla2x00_sysfs_read_optrom(struct kobject *kobj, char *buf, loff_t off, | |||
174 | } | 179 | } |
175 | 180 | ||
176 | static ssize_t | 181 | static ssize_t |
177 | qla2x00_sysfs_write_optrom(struct kobject *kobj, char *buf, loff_t off, | 182 | qla2x00_sysfs_write_optrom(struct kobject *kobj, |
178 | size_t count) | 183 | struct bin_attribute *bin_attr, |
184 | char *buf, loff_t off, size_t count) | ||
179 | { | 185 | { |
180 | 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, |
181 | struct device, kobj))); | 187 | struct device, kobj))); |
@@ -203,8 +209,9 @@ static struct bin_attribute sysfs_optrom_attr = { | |||
203 | }; | 209 | }; |
204 | 210 | ||
205 | static ssize_t | 211 | static ssize_t |
206 | qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj, char *buf, loff_t off, | 212 | qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj, |
207 | size_t count) | 213 | struct bin_attribute *bin_attr, |
214 | char *buf, loff_t off, size_t count) | ||
208 | { | 215 | { |
209 | 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, |
210 | struct device, kobj))); | 217 | struct device, kobj))); |
@@ -282,8 +289,9 @@ static struct bin_attribute sysfs_optrom_ctl_attr = { | |||
282 | }; | 289 | }; |
283 | 290 | ||
284 | static ssize_t | 291 | static ssize_t |
285 | qla2x00_sysfs_read_vpd(struct kobject *kobj, char *buf, loff_t off, | 292 | qla2x00_sysfs_read_vpd(struct kobject *kobj, |
286 | size_t count) | 293 | struct bin_attribute *bin_attr, |
294 | char *buf, loff_t off, size_t count) | ||
287 | { | 295 | { |
288 | 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, |
289 | struct device, kobj))); | 297 | struct device, kobj))); |
@@ -301,8 +309,9 @@ qla2x00_sysfs_read_vpd(struct kobject *kobj, char *buf, loff_t off, | |||
301 | } | 309 | } |
302 | 310 | ||
303 | static ssize_t | 311 | static ssize_t |
304 | qla2x00_sysfs_write_vpd(struct kobject *kobj, char *buf, loff_t off, | 312 | qla2x00_sysfs_write_vpd(struct kobject *kobj, |
305 | size_t count) | 313 | struct bin_attribute *bin_attr, |
314 | char *buf, loff_t off, size_t count) | ||
306 | { | 315 | { |
307 | 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, |
308 | struct device, kobj))); | 317 | struct device, kobj))); |
@@ -330,8 +339,9 @@ static struct bin_attribute sysfs_vpd_attr = { | |||
330 | }; | 339 | }; |
331 | 340 | ||
332 | static ssize_t | 341 | static ssize_t |
333 | qla2x00_sysfs_read_sfp(struct kobject *kobj, char *buf, loff_t off, | 342 | qla2x00_sysfs_read_sfp(struct kobject *kobj, |
334 | size_t count) | 343 | struct bin_attribute *bin_attr, |
344 | char *buf, loff_t off, size_t count) | ||
335 | { | 345 | { |
336 | 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, |
337 | struct device, kobj))); | 347 | struct device, kobj))); |