diff options
Diffstat (limited to 'drivers/s390')
26 files changed, 384 insertions, 611 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 1aedc48e5f85..d948566bb24a 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -615,7 +615,7 @@ dasd_device_from_cdev(struct ccw_device *cdev) | |||
615 | * readonly controls the readonly status of a dasd | 615 | * readonly controls the readonly status of a dasd |
616 | */ | 616 | */ |
617 | static ssize_t | 617 | static ssize_t |
618 | dasd_ro_show(struct device *dev, char *buf) | 618 | dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf) |
619 | { | 619 | { |
620 | struct dasd_devmap *devmap; | 620 | struct dasd_devmap *devmap; |
621 | int ro_flag; | 621 | int ro_flag; |
@@ -629,7 +629,7 @@ dasd_ro_show(struct device *dev, char *buf) | |||
629 | } | 629 | } |
630 | 630 | ||
631 | static ssize_t | 631 | static ssize_t |
632 | dasd_ro_store(struct device *dev, const char *buf, size_t count) | 632 | dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
633 | { | 633 | { |
634 | struct dasd_devmap *devmap; | 634 | struct dasd_devmap *devmap; |
635 | int ro_flag; | 635 | int ro_flag; |
@@ -656,7 +656,7 @@ static DEVICE_ATTR(readonly, 0644, dasd_ro_show, dasd_ro_store); | |||
656 | * to talk to the device | 656 | * to talk to the device |
657 | */ | 657 | */ |
658 | static ssize_t | 658 | static ssize_t |
659 | dasd_use_diag_show(struct device *dev, char *buf) | 659 | dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) |
660 | { | 660 | { |
661 | struct dasd_devmap *devmap; | 661 | struct dasd_devmap *devmap; |
662 | int use_diag; | 662 | int use_diag; |
@@ -670,7 +670,7 @@ dasd_use_diag_show(struct device *dev, char *buf) | |||
670 | } | 670 | } |
671 | 671 | ||
672 | static ssize_t | 672 | static ssize_t |
673 | dasd_use_diag_store(struct device *dev, const char *buf, size_t count) | 673 | dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
674 | { | 674 | { |
675 | struct dasd_devmap *devmap; | 675 | struct dasd_devmap *devmap; |
676 | ssize_t rc; | 676 | ssize_t rc; |
@@ -698,7 +698,7 @@ static | |||
698 | DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); | 698 | DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); |
699 | 699 | ||
700 | static ssize_t | 700 | static ssize_t |
701 | dasd_discipline_show(struct device *dev, char *buf) | 701 | dasd_discipline_show(struct device *dev, struct device_attribute *attr, char *buf) |
702 | { | 702 | { |
703 | struct dasd_devmap *devmap; | 703 | struct dasd_devmap *devmap; |
704 | char *dname; | 704 | char *dname; |
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index a66b17b65296..16ab8d363ac6 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -45,16 +45,16 @@ static struct block_device_operations dcssblk_devops = { | |||
45 | .release = dcssblk_release, | 45 | .release = dcssblk_release, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | static ssize_t dcssblk_add_store(struct device * dev, const char * buf, | 48 | static ssize_t dcssblk_add_store(struct device * dev, struct device_attribute *attr, const char * buf, |
49 | size_t count); | 49 | size_t count); |
50 | static ssize_t dcssblk_remove_store(struct device * dev, const char * buf, | 50 | static ssize_t dcssblk_remove_store(struct device * dev, struct device_attribute *attr, const char * buf, |
51 | size_t count); | 51 | size_t count); |
52 | static ssize_t dcssblk_save_store(struct device * dev, const char * buf, | 52 | static ssize_t dcssblk_save_store(struct device * dev, struct device_attribute *attr, const char * buf, |
53 | size_t count); | 53 | size_t count); |
54 | static ssize_t dcssblk_save_show(struct device *dev, char *buf); | 54 | static ssize_t dcssblk_save_show(struct device *dev, struct device_attribute *attr, char *buf); |
55 | static ssize_t dcssblk_shared_store(struct device * dev, const char * buf, | 55 | static ssize_t dcssblk_shared_store(struct device * dev, struct device_attribute *attr, const char * buf, |
56 | size_t count); | 56 | size_t count); |
57 | static ssize_t dcssblk_shared_show(struct device *dev, char *buf); | 57 | static ssize_t dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf); |
58 | 58 | ||
59 | static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store); | 59 | static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store); |
60 | static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store); | 60 | static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store); |
@@ -195,7 +195,7 @@ dcssblk_segment_warn(int rc, char* seg_name) | |||
195 | * operation (show + store) | 195 | * operation (show + store) |
196 | */ | 196 | */ |
197 | static ssize_t | 197 | static ssize_t |
198 | dcssblk_shared_show(struct device *dev, char *buf) | 198 | dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf) |
199 | { | 199 | { |
200 | struct dcssblk_dev_info *dev_info; | 200 | struct dcssblk_dev_info *dev_info; |
201 | 201 | ||
@@ -204,7 +204,7 @@ dcssblk_shared_show(struct device *dev, char *buf) | |||
204 | } | 204 | } |
205 | 205 | ||
206 | static ssize_t | 206 | static ssize_t |
207 | dcssblk_shared_store(struct device *dev, const char *inbuf, size_t count) | 207 | dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const char *inbuf, size_t count) |
208 | { | 208 | { |
209 | struct dcssblk_dev_info *dev_info; | 209 | struct dcssblk_dev_info *dev_info; |
210 | int rc; | 210 | int rc; |
@@ -288,7 +288,7 @@ out: | |||
288 | * (show + store) | 288 | * (show + store) |
289 | */ | 289 | */ |
290 | static ssize_t | 290 | static ssize_t |
291 | dcssblk_save_show(struct device *dev, char *buf) | 291 | dcssblk_save_show(struct device *dev, struct device_attribute *attr, char *buf) |
292 | { | 292 | { |
293 | struct dcssblk_dev_info *dev_info; | 293 | struct dcssblk_dev_info *dev_info; |
294 | 294 | ||
@@ -297,7 +297,7 @@ dcssblk_save_show(struct device *dev, char *buf) | |||
297 | } | 297 | } |
298 | 298 | ||
299 | static ssize_t | 299 | static ssize_t |
300 | dcssblk_save_store(struct device *dev, const char *inbuf, size_t count) | 300 | dcssblk_save_store(struct device *dev, struct device_attribute *attr, const char *inbuf, size_t count) |
301 | { | 301 | { |
302 | struct dcssblk_dev_info *dev_info; | 302 | struct dcssblk_dev_info *dev_info; |
303 | 303 | ||
@@ -343,7 +343,7 @@ dcssblk_save_store(struct device *dev, const char *inbuf, size_t count) | |||
343 | * device attribute for adding devices | 343 | * device attribute for adding devices |
344 | */ | 344 | */ |
345 | static ssize_t | 345 | static ssize_t |
346 | dcssblk_add_store(struct device *dev, const char *buf, size_t count) | 346 | dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
347 | { | 347 | { |
348 | int rc, i; | 348 | int rc, i; |
349 | struct dcssblk_dev_info *dev_info; | 349 | struct dcssblk_dev_info *dev_info; |
@@ -517,7 +517,7 @@ out_nobuf: | |||
517 | * device attribute for removing devices | 517 | * device attribute for removing devices |
518 | */ | 518 | */ |
519 | static ssize_t | 519 | static ssize_t |
520 | dcssblk_remove_store(struct device *dev, const char *buf, size_t count) | 520 | dcssblk_remove_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
521 | { | 521 | { |
522 | struct dcssblk_dev_info *dev_info; | 522 | struct dcssblk_dev_info *dev_info; |
523 | int rc, i; | 523 | int rc, i; |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 8e16a9716686..d5eefeaba50c 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -1084,7 +1084,7 @@ raw3270_probe (struct ccw_device *cdev) | |||
1084 | * Additional attributes for a 3270 device | 1084 | * Additional attributes for a 3270 device |
1085 | */ | 1085 | */ |
1086 | static ssize_t | 1086 | static ssize_t |
1087 | raw3270_model_show(struct device *dev, char *buf) | 1087 | raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) |
1088 | { | 1088 | { |
1089 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1089 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1090 | ((struct raw3270 *) dev->driver_data)->model); | 1090 | ((struct raw3270 *) dev->driver_data)->model); |
@@ -1092,7 +1092,7 @@ raw3270_model_show(struct device *dev, char *buf) | |||
1092 | static DEVICE_ATTR(model, 0444, raw3270_model_show, 0); | 1092 | static DEVICE_ATTR(model, 0444, raw3270_model_show, 0); |
1093 | 1093 | ||
1094 | static ssize_t | 1094 | static ssize_t |
1095 | raw3270_rows_show(struct device *dev, char *buf) | 1095 | raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) |
1096 | { | 1096 | { |
1097 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1097 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1098 | ((struct raw3270 *) dev->driver_data)->rows); | 1098 | ((struct raw3270 *) dev->driver_data)->rows); |
@@ -1100,7 +1100,7 @@ raw3270_rows_show(struct device *dev, char *buf) | |||
1100 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, 0); | 1100 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, 0); |
1101 | 1101 | ||
1102 | static ssize_t | 1102 | static ssize_t |
1103 | raw3270_columns_show(struct device *dev, char *buf) | 1103 | raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) |
1104 | { | 1104 | { |
1105 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1105 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1106 | ((struct raw3270 *) dev->driver_data)->cols); | 1106 | ((struct raw3270 *) dev->driver_data)->cols); |
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index 0f8ffd4167ca..ed0cb1f15b4c 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
@@ -16,7 +16,7 @@ MODULE_DESCRIPTION( | |||
16 | ); | 16 | ); |
17 | MODULE_LICENSE("GPL"); | 17 | MODULE_LICENSE("GPL"); |
18 | 18 | ||
19 | struct class_simple *tape_class; | 19 | static struct class *tape_class; |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Register a tape device and return a pointer to the cdev structure. | 22 | * Register a tape device and return a pointer to the cdev structure. |
@@ -70,7 +70,7 @@ struct tape_class_device *register_tape_dev( | |||
70 | if (rc) | 70 | if (rc) |
71 | goto fail_with_cdev; | 71 | goto fail_with_cdev; |
72 | 72 | ||
73 | tcd->class_device = class_simple_device_add( | 73 | tcd->class_device = class_device_create( |
74 | tape_class, | 74 | tape_class, |
75 | tcd->char_device->dev, | 75 | tcd->char_device->dev, |
76 | device, | 76 | device, |
@@ -101,7 +101,7 @@ void unregister_tape_dev(struct tape_class_device *tcd) | |||
101 | &tcd->class_device->dev->kobj, | 101 | &tcd->class_device->dev->kobj, |
102 | tcd->mode_name | 102 | tcd->mode_name |
103 | ); | 103 | ); |
104 | class_simple_device_remove(tcd->char_device->dev); | 104 | class_device_destroy(tape_class, tcd->char_device->dev); |
105 | cdev_del(tcd->char_device); | 105 | cdev_del(tcd->char_device); |
106 | kfree(tcd); | 106 | kfree(tcd); |
107 | } | 107 | } |
@@ -111,14 +111,14 @@ EXPORT_SYMBOL(unregister_tape_dev); | |||
111 | 111 | ||
112 | static int __init tape_init(void) | 112 | static int __init tape_init(void) |
113 | { | 113 | { |
114 | tape_class = class_simple_create(THIS_MODULE, "tape390"); | 114 | tape_class = class_create(THIS_MODULE, "tape390"); |
115 | 115 | ||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | static void __exit tape_exit(void) | 119 | static void __exit tape_exit(void) |
120 | { | 120 | { |
121 | class_simple_destroy(tape_class); | 121 | class_destroy(tape_class); |
122 | tape_class = NULL; | 122 | tape_class = NULL; |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index e51046ab8adc..b4df4a515b12 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -107,7 +107,7 @@ busid_to_int(char *bus_id) | |||
107 | * replaced by a link to the cdev tree. | 107 | * replaced by a link to the cdev tree. |
108 | */ | 108 | */ |
109 | static ssize_t | 109 | static ssize_t |
110 | tape_medium_state_show(struct device *dev, char *buf) | 110 | tape_medium_state_show(struct device *dev, struct device_attribute *attr, char *buf) |
111 | { | 111 | { |
112 | struct tape_device *tdev; | 112 | struct tape_device *tdev; |
113 | 113 | ||
@@ -119,7 +119,7 @@ static | |||
119 | DEVICE_ATTR(medium_state, 0444, tape_medium_state_show, NULL); | 119 | DEVICE_ATTR(medium_state, 0444, tape_medium_state_show, NULL); |
120 | 120 | ||
121 | static ssize_t | 121 | static ssize_t |
122 | tape_first_minor_show(struct device *dev, char *buf) | 122 | tape_first_minor_show(struct device *dev, struct device_attribute *attr, char *buf) |
123 | { | 123 | { |
124 | struct tape_device *tdev; | 124 | struct tape_device *tdev; |
125 | 125 | ||
@@ -131,7 +131,7 @@ static | |||
131 | DEVICE_ATTR(first_minor, 0444, tape_first_minor_show, NULL); | 131 | DEVICE_ATTR(first_minor, 0444, tape_first_minor_show, NULL); |
132 | 132 | ||
133 | static ssize_t | 133 | static ssize_t |
134 | tape_state_show(struct device *dev, char *buf) | 134 | tape_state_show(struct device *dev, struct device_attribute *attr, char *buf) |
135 | { | 135 | { |
136 | struct tape_device *tdev; | 136 | struct tape_device *tdev; |
137 | 137 | ||
@@ -144,7 +144,7 @@ static | |||
144 | DEVICE_ATTR(state, 0444, tape_state_show, NULL); | 144 | DEVICE_ATTR(state, 0444, tape_state_show, NULL); |
145 | 145 | ||
146 | static ssize_t | 146 | static ssize_t |
147 | tape_operation_show(struct device *dev, char *buf) | 147 | tape_operation_show(struct device *dev, struct device_attribute *attr, char *buf) |
148 | { | 148 | { |
149 | struct tape_device *tdev; | 149 | struct tape_device *tdev; |
150 | ssize_t rc; | 150 | ssize_t rc; |
@@ -171,7 +171,7 @@ static | |||
171 | DEVICE_ATTR(operation, 0444, tape_operation_show, NULL); | 171 | DEVICE_ATTR(operation, 0444, tape_operation_show, NULL); |
172 | 172 | ||
173 | static ssize_t | 173 | static ssize_t |
174 | tape_blocksize_show(struct device *dev, char *buf) | 174 | tape_blocksize_show(struct device *dev, struct device_attribute *attr, char *buf) |
175 | { | 175 | { |
176 | struct tape_device *tdev; | 176 | struct tape_device *tdev; |
177 | 177 | ||
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index edf50d2bd10b..f7717327d15e 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -548,7 +548,7 @@ vmlogrdr_read (struct file *filp, char *data, size_t count, loff_t * ppos) | |||
548 | } | 548 | } |
549 | 549 | ||
550 | static ssize_t | 550 | static ssize_t |
551 | vmlogrdr_autopurge_store(struct device * dev, const char * buf, size_t count) { | 551 | vmlogrdr_autopurge_store(struct device * dev, struct device_attribute *attr, const char * buf, size_t count) { |
552 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 552 | struct vmlogrdr_priv_t *priv = dev->driver_data; |
553 | ssize_t ret = count; | 553 | ssize_t ret = count; |
554 | 554 | ||
@@ -567,7 +567,7 @@ vmlogrdr_autopurge_store(struct device * dev, const char * buf, size_t count) { | |||
567 | 567 | ||
568 | 568 | ||
569 | static ssize_t | 569 | static ssize_t |
570 | vmlogrdr_autopurge_show(struct device *dev, char *buf) { | 570 | vmlogrdr_autopurge_show(struct device *dev, struct device_attribute *attr, char *buf) { |
571 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 571 | struct vmlogrdr_priv_t *priv = dev->driver_data; |
572 | return sprintf(buf, "%u\n", priv->autopurge); | 572 | return sprintf(buf, "%u\n", priv->autopurge); |
573 | } | 573 | } |
@@ -578,7 +578,7 @@ static DEVICE_ATTR(autopurge, 0644, vmlogrdr_autopurge_show, | |||
578 | 578 | ||
579 | 579 | ||
580 | static ssize_t | 580 | static ssize_t |
581 | vmlogrdr_purge_store(struct device * dev, const char * buf, size_t count) { | 581 | vmlogrdr_purge_store(struct device * dev, struct device_attribute *attr, const char * buf, size_t count) { |
582 | 582 | ||
583 | char cp_command[80]; | 583 | char cp_command[80]; |
584 | char cp_response[80]; | 584 | char cp_response[80]; |
@@ -619,7 +619,7 @@ static DEVICE_ATTR(purge, 0200, NULL, vmlogrdr_purge_store); | |||
619 | 619 | ||
620 | 620 | ||
621 | static ssize_t | 621 | static ssize_t |
622 | vmlogrdr_autorecording_store(struct device *dev, const char *buf, | 622 | vmlogrdr_autorecording_store(struct device *dev, struct device_attribute *attr, const char *buf, |
623 | size_t count) { | 623 | size_t count) { |
624 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 624 | struct vmlogrdr_priv_t *priv = dev->driver_data; |
625 | ssize_t ret = count; | 625 | ssize_t ret = count; |
@@ -639,7 +639,7 @@ vmlogrdr_autorecording_store(struct device *dev, const char *buf, | |||
639 | 639 | ||
640 | 640 | ||
641 | static ssize_t | 641 | static ssize_t |
642 | vmlogrdr_autorecording_show(struct device *dev, char *buf) { | 642 | vmlogrdr_autorecording_show(struct device *dev, struct device_attribute *attr, char *buf) { |
643 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 643 | struct vmlogrdr_priv_t *priv = dev->driver_data; |
644 | return sprintf(buf, "%u\n", priv->autorecording); | 644 | return sprintf(buf, "%u\n", priv->autorecording); |
645 | } | 645 | } |
@@ -650,7 +650,7 @@ static DEVICE_ATTR(autorecording, 0644, vmlogrdr_autorecording_show, | |||
650 | 650 | ||
651 | 651 | ||
652 | static ssize_t | 652 | static ssize_t |
653 | vmlogrdr_recording_store(struct device * dev, const char * buf, size_t count) { | 653 | vmlogrdr_recording_store(struct device * dev, struct device_attribute *attr, const char * buf, size_t count) { |
654 | 654 | ||
655 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 655 | struct vmlogrdr_priv_t *priv = dev->driver_data; |
656 | ssize_t ret; | 656 | ssize_t ret; |
@@ -703,7 +703,7 @@ static struct attribute_group vmlogrdr_attr_group = { | |||
703 | .attrs = vmlogrdr_attrs, | 703 | .attrs = vmlogrdr_attrs, |
704 | }; | 704 | }; |
705 | 705 | ||
706 | static struct class_simple *vmlogrdr_class; | 706 | static struct class *vmlogrdr_class; |
707 | static struct device_driver vmlogrdr_driver = { | 707 | static struct device_driver vmlogrdr_driver = { |
708 | .name = "vmlogrdr", | 708 | .name = "vmlogrdr", |
709 | .bus = &iucv_bus, | 709 | .bus = &iucv_bus, |
@@ -727,7 +727,7 @@ vmlogrdr_register_driver(void) { | |||
727 | goto unregdriver; | 727 | goto unregdriver; |
728 | } | 728 | } |
729 | 729 | ||
730 | vmlogrdr_class = class_simple_create(THIS_MODULE, "vmlogrdr"); | 730 | vmlogrdr_class = class_create(THIS_MODULE, "vmlogrdr"); |
731 | if (IS_ERR(vmlogrdr_class)) { | 731 | if (IS_ERR(vmlogrdr_class)) { |
732 | printk(KERN_ERR "vmlogrdr: failed to create class.\n"); | 732 | printk(KERN_ERR "vmlogrdr: failed to create class.\n"); |
733 | ret=PTR_ERR(vmlogrdr_class); | 733 | ret=PTR_ERR(vmlogrdr_class); |
@@ -746,7 +746,7 @@ unregdriver: | |||
746 | 746 | ||
747 | static void | 747 | static void |
748 | vmlogrdr_unregister_driver(void) { | 748 | vmlogrdr_unregister_driver(void) { |
749 | class_simple_destroy(vmlogrdr_class); | 749 | class_destroy(vmlogrdr_class); |
750 | vmlogrdr_class = NULL; | 750 | vmlogrdr_class = NULL; |
751 | driver_remove_file(&vmlogrdr_driver, &driver_attr_recording_status); | 751 | driver_remove_file(&vmlogrdr_driver, &driver_attr_recording_status); |
752 | driver_unregister(&vmlogrdr_driver); | 752 | driver_unregister(&vmlogrdr_driver); |
@@ -786,7 +786,7 @@ vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) { | |||
786 | device_unregister(dev); | 786 | device_unregister(dev); |
787 | return ret; | 787 | return ret; |
788 | } | 788 | } |
789 | priv->class_device = class_simple_device_add( | 789 | priv->class_device = class_device_create( |
790 | vmlogrdr_class, | 790 | vmlogrdr_class, |
791 | MKDEV(vmlogrdr_major, priv->minor_num), | 791 | MKDEV(vmlogrdr_major, priv->minor_num), |
792 | dev, | 792 | dev, |
@@ -806,7 +806,7 @@ vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) { | |||
806 | 806 | ||
807 | static int | 807 | static int |
808 | vmlogrdr_unregister_device(struct vmlogrdr_priv_t *priv ) { | 808 | vmlogrdr_unregister_device(struct vmlogrdr_priv_t *priv ) { |
809 | class_simple_device_remove(MKDEV(vmlogrdr_major, priv->minor_num)); | 809 | class_device_destroy(vmlogrdr_class, MKDEV(vmlogrdr_major, priv->minor_num)); |
810 | if (priv->device != NULL) { | 810 | if (priv->device != NULL) { |
811 | sysfs_remove_group(&priv->device->kobj, &vmlogrdr_attr_group); | 811 | sysfs_remove_group(&priv->device->kobj, &vmlogrdr_attr_group); |
812 | device_unregister(priv->device); | 812 | device_unregister(priv->device); |
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 4a06c7d0e5e4..aac83ce6469c 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/s390/cio/blacklist.c | 2 | * drivers/s390/cio/blacklist.c |
3 | * S/390 common I/O routines -- blacklisting of specific devices | 3 | * S/390 common I/O routines -- blacklisting of specific devices |
4 | * $Revision: 1.33 $ | 4 | * $Revision: 1.34 $ |
5 | * | 5 | * |
6 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, |
7 | * IBM Corporation | 7 | * IBM Corporation |
@@ -289,7 +289,7 @@ static int cio_ignore_read (char *page, char **start, off_t off, | |||
289 | len = 0; | 289 | len = 0; |
290 | for (devno = off; /* abuse the page variable | 290 | for (devno = off; /* abuse the page variable |
291 | * as counter, see fs/proc/generic.c */ | 291 | * as counter, see fs/proc/generic.c */ |
292 | devno <= __MAX_SUBCHANNELS && len + entry_size < count; devno++) { | 292 | devno < __MAX_SUBCHANNELS && len + entry_size < count; devno++) { |
293 | if (!test_bit(devno, bl_dev)) | 293 | if (!test_bit(devno, bl_dev)) |
294 | continue; | 294 | continue; |
295 | len += sprintf(page + len, "0.0.%04lx", devno); | 295 | len += sprintf(page + len, "0.0.%04lx", devno); |
@@ -302,7 +302,7 @@ static int cio_ignore_read (char *page, char **start, off_t off, | |||
302 | len += sprintf(page + len, "\n"); | 302 | len += sprintf(page + len, "\n"); |
303 | } | 303 | } |
304 | 304 | ||
305 | if (devno <= __MAX_SUBCHANNELS) | 305 | if (devno < __MAX_SUBCHANNELS) |
306 | *eof = 1; | 306 | *eof = 1; |
307 | *start = (char *) (devno - off); /* number of checked entries */ | 307 | *start = (char *) (devno - off); /* number of checked entries */ |
308 | return len; | 308 | return len; |
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 21a75ee28b80..306525acb9f8 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -77,7 +77,7 @@ __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev) | |||
77 | * longer needed or accidentially created. Saves memory :) | 77 | * longer needed or accidentially created. Saves memory :) |
78 | */ | 78 | */ |
79 | static ssize_t | 79 | static ssize_t |
80 | ccwgroup_ungroup_store(struct device *dev, const char *buf, size_t count) | 80 | ccwgroup_ungroup_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
81 | { | 81 | { |
82 | struct ccwgroup_device *gdev; | 82 | struct ccwgroup_device *gdev; |
83 | 83 | ||
@@ -310,7 +310,7 @@ ccwgroup_set_offline(struct ccwgroup_device *gdev) | |||
310 | } | 310 | } |
311 | 311 | ||
312 | static ssize_t | 312 | static ssize_t |
313 | ccwgroup_online_store (struct device *dev, const char *buf, size_t count) | 313 | ccwgroup_online_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
314 | { | 314 | { |
315 | struct ccwgroup_device *gdev; | 315 | struct ccwgroup_device *gdev; |
316 | struct ccwgroup_driver *gdrv; | 316 | struct ccwgroup_driver *gdrv; |
@@ -338,7 +338,7 @@ ccwgroup_online_store (struct device *dev, const char *buf, size_t count) | |||
338 | } | 338 | } |
339 | 339 | ||
340 | static ssize_t | 340 | static ssize_t |
341 | ccwgroup_online_show (struct device *dev, char *buf) | 341 | ccwgroup_online_show (struct device *dev, struct device_attribute *attr, char *buf) |
342 | { | 342 | { |
343 | int online; | 343 | int online; |
344 | 344 | ||
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index b35fe12e6bfc..b86f94ecd874 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -852,7 +852,7 @@ out: | |||
852 | * Files for the channel path entries. | 852 | * Files for the channel path entries. |
853 | */ | 853 | */ |
854 | static ssize_t | 854 | static ssize_t |
855 | chp_status_show(struct device *dev, char *buf) | 855 | chp_status_show(struct device *dev, struct device_attribute *attr, char *buf) |
856 | { | 856 | { |
857 | struct channel_path *chp = container_of(dev, struct channel_path, dev); | 857 | struct channel_path *chp = container_of(dev, struct channel_path, dev); |
858 | 858 | ||
@@ -863,7 +863,7 @@ chp_status_show(struct device *dev, char *buf) | |||
863 | } | 863 | } |
864 | 864 | ||
865 | static ssize_t | 865 | static ssize_t |
866 | chp_status_write(struct device *dev, const char *buf, size_t count) | 866 | chp_status_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
867 | { | 867 | { |
868 | struct channel_path *cp = container_of(dev, struct channel_path, dev); | 868 | struct channel_path *cp = container_of(dev, struct channel_path, dev); |
869 | char cmd[10]; | 869 | char cmd[10]; |
@@ -888,7 +888,7 @@ chp_status_write(struct device *dev, const char *buf, size_t count) | |||
888 | static DEVICE_ATTR(status, 0644, chp_status_show, chp_status_write); | 888 | static DEVICE_ATTR(status, 0644, chp_status_show, chp_status_write); |
889 | 889 | ||
890 | static ssize_t | 890 | static ssize_t |
891 | chp_type_show(struct device *dev, char *buf) | 891 | chp_type_show(struct device *dev, struct device_attribute *attr, char *buf) |
892 | { | 892 | { |
893 | struct channel_path *chp = container_of(dev, struct channel_path, dev); | 893 | struct channel_path *chp = container_of(dev, struct channel_path, dev); |
894 | 894 | ||
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 49def26ba383..8cc4f1a940dc 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c | |||
@@ -796,7 +796,7 @@ cmb_show_attr(struct device *dev, char *buf, enum cmb_index idx) | |||
796 | } | 796 | } |
797 | 797 | ||
798 | static ssize_t | 798 | static ssize_t |
799 | cmb_show_avg_sample_interval(struct device *dev, char *buf) | 799 | cmb_show_avg_sample_interval(struct device *dev, struct device_attribute *attr, char *buf) |
800 | { | 800 | { |
801 | struct ccw_device *cdev; | 801 | struct ccw_device *cdev; |
802 | long interval; | 802 | long interval; |
@@ -813,7 +813,7 @@ cmb_show_avg_sample_interval(struct device *dev, char *buf) | |||
813 | } | 813 | } |
814 | 814 | ||
815 | static ssize_t | 815 | static ssize_t |
816 | cmb_show_avg_utilization(struct device *dev, char *buf) | 816 | cmb_show_avg_utilization(struct device *dev, struct device_attribute *attr, char *buf) |
817 | { | 817 | { |
818 | struct cmbdata data; | 818 | struct cmbdata data; |
819 | u64 utilization; | 819 | u64 utilization; |
@@ -842,12 +842,12 @@ cmb_show_avg_utilization(struct device *dev, char *buf) | |||
842 | } | 842 | } |
843 | 843 | ||
844 | #define cmf_attr(name) \ | 844 | #define cmf_attr(name) \ |
845 | static ssize_t show_ ## name (struct device * dev, char * buf) \ | 845 | static ssize_t show_ ## name (struct device * dev, struct device_attribute *attr, char * buf) \ |
846 | { return cmb_show_attr((dev), buf, cmb_ ## name); } \ | 846 | { return cmb_show_attr((dev), buf, cmb_ ## name); } \ |
847 | static DEVICE_ATTR(name, 0444, show_ ## name, NULL); | 847 | static DEVICE_ATTR(name, 0444, show_ ## name, NULL); |
848 | 848 | ||
849 | #define cmf_attr_avg(name) \ | 849 | #define cmf_attr_avg(name) \ |
850 | static ssize_t show_avg_ ## name (struct device * dev, char * buf) \ | 850 | static ssize_t show_avg_ ## name (struct device * dev, struct device_attribute *attr, char * buf) \ |
851 | { return cmb_show_attr((dev), buf, cmb_ ## name); } \ | 851 | { return cmb_show_attr((dev), buf, cmb_ ## name); } \ |
852 | static DEVICE_ATTR(avg_ ## name, 0444, show_avg_ ## name, NULL); | 852 | static DEVICE_ATTR(avg_ ## name, 0444, show_avg_ ## name, NULL); |
853 | 853 | ||
@@ -902,12 +902,12 @@ static struct attribute_group cmf_attr_group_ext = { | |||
902 | .attrs = cmf_attributes_ext, | 902 | .attrs = cmf_attributes_ext, |
903 | }; | 903 | }; |
904 | 904 | ||
905 | static ssize_t cmb_enable_show(struct device *dev, char *buf) | 905 | static ssize_t cmb_enable_show(struct device *dev, struct device_attribute *attr, char *buf) |
906 | { | 906 | { |
907 | return sprintf(buf, "%d\n", to_ccwdev(dev)->private->cmb ? 1 : 0); | 907 | return sprintf(buf, "%d\n", to_ccwdev(dev)->private->cmb ? 1 : 0); |
908 | } | 908 | } |
909 | 909 | ||
910 | static ssize_t cmb_enable_store(struct device *dev, const char *buf, size_t c) | 910 | static ssize_t cmb_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t c) |
911 | { | 911 | { |
912 | struct ccw_device *cdev; | 912 | struct ccw_device *cdev; |
913 | int ret; | 913 | int ret; |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index df0325505e4e..809e1108a06e 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -204,7 +204,7 @@ module_exit(cleanup_ccw_bus_type); | |||
204 | * TODO: Split chpids and pimpampom up? Where is "in use" in the tree? | 204 | * TODO: Split chpids and pimpampom up? Where is "in use" in the tree? |
205 | */ | 205 | */ |
206 | static ssize_t | 206 | static ssize_t |
207 | chpids_show (struct device * dev, char * buf) | 207 | chpids_show (struct device * dev, struct device_attribute *attr, char * buf) |
208 | { | 208 | { |
209 | struct subchannel *sch = to_subchannel(dev); | 209 | struct subchannel *sch = to_subchannel(dev); |
210 | struct ssd_info *ssd = &sch->ssd_info; | 210 | struct ssd_info *ssd = &sch->ssd_info; |
@@ -219,7 +219,7 @@ chpids_show (struct device * dev, char * buf) | |||
219 | } | 219 | } |
220 | 220 | ||
221 | static ssize_t | 221 | static ssize_t |
222 | pimpampom_show (struct device * dev, char * buf) | 222 | pimpampom_show (struct device * dev, struct device_attribute *attr, char * buf) |
223 | { | 223 | { |
224 | struct subchannel *sch = to_subchannel(dev); | 224 | struct subchannel *sch = to_subchannel(dev); |
225 | struct pmcw *pmcw = &sch->schib.pmcw; | 225 | struct pmcw *pmcw = &sch->schib.pmcw; |
@@ -229,7 +229,7 @@ pimpampom_show (struct device * dev, char * buf) | |||
229 | } | 229 | } |
230 | 230 | ||
231 | static ssize_t | 231 | static ssize_t |
232 | devtype_show (struct device *dev, char *buf) | 232 | devtype_show (struct device *dev, struct device_attribute *attr, char *buf) |
233 | { | 233 | { |
234 | struct ccw_device *cdev = to_ccwdev(dev); | 234 | struct ccw_device *cdev = to_ccwdev(dev); |
235 | struct ccw_device_id *id = &(cdev->id); | 235 | struct ccw_device_id *id = &(cdev->id); |
@@ -242,7 +242,7 @@ devtype_show (struct device *dev, char *buf) | |||
242 | } | 242 | } |
243 | 243 | ||
244 | static ssize_t | 244 | static ssize_t |
245 | cutype_show (struct device *dev, char *buf) | 245 | cutype_show (struct device *dev, struct device_attribute *attr, char *buf) |
246 | { | 246 | { |
247 | struct ccw_device *cdev = to_ccwdev(dev); | 247 | struct ccw_device *cdev = to_ccwdev(dev); |
248 | struct ccw_device_id *id = &(cdev->id); | 248 | struct ccw_device_id *id = &(cdev->id); |
@@ -252,7 +252,7 @@ cutype_show (struct device *dev, char *buf) | |||
252 | } | 252 | } |
253 | 253 | ||
254 | static ssize_t | 254 | static ssize_t |
255 | online_show (struct device *dev, char *buf) | 255 | online_show (struct device *dev, struct device_attribute *attr, char *buf) |
256 | { | 256 | { |
257 | struct ccw_device *cdev = to_ccwdev(dev); | 257 | struct ccw_device *cdev = to_ccwdev(dev); |
258 | 258 | ||
@@ -350,7 +350,7 @@ ccw_device_set_online(struct ccw_device *cdev) | |||
350 | } | 350 | } |
351 | 351 | ||
352 | static ssize_t | 352 | static ssize_t |
353 | online_store (struct device *dev, const char *buf, size_t count) | 353 | online_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
354 | { | 354 | { |
355 | struct ccw_device *cdev = to_ccwdev(dev); | 355 | struct ccw_device *cdev = to_ccwdev(dev); |
356 | int i, force, ret; | 356 | int i, force, ret; |
@@ -422,7 +422,7 @@ online_store (struct device *dev, const char *buf, size_t count) | |||
422 | } | 422 | } |
423 | 423 | ||
424 | static ssize_t | 424 | static ssize_t |
425 | available_show (struct device *dev, char *buf) | 425 | available_show (struct device *dev, struct device_attribute *attr, char *buf) |
426 | { | 426 | { |
427 | struct ccw_device *cdev = to_ccwdev(dev); | 427 | struct ccw_device *cdev = to_ccwdev(dev); |
428 | struct subchannel *sch; | 428 | struct subchannel *sch; |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 06804d39a9c6..a99927d54ebb 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -241,20 +241,20 @@ static struct sk_buff *claw_pack_skb(struct claw_privbk *privptr); | |||
241 | static void dumpit (char *buf, int len); | 241 | static void dumpit (char *buf, int len); |
242 | #endif | 242 | #endif |
243 | /* sysfs Functions */ | 243 | /* sysfs Functions */ |
244 | static ssize_t claw_hname_show(struct device *dev, char *buf); | 244 | static ssize_t claw_hname_show(struct device *dev, struct device_attribute *attr, char *buf); |
245 | static ssize_t claw_hname_write(struct device *dev, | 245 | static ssize_t claw_hname_write(struct device *dev, struct device_attribute *attr, |
246 | const char *buf, size_t count); | 246 | const char *buf, size_t count); |
247 | static ssize_t claw_adname_show(struct device *dev, char *buf); | 247 | static ssize_t claw_adname_show(struct device *dev, struct device_attribute *attr, char *buf); |
248 | static ssize_t claw_adname_write(struct device *dev, | 248 | static ssize_t claw_adname_write(struct device *dev, struct device_attribute *attr, |
249 | const char *buf, size_t count); | 249 | const char *buf, size_t count); |
250 | static ssize_t claw_apname_show(struct device *dev, char *buf); | 250 | static ssize_t claw_apname_show(struct device *dev, struct device_attribute *attr, char *buf); |
251 | static ssize_t claw_apname_write(struct device *dev, | 251 | static ssize_t claw_apname_write(struct device *dev, struct device_attribute *attr, |
252 | const char *buf, size_t count); | 252 | const char *buf, size_t count); |
253 | static ssize_t claw_wbuff_show(struct device *dev, char *buf); | 253 | static ssize_t claw_wbuff_show(struct device *dev, struct device_attribute *attr, char *buf); |
254 | static ssize_t claw_wbuff_write(struct device *dev, | 254 | static ssize_t claw_wbuff_write(struct device *dev, struct device_attribute *attr, |
255 | const char *buf, size_t count); | 255 | const char *buf, size_t count); |
256 | static ssize_t claw_rbuff_show(struct device *dev, char *buf); | 256 | static ssize_t claw_rbuff_show(struct device *dev, struct device_attribute *attr, char *buf); |
257 | static ssize_t claw_rbuff_write(struct device *dev, | 257 | static ssize_t claw_rbuff_write(struct device *dev, struct device_attribute *attr, |
258 | const char *buf, size_t count); | 258 | const char *buf, size_t count); |
259 | static int claw_add_files(struct device *dev); | 259 | static int claw_add_files(struct device *dev); |
260 | static void claw_remove_files(struct device *dev); | 260 | static void claw_remove_files(struct device *dev); |
@@ -4149,7 +4149,7 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
4149 | * sysfs attributes | 4149 | * sysfs attributes |
4150 | */ | 4150 | */ |
4151 | static ssize_t | 4151 | static ssize_t |
4152 | claw_hname_show(struct device *dev, char *buf) | 4152 | claw_hname_show(struct device *dev, struct device_attribute *attr, char *buf) |
4153 | { | 4153 | { |
4154 | struct claw_privbk *priv; | 4154 | struct claw_privbk *priv; |
4155 | struct claw_env * p_env; | 4155 | struct claw_env * p_env; |
@@ -4162,7 +4162,7 @@ claw_hname_show(struct device *dev, char *buf) | |||
4162 | } | 4162 | } |
4163 | 4163 | ||
4164 | static ssize_t | 4164 | static ssize_t |
4165 | claw_hname_write(struct device *dev, const char *buf, size_t count) | 4165 | claw_hname_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
4166 | { | 4166 | { |
4167 | struct claw_privbk *priv; | 4167 | struct claw_privbk *priv; |
4168 | struct claw_env * p_env; | 4168 | struct claw_env * p_env; |
@@ -4186,7 +4186,7 @@ claw_hname_write(struct device *dev, const char *buf, size_t count) | |||
4186 | static DEVICE_ATTR(host_name, 0644, claw_hname_show, claw_hname_write); | 4186 | static DEVICE_ATTR(host_name, 0644, claw_hname_show, claw_hname_write); |
4187 | 4187 | ||
4188 | static ssize_t | 4188 | static ssize_t |
4189 | claw_adname_show(struct device *dev, char *buf) | 4189 | claw_adname_show(struct device *dev, struct device_attribute *attr, char *buf) |
4190 | { | 4190 | { |
4191 | struct claw_privbk *priv; | 4191 | struct claw_privbk *priv; |
4192 | struct claw_env * p_env; | 4192 | struct claw_env * p_env; |
@@ -4199,7 +4199,7 @@ claw_adname_show(struct device *dev, char *buf) | |||
4199 | } | 4199 | } |
4200 | 4200 | ||
4201 | static ssize_t | 4201 | static ssize_t |
4202 | claw_adname_write(struct device *dev, const char *buf, size_t count) | 4202 | claw_adname_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
4203 | { | 4203 | { |
4204 | struct claw_privbk *priv; | 4204 | struct claw_privbk *priv; |
4205 | struct claw_env * p_env; | 4205 | struct claw_env * p_env; |
@@ -4223,7 +4223,7 @@ claw_adname_write(struct device *dev, const char *buf, size_t count) | |||
4223 | static DEVICE_ATTR(adapter_name, 0644, claw_adname_show, claw_adname_write); | 4223 | static DEVICE_ATTR(adapter_name, 0644, claw_adname_show, claw_adname_write); |
4224 | 4224 | ||
4225 | static ssize_t | 4225 | static ssize_t |
4226 | claw_apname_show(struct device *dev, char *buf) | 4226 | claw_apname_show(struct device *dev, struct device_attribute *attr, char *buf) |
4227 | { | 4227 | { |
4228 | struct claw_privbk *priv; | 4228 | struct claw_privbk *priv; |
4229 | struct claw_env * p_env; | 4229 | struct claw_env * p_env; |
@@ -4237,7 +4237,7 @@ claw_apname_show(struct device *dev, char *buf) | |||
4237 | } | 4237 | } |
4238 | 4238 | ||
4239 | static ssize_t | 4239 | static ssize_t |
4240 | claw_apname_write(struct device *dev, const char *buf, size_t count) | 4240 | claw_apname_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
4241 | { | 4241 | { |
4242 | struct claw_privbk *priv; | 4242 | struct claw_privbk *priv; |
4243 | struct claw_env * p_env; | 4243 | struct claw_env * p_env; |
@@ -4271,7 +4271,7 @@ claw_apname_write(struct device *dev, const char *buf, size_t count) | |||
4271 | static DEVICE_ATTR(api_type, 0644, claw_apname_show, claw_apname_write); | 4271 | static DEVICE_ATTR(api_type, 0644, claw_apname_show, claw_apname_write); |
4272 | 4272 | ||
4273 | static ssize_t | 4273 | static ssize_t |
4274 | claw_wbuff_show(struct device *dev, char *buf) | 4274 | claw_wbuff_show(struct device *dev, struct device_attribute *attr, char *buf) |
4275 | { | 4275 | { |
4276 | struct claw_privbk *priv; | 4276 | struct claw_privbk *priv; |
4277 | struct claw_env * p_env; | 4277 | struct claw_env * p_env; |
@@ -4284,7 +4284,7 @@ claw_wbuff_show(struct device *dev, char *buf) | |||
4284 | } | 4284 | } |
4285 | 4285 | ||
4286 | static ssize_t | 4286 | static ssize_t |
4287 | claw_wbuff_write(struct device *dev, const char *buf, size_t count) | 4287 | claw_wbuff_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
4288 | { | 4288 | { |
4289 | struct claw_privbk *priv; | 4289 | struct claw_privbk *priv; |
4290 | struct claw_env * p_env; | 4290 | struct claw_env * p_env; |
@@ -4312,7 +4312,7 @@ claw_wbuff_write(struct device *dev, const char *buf, size_t count) | |||
4312 | static DEVICE_ATTR(write_buffer, 0644, claw_wbuff_show, claw_wbuff_write); | 4312 | static DEVICE_ATTR(write_buffer, 0644, claw_wbuff_show, claw_wbuff_write); |
4313 | 4313 | ||
4314 | static ssize_t | 4314 | static ssize_t |
4315 | claw_rbuff_show(struct device *dev, char *buf) | 4315 | claw_rbuff_show(struct device *dev, struct device_attribute *attr, char *buf) |
4316 | { | 4316 | { |
4317 | struct claw_privbk *priv; | 4317 | struct claw_privbk *priv; |
4318 | struct claw_env * p_env; | 4318 | struct claw_env * p_env; |
@@ -4325,7 +4325,7 @@ claw_rbuff_show(struct device *dev, char *buf) | |||
4325 | } | 4325 | } |
4326 | 4326 | ||
4327 | static ssize_t | 4327 | static ssize_t |
4328 | claw_rbuff_write(struct device *dev, const char *buf, size_t count) | 4328 | claw_rbuff_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
4329 | { | 4329 | { |
4330 | struct claw_privbk *priv; | 4330 | struct claw_privbk *priv; |
4331 | struct claw_env *p_env; | 4331 | struct claw_env *p_env; |
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index ff3e95e07e89..96ca863eaff2 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -2469,7 +2469,7 @@ ctc_stats(struct net_device * dev) | |||
2469 | */ | 2469 | */ |
2470 | 2470 | ||
2471 | static ssize_t | 2471 | static ssize_t |
2472 | buffer_show(struct device *dev, char *buf) | 2472 | buffer_show(struct device *dev, struct device_attribute *attr, char *buf) |
2473 | { | 2473 | { |
2474 | struct ctc_priv *priv; | 2474 | struct ctc_priv *priv; |
2475 | 2475 | ||
@@ -2481,7 +2481,7 @@ buffer_show(struct device *dev, char *buf) | |||
2481 | } | 2481 | } |
2482 | 2482 | ||
2483 | static ssize_t | 2483 | static ssize_t |
2484 | buffer_write(struct device *dev, const char *buf, size_t count) | 2484 | buffer_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
2485 | { | 2485 | { |
2486 | struct ctc_priv *priv; | 2486 | struct ctc_priv *priv; |
2487 | struct net_device *ndev; | 2487 | struct net_device *ndev; |
@@ -2530,13 +2530,13 @@ einval: | |||
2530 | } | 2530 | } |
2531 | 2531 | ||
2532 | static ssize_t | 2532 | static ssize_t |
2533 | loglevel_show(struct device *dev, char *buf) | 2533 | loglevel_show(struct device *dev, struct device_attribute *attr, char *buf) |
2534 | { | 2534 | { |
2535 | return sprintf(buf, "%d\n", loglevel); | 2535 | return sprintf(buf, "%d\n", loglevel); |
2536 | } | 2536 | } |
2537 | 2537 | ||
2538 | static ssize_t | 2538 | static ssize_t |
2539 | loglevel_write(struct device *dev, const char *buf, size_t count) | 2539 | loglevel_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
2540 | { | 2540 | { |
2541 | int ll1; | 2541 | int ll1; |
2542 | 2542 | ||
@@ -2589,7 +2589,7 @@ ctc_print_statistics(struct ctc_priv *priv) | |||
2589 | } | 2589 | } |
2590 | 2590 | ||
2591 | static ssize_t | 2591 | static ssize_t |
2592 | stats_show(struct device *dev, char *buf) | 2592 | stats_show(struct device *dev, struct device_attribute *attr, char *buf) |
2593 | { | 2593 | { |
2594 | struct ctc_priv *priv = dev->driver_data; | 2594 | struct ctc_priv *priv = dev->driver_data; |
2595 | if (!priv) | 2595 | if (!priv) |
@@ -2599,7 +2599,7 @@ stats_show(struct device *dev, char *buf) | |||
2599 | } | 2599 | } |
2600 | 2600 | ||
2601 | static ssize_t | 2601 | static ssize_t |
2602 | stats_write(struct device *dev, const char *buf, size_t count) | 2602 | stats_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
2603 | { | 2603 | { |
2604 | struct ctc_priv *priv = dev->driver_data; | 2604 | struct ctc_priv *priv = dev->driver_data; |
2605 | if (!priv) | 2605 | if (!priv) |
@@ -2654,7 +2654,7 @@ ctc_free_netdevice(struct net_device * dev, int free_dev) | |||
2654 | } | 2654 | } |
2655 | 2655 | ||
2656 | static ssize_t | 2656 | static ssize_t |
2657 | ctc_proto_show(struct device *dev, char *buf) | 2657 | ctc_proto_show(struct device *dev, struct device_attribute *attr, char *buf) |
2658 | { | 2658 | { |
2659 | struct ctc_priv *priv; | 2659 | struct ctc_priv *priv; |
2660 | 2660 | ||
@@ -2666,7 +2666,7 @@ ctc_proto_show(struct device *dev, char *buf) | |||
2666 | } | 2666 | } |
2667 | 2667 | ||
2668 | static ssize_t | 2668 | static ssize_t |
2669 | ctc_proto_store(struct device *dev, const char *buf, size_t count) | 2669 | ctc_proto_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
2670 | { | 2670 | { |
2671 | struct ctc_priv *priv; | 2671 | struct ctc_priv *priv; |
2672 | int value; | 2672 | int value; |
@@ -2687,7 +2687,7 @@ ctc_proto_store(struct device *dev, const char *buf, size_t count) | |||
2687 | 2687 | ||
2688 | 2688 | ||
2689 | static ssize_t | 2689 | static ssize_t |
2690 | ctc_type_show(struct device *dev, char *buf) | 2690 | ctc_type_show(struct device *dev, struct device_attribute *attr, char *buf) |
2691 | { | 2691 | { |
2692 | struct ccwgroup_device *cgdev; | 2692 | struct ccwgroup_device *cgdev; |
2693 | 2693 | ||
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index cccfed248e70..ab086242d305 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1984,7 +1984,7 @@ lcs_open_device(struct net_device *dev) | |||
1984 | * show function for portno called by cat or similar things | 1984 | * show function for portno called by cat or similar things |
1985 | */ | 1985 | */ |
1986 | static ssize_t | 1986 | static ssize_t |
1987 | lcs_portno_show (struct device *dev, char *buf) | 1987 | lcs_portno_show (struct device *dev, struct device_attribute *attr, char *buf) |
1988 | { | 1988 | { |
1989 | struct lcs_card *card; | 1989 | struct lcs_card *card; |
1990 | 1990 | ||
@@ -2000,7 +2000,7 @@ lcs_portno_show (struct device *dev, char *buf) | |||
2000 | * store the value which is piped to file portno | 2000 | * store the value which is piped to file portno |
2001 | */ | 2001 | */ |
2002 | static ssize_t | 2002 | static ssize_t |
2003 | lcs_portno_store (struct device *dev, const char *buf, size_t count) | 2003 | lcs_portno_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
2004 | { | 2004 | { |
2005 | struct lcs_card *card; | 2005 | struct lcs_card *card; |
2006 | int value; | 2006 | int value; |
@@ -2021,7 +2021,7 @@ lcs_portno_store (struct device *dev, const char *buf, size_t count) | |||
2021 | static DEVICE_ATTR(portno, 0644, lcs_portno_show, lcs_portno_store); | 2021 | static DEVICE_ATTR(portno, 0644, lcs_portno_show, lcs_portno_store); |
2022 | 2022 | ||
2023 | static ssize_t | 2023 | static ssize_t |
2024 | lcs_type_show(struct device *dev, char *buf) | 2024 | lcs_type_show(struct device *dev, struct device_attribute *attr, char *buf) |
2025 | { | 2025 | { |
2026 | struct ccwgroup_device *cgdev; | 2026 | struct ccwgroup_device *cgdev; |
2027 | 2027 | ||
@@ -2035,7 +2035,7 @@ lcs_type_show(struct device *dev, char *buf) | |||
2035 | static DEVICE_ATTR(type, 0444, lcs_type_show, NULL); | 2035 | static DEVICE_ATTR(type, 0444, lcs_type_show, NULL); |
2036 | 2036 | ||
2037 | static ssize_t | 2037 | static ssize_t |
2038 | lcs_timeout_show(struct device *dev, char *buf) | 2038 | lcs_timeout_show(struct device *dev, struct device_attribute *attr, char *buf) |
2039 | { | 2039 | { |
2040 | struct lcs_card *card; | 2040 | struct lcs_card *card; |
2041 | 2041 | ||
@@ -2045,7 +2045,7 @@ lcs_timeout_show(struct device *dev, char *buf) | |||
2045 | } | 2045 | } |
2046 | 2046 | ||
2047 | static ssize_t | 2047 | static ssize_t |
2048 | lcs_timeout_store (struct device *dev, const char *buf, size_t count) | 2048 | lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
2049 | { | 2049 | { |
2050 | struct lcs_card *card; | 2050 | struct lcs_card *card; |
2051 | int value; | 2051 | int value; |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 16e8e69afb10..3fd4fb754b2d 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -1356,7 +1356,7 @@ netiucv_change_mtu (struct net_device * dev, int new_mtu) | |||
1356 | *****************************************************************************/ | 1356 | *****************************************************************************/ |
1357 | 1357 | ||
1358 | static ssize_t | 1358 | static ssize_t |
1359 | user_show (struct device *dev, char *buf) | 1359 | user_show (struct device *dev, struct device_attribute *attr, char *buf) |
1360 | { | 1360 | { |
1361 | struct netiucv_priv *priv = dev->driver_data; | 1361 | struct netiucv_priv *priv = dev->driver_data; |
1362 | 1362 | ||
@@ -1365,7 +1365,7 @@ user_show (struct device *dev, char *buf) | |||
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | static ssize_t | 1367 | static ssize_t |
1368 | user_write (struct device *dev, const char *buf, size_t count) | 1368 | user_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1369 | { | 1369 | { |
1370 | struct netiucv_priv *priv = dev->driver_data; | 1370 | struct netiucv_priv *priv = dev->driver_data; |
1371 | struct net_device *ndev = priv->conn->netdev; | 1371 | struct net_device *ndev = priv->conn->netdev; |
@@ -1422,7 +1422,7 @@ user_write (struct device *dev, const char *buf, size_t count) | |||
1422 | static DEVICE_ATTR(user, 0644, user_show, user_write); | 1422 | static DEVICE_ATTR(user, 0644, user_show, user_write); |
1423 | 1423 | ||
1424 | static ssize_t | 1424 | static ssize_t |
1425 | buffer_show (struct device *dev, char *buf) | 1425 | buffer_show (struct device *dev, struct device_attribute *attr, char *buf) |
1426 | { | 1426 | { |
1427 | struct netiucv_priv *priv = dev->driver_data; | 1427 | struct netiucv_priv *priv = dev->driver_data; |
1428 | 1428 | ||
@@ -1431,7 +1431,7 @@ buffer_show (struct device *dev, char *buf) | |||
1431 | } | 1431 | } |
1432 | 1432 | ||
1433 | static ssize_t | 1433 | static ssize_t |
1434 | buffer_write (struct device *dev, const char *buf, size_t count) | 1434 | buffer_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1435 | { | 1435 | { |
1436 | struct netiucv_priv *priv = dev->driver_data; | 1436 | struct netiucv_priv *priv = dev->driver_data; |
1437 | struct net_device *ndev = priv->conn->netdev; | 1437 | struct net_device *ndev = priv->conn->netdev; |
@@ -1486,7 +1486,7 @@ buffer_write (struct device *dev, const char *buf, size_t count) | |||
1486 | static DEVICE_ATTR(buffer, 0644, buffer_show, buffer_write); | 1486 | static DEVICE_ATTR(buffer, 0644, buffer_show, buffer_write); |
1487 | 1487 | ||
1488 | static ssize_t | 1488 | static ssize_t |
1489 | dev_fsm_show (struct device *dev, char *buf) | 1489 | dev_fsm_show (struct device *dev, struct device_attribute *attr, char *buf) |
1490 | { | 1490 | { |
1491 | struct netiucv_priv *priv = dev->driver_data; | 1491 | struct netiucv_priv *priv = dev->driver_data; |
1492 | 1492 | ||
@@ -1497,7 +1497,7 @@ dev_fsm_show (struct device *dev, char *buf) | |||
1497 | static DEVICE_ATTR(device_fsm_state, 0444, dev_fsm_show, NULL); | 1497 | static DEVICE_ATTR(device_fsm_state, 0444, dev_fsm_show, NULL); |
1498 | 1498 | ||
1499 | static ssize_t | 1499 | static ssize_t |
1500 | conn_fsm_show (struct device *dev, char *buf) | 1500 | conn_fsm_show (struct device *dev, struct device_attribute *attr, char *buf) |
1501 | { | 1501 | { |
1502 | struct netiucv_priv *priv = dev->driver_data; | 1502 | struct netiucv_priv *priv = dev->driver_data; |
1503 | 1503 | ||
@@ -1508,7 +1508,7 @@ conn_fsm_show (struct device *dev, char *buf) | |||
1508 | static DEVICE_ATTR(connection_fsm_state, 0444, conn_fsm_show, NULL); | 1508 | static DEVICE_ATTR(connection_fsm_state, 0444, conn_fsm_show, NULL); |
1509 | 1509 | ||
1510 | static ssize_t | 1510 | static ssize_t |
1511 | maxmulti_show (struct device *dev, char *buf) | 1511 | maxmulti_show (struct device *dev, struct device_attribute *attr, char *buf) |
1512 | { | 1512 | { |
1513 | struct netiucv_priv *priv = dev->driver_data; | 1513 | struct netiucv_priv *priv = dev->driver_data; |
1514 | 1514 | ||
@@ -1517,7 +1517,7 @@ maxmulti_show (struct device *dev, char *buf) | |||
1517 | } | 1517 | } |
1518 | 1518 | ||
1519 | static ssize_t | 1519 | static ssize_t |
1520 | maxmulti_write (struct device *dev, const char *buf, size_t count) | 1520 | maxmulti_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1521 | { | 1521 | { |
1522 | struct netiucv_priv *priv = dev->driver_data; | 1522 | struct netiucv_priv *priv = dev->driver_data; |
1523 | 1523 | ||
@@ -1529,7 +1529,7 @@ maxmulti_write (struct device *dev, const char *buf, size_t count) | |||
1529 | static DEVICE_ATTR(max_tx_buffer_used, 0644, maxmulti_show, maxmulti_write); | 1529 | static DEVICE_ATTR(max_tx_buffer_used, 0644, maxmulti_show, maxmulti_write); |
1530 | 1530 | ||
1531 | static ssize_t | 1531 | static ssize_t |
1532 | maxcq_show (struct device *dev, char *buf) | 1532 | maxcq_show (struct device *dev, struct device_attribute *attr, char *buf) |
1533 | { | 1533 | { |
1534 | struct netiucv_priv *priv = dev->driver_data; | 1534 | struct netiucv_priv *priv = dev->driver_data; |
1535 | 1535 | ||
@@ -1538,7 +1538,7 @@ maxcq_show (struct device *dev, char *buf) | |||
1538 | } | 1538 | } |
1539 | 1539 | ||
1540 | static ssize_t | 1540 | static ssize_t |
1541 | maxcq_write (struct device *dev, const char *buf, size_t count) | 1541 | maxcq_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1542 | { | 1542 | { |
1543 | struct netiucv_priv *priv = dev->driver_data; | 1543 | struct netiucv_priv *priv = dev->driver_data; |
1544 | 1544 | ||
@@ -1550,7 +1550,7 @@ maxcq_write (struct device *dev, const char *buf, size_t count) | |||
1550 | static DEVICE_ATTR(max_chained_skbs, 0644, maxcq_show, maxcq_write); | 1550 | static DEVICE_ATTR(max_chained_skbs, 0644, maxcq_show, maxcq_write); |
1551 | 1551 | ||
1552 | static ssize_t | 1552 | static ssize_t |
1553 | sdoio_show (struct device *dev, char *buf) | 1553 | sdoio_show (struct device *dev, struct device_attribute *attr, char *buf) |
1554 | { | 1554 | { |
1555 | struct netiucv_priv *priv = dev->driver_data; | 1555 | struct netiucv_priv *priv = dev->driver_data; |
1556 | 1556 | ||
@@ -1559,7 +1559,7 @@ sdoio_show (struct device *dev, char *buf) | |||
1559 | } | 1559 | } |
1560 | 1560 | ||
1561 | static ssize_t | 1561 | static ssize_t |
1562 | sdoio_write (struct device *dev, const char *buf, size_t count) | 1562 | sdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1563 | { | 1563 | { |
1564 | struct netiucv_priv *priv = dev->driver_data; | 1564 | struct netiucv_priv *priv = dev->driver_data; |
1565 | 1565 | ||
@@ -1571,7 +1571,7 @@ sdoio_write (struct device *dev, const char *buf, size_t count) | |||
1571 | static DEVICE_ATTR(tx_single_write_ops, 0644, sdoio_show, sdoio_write); | 1571 | static DEVICE_ATTR(tx_single_write_ops, 0644, sdoio_show, sdoio_write); |
1572 | 1572 | ||
1573 | static ssize_t | 1573 | static ssize_t |
1574 | mdoio_show (struct device *dev, char *buf) | 1574 | mdoio_show (struct device *dev, struct device_attribute *attr, char *buf) |
1575 | { | 1575 | { |
1576 | struct netiucv_priv *priv = dev->driver_data; | 1576 | struct netiucv_priv *priv = dev->driver_data; |
1577 | 1577 | ||
@@ -1580,7 +1580,7 @@ mdoio_show (struct device *dev, char *buf) | |||
1580 | } | 1580 | } |
1581 | 1581 | ||
1582 | static ssize_t | 1582 | static ssize_t |
1583 | mdoio_write (struct device *dev, const char *buf, size_t count) | 1583 | mdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1584 | { | 1584 | { |
1585 | struct netiucv_priv *priv = dev->driver_data; | 1585 | struct netiucv_priv *priv = dev->driver_data; |
1586 | 1586 | ||
@@ -1592,7 +1592,7 @@ mdoio_write (struct device *dev, const char *buf, size_t count) | |||
1592 | static DEVICE_ATTR(tx_multi_write_ops, 0644, mdoio_show, mdoio_write); | 1592 | static DEVICE_ATTR(tx_multi_write_ops, 0644, mdoio_show, mdoio_write); |
1593 | 1593 | ||
1594 | static ssize_t | 1594 | static ssize_t |
1595 | txlen_show (struct device *dev, char *buf) | 1595 | txlen_show (struct device *dev, struct device_attribute *attr, char *buf) |
1596 | { | 1596 | { |
1597 | struct netiucv_priv *priv = dev->driver_data; | 1597 | struct netiucv_priv *priv = dev->driver_data; |
1598 | 1598 | ||
@@ -1601,7 +1601,7 @@ txlen_show (struct device *dev, char *buf) | |||
1601 | } | 1601 | } |
1602 | 1602 | ||
1603 | static ssize_t | 1603 | static ssize_t |
1604 | txlen_write (struct device *dev, const char *buf, size_t count) | 1604 | txlen_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1605 | { | 1605 | { |
1606 | struct netiucv_priv *priv = dev->driver_data; | 1606 | struct netiucv_priv *priv = dev->driver_data; |
1607 | 1607 | ||
@@ -1613,7 +1613,7 @@ txlen_write (struct device *dev, const char *buf, size_t count) | |||
1613 | static DEVICE_ATTR(netto_bytes, 0644, txlen_show, txlen_write); | 1613 | static DEVICE_ATTR(netto_bytes, 0644, txlen_show, txlen_write); |
1614 | 1614 | ||
1615 | static ssize_t | 1615 | static ssize_t |
1616 | txtime_show (struct device *dev, char *buf) | 1616 | txtime_show (struct device *dev, struct device_attribute *attr, char *buf) |
1617 | { | 1617 | { |
1618 | struct netiucv_priv *priv = dev->driver_data; | 1618 | struct netiucv_priv *priv = dev->driver_data; |
1619 | 1619 | ||
@@ -1622,7 +1622,7 @@ txtime_show (struct device *dev, char *buf) | |||
1622 | } | 1622 | } |
1623 | 1623 | ||
1624 | static ssize_t | 1624 | static ssize_t |
1625 | txtime_write (struct device *dev, const char *buf, size_t count) | 1625 | txtime_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1626 | { | 1626 | { |
1627 | struct netiucv_priv *priv = dev->driver_data; | 1627 | struct netiucv_priv *priv = dev->driver_data; |
1628 | 1628 | ||
@@ -1634,7 +1634,7 @@ txtime_write (struct device *dev, const char *buf, size_t count) | |||
1634 | static DEVICE_ATTR(max_tx_io_time, 0644, txtime_show, txtime_write); | 1634 | static DEVICE_ATTR(max_tx_io_time, 0644, txtime_show, txtime_write); |
1635 | 1635 | ||
1636 | static ssize_t | 1636 | static ssize_t |
1637 | txpend_show (struct device *dev, char *buf) | 1637 | txpend_show (struct device *dev, struct device_attribute *attr, char *buf) |
1638 | { | 1638 | { |
1639 | struct netiucv_priv *priv = dev->driver_data; | 1639 | struct netiucv_priv *priv = dev->driver_data; |
1640 | 1640 | ||
@@ -1643,7 +1643,7 @@ txpend_show (struct device *dev, char *buf) | |||
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | static ssize_t | 1645 | static ssize_t |
1646 | txpend_write (struct device *dev, const char *buf, size_t count) | 1646 | txpend_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1647 | { | 1647 | { |
1648 | struct netiucv_priv *priv = dev->driver_data; | 1648 | struct netiucv_priv *priv = dev->driver_data; |
1649 | 1649 | ||
@@ -1655,7 +1655,7 @@ txpend_write (struct device *dev, const char *buf, size_t count) | |||
1655 | static DEVICE_ATTR(tx_pending, 0644, txpend_show, txpend_write); | 1655 | static DEVICE_ATTR(tx_pending, 0644, txpend_show, txpend_write); |
1656 | 1656 | ||
1657 | static ssize_t | 1657 | static ssize_t |
1658 | txmpnd_show (struct device *dev, char *buf) | 1658 | txmpnd_show (struct device *dev, struct device_attribute *attr, char *buf) |
1659 | { | 1659 | { |
1660 | struct netiucv_priv *priv = dev->driver_data; | 1660 | struct netiucv_priv *priv = dev->driver_data; |
1661 | 1661 | ||
@@ -1664,7 +1664,7 @@ txmpnd_show (struct device *dev, char *buf) | |||
1664 | } | 1664 | } |
1665 | 1665 | ||
1666 | static ssize_t | 1666 | static ssize_t |
1667 | txmpnd_write (struct device *dev, const char *buf, size_t count) | 1667 | txmpnd_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1668 | { | 1668 | { |
1669 | struct netiucv_priv *priv = dev->driver_data; | 1669 | struct netiucv_priv *priv = dev->driver_data; |
1670 | 1670 | ||
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index 240348398211..98bedb0cb387 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c | |||
@@ -30,7 +30,7 @@ const char *VERSION_QETH_SYS_C = "$Revision: 1.51 $"; | |||
30 | //low/high watermark | 30 | //low/high watermark |
31 | 31 | ||
32 | static ssize_t | 32 | static ssize_t |
33 | qeth_dev_state_show(struct device *dev, char *buf) | 33 | qeth_dev_state_show(struct device *dev, struct device_attribute *attr, char *buf) |
34 | { | 34 | { |
35 | struct qeth_card *card = dev->driver_data; | 35 | struct qeth_card *card = dev->driver_data; |
36 | if (!card) | 36 | if (!card) |
@@ -58,7 +58,7 @@ qeth_dev_state_show(struct device *dev, char *buf) | |||
58 | static DEVICE_ATTR(state, 0444, qeth_dev_state_show, NULL); | 58 | static DEVICE_ATTR(state, 0444, qeth_dev_state_show, NULL); |
59 | 59 | ||
60 | static ssize_t | 60 | static ssize_t |
61 | qeth_dev_chpid_show(struct device *dev, char *buf) | 61 | qeth_dev_chpid_show(struct device *dev, struct device_attribute *attr, char *buf) |
62 | { | 62 | { |
63 | struct qeth_card *card = dev->driver_data; | 63 | struct qeth_card *card = dev->driver_data; |
64 | if (!card) | 64 | if (!card) |
@@ -70,7 +70,7 @@ qeth_dev_chpid_show(struct device *dev, char *buf) | |||
70 | static DEVICE_ATTR(chpid, 0444, qeth_dev_chpid_show, NULL); | 70 | static DEVICE_ATTR(chpid, 0444, qeth_dev_chpid_show, NULL); |
71 | 71 | ||
72 | static ssize_t | 72 | static ssize_t |
73 | qeth_dev_if_name_show(struct device *dev, char *buf) | 73 | qeth_dev_if_name_show(struct device *dev, struct device_attribute *attr, char *buf) |
74 | { | 74 | { |
75 | struct qeth_card *card = dev->driver_data; | 75 | struct qeth_card *card = dev->driver_data; |
76 | if (!card) | 76 | if (!card) |
@@ -81,7 +81,7 @@ qeth_dev_if_name_show(struct device *dev, char *buf) | |||
81 | static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL); | 81 | static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL); |
82 | 82 | ||
83 | static ssize_t | 83 | static ssize_t |
84 | qeth_dev_card_type_show(struct device *dev, char *buf) | 84 | qeth_dev_card_type_show(struct device *dev, struct device_attribute *attr, char *buf) |
85 | { | 85 | { |
86 | struct qeth_card *card = dev->driver_data; | 86 | struct qeth_card *card = dev->driver_data; |
87 | if (!card) | 87 | if (!card) |
@@ -93,7 +93,7 @@ qeth_dev_card_type_show(struct device *dev, char *buf) | |||
93 | static DEVICE_ATTR(card_type, 0444, qeth_dev_card_type_show, NULL); | 93 | static DEVICE_ATTR(card_type, 0444, qeth_dev_card_type_show, NULL); |
94 | 94 | ||
95 | static ssize_t | 95 | static ssize_t |
96 | qeth_dev_portno_show(struct device *dev, char *buf) | 96 | qeth_dev_portno_show(struct device *dev, struct device_attribute *attr, char *buf) |
97 | { | 97 | { |
98 | struct qeth_card *card = dev->driver_data; | 98 | struct qeth_card *card = dev->driver_data; |
99 | if (!card) | 99 | if (!card) |
@@ -103,7 +103,7 @@ qeth_dev_portno_show(struct device *dev, char *buf) | |||
103 | } | 103 | } |
104 | 104 | ||
105 | static ssize_t | 105 | static ssize_t |
106 | qeth_dev_portno_store(struct device *dev, const char *buf, size_t count) | 106 | qeth_dev_portno_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
107 | { | 107 | { |
108 | struct qeth_card *card = dev->driver_data; | 108 | struct qeth_card *card = dev->driver_data; |
109 | char *tmp; | 109 | char *tmp; |
@@ -129,7 +129,7 @@ qeth_dev_portno_store(struct device *dev, const char *buf, size_t count) | |||
129 | static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store); | 129 | static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store); |
130 | 130 | ||
131 | static ssize_t | 131 | static ssize_t |
132 | qeth_dev_portname_show(struct device *dev, char *buf) | 132 | qeth_dev_portname_show(struct device *dev, struct device_attribute *attr, char *buf) |
133 | { | 133 | { |
134 | struct qeth_card *card = dev->driver_data; | 134 | struct qeth_card *card = dev->driver_data; |
135 | char portname[9] = {0, }; | 135 | char portname[9] = {0, }; |
@@ -146,7 +146,7 @@ qeth_dev_portname_show(struct device *dev, char *buf) | |||
146 | } | 146 | } |
147 | 147 | ||
148 | static ssize_t | 148 | static ssize_t |
149 | qeth_dev_portname_store(struct device *dev, const char *buf, size_t count) | 149 | qeth_dev_portname_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
150 | { | 150 | { |
151 | struct qeth_card *card = dev->driver_data; | 151 | struct qeth_card *card = dev->driver_data; |
152 | char *tmp; | 152 | char *tmp; |
@@ -177,7 +177,7 @@ static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show, | |||
177 | qeth_dev_portname_store); | 177 | qeth_dev_portname_store); |
178 | 178 | ||
179 | static ssize_t | 179 | static ssize_t |
180 | qeth_dev_checksum_show(struct device *dev, char *buf) | 180 | qeth_dev_checksum_show(struct device *dev, struct device_attribute *attr, char *buf) |
181 | { | 181 | { |
182 | struct qeth_card *card = dev->driver_data; | 182 | struct qeth_card *card = dev->driver_data; |
183 | 183 | ||
@@ -188,7 +188,7 @@ qeth_dev_checksum_show(struct device *dev, char *buf) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | static ssize_t | 190 | static ssize_t |
191 | qeth_dev_checksum_store(struct device *dev, const char *buf, size_t count) | 191 | qeth_dev_checksum_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
192 | { | 192 | { |
193 | struct qeth_card *card = dev->driver_data; | 193 | struct qeth_card *card = dev->driver_data; |
194 | char *tmp; | 194 | char *tmp; |
@@ -218,7 +218,7 @@ static DEVICE_ATTR(checksumming, 0644, qeth_dev_checksum_show, | |||
218 | qeth_dev_checksum_store); | 218 | qeth_dev_checksum_store); |
219 | 219 | ||
220 | static ssize_t | 220 | static ssize_t |
221 | qeth_dev_prioqing_show(struct device *dev, char *buf) | 221 | qeth_dev_prioqing_show(struct device *dev, struct device_attribute *attr, char *buf) |
222 | { | 222 | { |
223 | struct qeth_card *card = dev->driver_data; | 223 | struct qeth_card *card = dev->driver_data; |
224 | 224 | ||
@@ -237,7 +237,7 @@ qeth_dev_prioqing_show(struct device *dev, char *buf) | |||
237 | } | 237 | } |
238 | 238 | ||
239 | static ssize_t | 239 | static ssize_t |
240 | qeth_dev_prioqing_store(struct device *dev, const char *buf, size_t count) | 240 | qeth_dev_prioqing_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
241 | { | 241 | { |
242 | struct qeth_card *card = dev->driver_data; | 242 | struct qeth_card *card = dev->driver_data; |
243 | char *tmp; | 243 | char *tmp; |
@@ -290,7 +290,7 @@ static DEVICE_ATTR(priority_queueing, 0644, qeth_dev_prioqing_show, | |||
290 | qeth_dev_prioqing_store); | 290 | qeth_dev_prioqing_store); |
291 | 291 | ||
292 | static ssize_t | 292 | static ssize_t |
293 | qeth_dev_bufcnt_show(struct device *dev, char *buf) | 293 | qeth_dev_bufcnt_show(struct device *dev, struct device_attribute *attr, char *buf) |
294 | { | 294 | { |
295 | struct qeth_card *card = dev->driver_data; | 295 | struct qeth_card *card = dev->driver_data; |
296 | 296 | ||
@@ -301,7 +301,7 @@ qeth_dev_bufcnt_show(struct device *dev, char *buf) | |||
301 | } | 301 | } |
302 | 302 | ||
303 | static ssize_t | 303 | static ssize_t |
304 | qeth_dev_bufcnt_store(struct device *dev, const char *buf, size_t count) | 304 | qeth_dev_bufcnt_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
305 | { | 305 | { |
306 | struct qeth_card *card = dev->driver_data; | 306 | struct qeth_card *card = dev->driver_data; |
307 | char *tmp; | 307 | char *tmp; |
@@ -360,7 +360,7 @@ qeth_dev_route_show(struct qeth_card *card, struct qeth_routing_info *route, | |||
360 | } | 360 | } |
361 | 361 | ||
362 | static ssize_t | 362 | static ssize_t |
363 | qeth_dev_route4_show(struct device *dev, char *buf) | 363 | qeth_dev_route4_show(struct device *dev, struct device_attribute *attr, char *buf) |
364 | { | 364 | { |
365 | struct qeth_card *card = dev->driver_data; | 365 | struct qeth_card *card = dev->driver_data; |
366 | 366 | ||
@@ -410,7 +410,7 @@ qeth_dev_route_store(struct qeth_card *card, struct qeth_routing_info *route, | |||
410 | } | 410 | } |
411 | 411 | ||
412 | static ssize_t | 412 | static ssize_t |
413 | qeth_dev_route4_store(struct device *dev, const char *buf, size_t count) | 413 | qeth_dev_route4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
414 | { | 414 | { |
415 | struct qeth_card *card = dev->driver_data; | 415 | struct qeth_card *card = dev->driver_data; |
416 | 416 | ||
@@ -425,7 +425,7 @@ static DEVICE_ATTR(route4, 0644, qeth_dev_route4_show, qeth_dev_route4_store); | |||
425 | 425 | ||
426 | #ifdef CONFIG_QETH_IPV6 | 426 | #ifdef CONFIG_QETH_IPV6 |
427 | static ssize_t | 427 | static ssize_t |
428 | qeth_dev_route6_show(struct device *dev, char *buf) | 428 | qeth_dev_route6_show(struct device *dev, struct device_attribute *attr, char *buf) |
429 | { | 429 | { |
430 | struct qeth_card *card = dev->driver_data; | 430 | struct qeth_card *card = dev->driver_data; |
431 | 431 | ||
@@ -439,7 +439,7 @@ qeth_dev_route6_show(struct device *dev, char *buf) | |||
439 | } | 439 | } |
440 | 440 | ||
441 | static ssize_t | 441 | static ssize_t |
442 | qeth_dev_route6_store(struct device *dev, const char *buf, size_t count) | 442 | qeth_dev_route6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
443 | { | 443 | { |
444 | struct qeth_card *card = dev->driver_data; | 444 | struct qeth_card *card = dev->driver_data; |
445 | 445 | ||
@@ -461,7 +461,7 @@ static DEVICE_ATTR(route6, 0644, qeth_dev_route6_show, qeth_dev_route6_store); | |||
461 | #endif | 461 | #endif |
462 | 462 | ||
463 | static ssize_t | 463 | static ssize_t |
464 | qeth_dev_add_hhlen_show(struct device *dev, char *buf) | 464 | qeth_dev_add_hhlen_show(struct device *dev, struct device_attribute *attr, char *buf) |
465 | { | 465 | { |
466 | struct qeth_card *card = dev->driver_data; | 466 | struct qeth_card *card = dev->driver_data; |
467 | 467 | ||
@@ -472,7 +472,7 @@ qeth_dev_add_hhlen_show(struct device *dev, char *buf) | |||
472 | } | 472 | } |
473 | 473 | ||
474 | static ssize_t | 474 | static ssize_t |
475 | qeth_dev_add_hhlen_store(struct device *dev, const char *buf, size_t count) | 475 | qeth_dev_add_hhlen_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
476 | { | 476 | { |
477 | struct qeth_card *card = dev->driver_data; | 477 | struct qeth_card *card = dev->driver_data; |
478 | char *tmp; | 478 | char *tmp; |
@@ -499,7 +499,7 @@ static DEVICE_ATTR(add_hhlen, 0644, qeth_dev_add_hhlen_show, | |||
499 | qeth_dev_add_hhlen_store); | 499 | qeth_dev_add_hhlen_store); |
500 | 500 | ||
501 | static ssize_t | 501 | static ssize_t |
502 | qeth_dev_fake_ll_show(struct device *dev, char *buf) | 502 | qeth_dev_fake_ll_show(struct device *dev, struct device_attribute *attr, char *buf) |
503 | { | 503 | { |
504 | struct qeth_card *card = dev->driver_data; | 504 | struct qeth_card *card = dev->driver_data; |
505 | 505 | ||
@@ -510,7 +510,7 @@ qeth_dev_fake_ll_show(struct device *dev, char *buf) | |||
510 | } | 510 | } |
511 | 511 | ||
512 | static ssize_t | 512 | static ssize_t |
513 | qeth_dev_fake_ll_store(struct device *dev, const char *buf, size_t count) | 513 | qeth_dev_fake_ll_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
514 | { | 514 | { |
515 | struct qeth_card *card = dev->driver_data; | 515 | struct qeth_card *card = dev->driver_data; |
516 | char *tmp; | 516 | char *tmp; |
@@ -536,7 +536,7 @@ static DEVICE_ATTR(fake_ll, 0644, qeth_dev_fake_ll_show, | |||
536 | qeth_dev_fake_ll_store); | 536 | qeth_dev_fake_ll_store); |
537 | 537 | ||
538 | static ssize_t | 538 | static ssize_t |
539 | qeth_dev_fake_broadcast_show(struct device *dev, char *buf) | 539 | qeth_dev_fake_broadcast_show(struct device *dev, struct device_attribute *attr, char *buf) |
540 | { | 540 | { |
541 | struct qeth_card *card = dev->driver_data; | 541 | struct qeth_card *card = dev->driver_data; |
542 | 542 | ||
@@ -547,7 +547,7 @@ qeth_dev_fake_broadcast_show(struct device *dev, char *buf) | |||
547 | } | 547 | } |
548 | 548 | ||
549 | static ssize_t | 549 | static ssize_t |
550 | qeth_dev_fake_broadcast_store(struct device *dev, const char *buf, size_t count) | 550 | qeth_dev_fake_broadcast_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
551 | { | 551 | { |
552 | struct qeth_card *card = dev->driver_data; | 552 | struct qeth_card *card = dev->driver_data; |
553 | char *tmp; | 553 | char *tmp; |
@@ -574,7 +574,7 @@ static DEVICE_ATTR(fake_broadcast, 0644, qeth_dev_fake_broadcast_show, | |||
574 | qeth_dev_fake_broadcast_store); | 574 | qeth_dev_fake_broadcast_store); |
575 | 575 | ||
576 | static ssize_t | 576 | static ssize_t |
577 | qeth_dev_recover_store(struct device *dev, const char *buf, size_t count) | 577 | qeth_dev_recover_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
578 | { | 578 | { |
579 | struct qeth_card *card = dev->driver_data; | 579 | struct qeth_card *card = dev->driver_data; |
580 | char *tmp; | 580 | char *tmp; |
@@ -596,7 +596,7 @@ qeth_dev_recover_store(struct device *dev, const char *buf, size_t count) | |||
596 | static DEVICE_ATTR(recover, 0200, NULL, qeth_dev_recover_store); | 596 | static DEVICE_ATTR(recover, 0200, NULL, qeth_dev_recover_store); |
597 | 597 | ||
598 | static ssize_t | 598 | static ssize_t |
599 | qeth_dev_broadcast_mode_show(struct device *dev, char *buf) | 599 | qeth_dev_broadcast_mode_show(struct device *dev, struct device_attribute *attr, char *buf) |
600 | { | 600 | { |
601 | struct qeth_card *card = dev->driver_data; | 601 | struct qeth_card *card = dev->driver_data; |
602 | 602 | ||
@@ -613,7 +613,7 @@ qeth_dev_broadcast_mode_show(struct device *dev, char *buf) | |||
613 | } | 613 | } |
614 | 614 | ||
615 | static ssize_t | 615 | static ssize_t |
616 | qeth_dev_broadcast_mode_store(struct device *dev, const char *buf, size_t count) | 616 | qeth_dev_broadcast_mode_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
617 | { | 617 | { |
618 | struct qeth_card *card = dev->driver_data; | 618 | struct qeth_card *card = dev->driver_data; |
619 | char *tmp; | 619 | char *tmp; |
@@ -651,7 +651,7 @@ static DEVICE_ATTR(broadcast_mode, 0644, qeth_dev_broadcast_mode_show, | |||
651 | qeth_dev_broadcast_mode_store); | 651 | qeth_dev_broadcast_mode_store); |
652 | 652 | ||
653 | static ssize_t | 653 | static ssize_t |
654 | qeth_dev_canonical_macaddr_show(struct device *dev, char *buf) | 654 | qeth_dev_canonical_macaddr_show(struct device *dev, struct device_attribute *attr, char *buf) |
655 | { | 655 | { |
656 | struct qeth_card *card = dev->driver_data; | 656 | struct qeth_card *card = dev->driver_data; |
657 | 657 | ||
@@ -667,7 +667,7 @@ qeth_dev_canonical_macaddr_show(struct device *dev, char *buf) | |||
667 | } | 667 | } |
668 | 668 | ||
669 | static ssize_t | 669 | static ssize_t |
670 | qeth_dev_canonical_macaddr_store(struct device *dev, const char *buf, | 670 | qeth_dev_canonical_macaddr_store(struct device *dev, struct device_attribute *attr, const char *buf, |
671 | size_t count) | 671 | size_t count) |
672 | { | 672 | { |
673 | struct qeth_card *card = dev->driver_data; | 673 | struct qeth_card *card = dev->driver_data; |
@@ -703,7 +703,7 @@ static DEVICE_ATTR(canonical_macaddr, 0644, qeth_dev_canonical_macaddr_show, | |||
703 | qeth_dev_canonical_macaddr_store); | 703 | qeth_dev_canonical_macaddr_store); |
704 | 704 | ||
705 | static ssize_t | 705 | static ssize_t |
706 | qeth_dev_layer2_show(struct device *dev, char *buf) | 706 | qeth_dev_layer2_show(struct device *dev, struct device_attribute *attr, char *buf) |
707 | { | 707 | { |
708 | struct qeth_card *card = dev->driver_data; | 708 | struct qeth_card *card = dev->driver_data; |
709 | 709 | ||
@@ -714,7 +714,7 @@ qeth_dev_layer2_show(struct device *dev, char *buf) | |||
714 | } | 714 | } |
715 | 715 | ||
716 | static ssize_t | 716 | static ssize_t |
717 | qeth_dev_layer2_store(struct device *dev, const char *buf, size_t count) | 717 | qeth_dev_layer2_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
718 | { | 718 | { |
719 | struct qeth_card *card = dev->driver_data; | 719 | struct qeth_card *card = dev->driver_data; |
720 | char *tmp; | 720 | char *tmp; |
@@ -742,7 +742,7 @@ static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show, | |||
742 | qeth_dev_layer2_store); | 742 | qeth_dev_layer2_store); |
743 | 743 | ||
744 | static ssize_t | 744 | static ssize_t |
745 | qeth_dev_large_send_show(struct device *dev, char *buf) | 745 | qeth_dev_large_send_show(struct device *dev, struct device_attribute *attr, char *buf) |
746 | { | 746 | { |
747 | struct qeth_card *card = dev->driver_data; | 747 | struct qeth_card *card = dev->driver_data; |
748 | 748 | ||
@@ -762,7 +762,7 @@ qeth_dev_large_send_show(struct device *dev, char *buf) | |||
762 | } | 762 | } |
763 | 763 | ||
764 | static ssize_t | 764 | static ssize_t |
765 | qeth_dev_large_send_store(struct device *dev, const char *buf, size_t count) | 765 | qeth_dev_large_send_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
766 | { | 766 | { |
767 | struct qeth_card *card = dev->driver_data; | 767 | struct qeth_card *card = dev->driver_data; |
768 | enum qeth_large_send_types type; | 768 | enum qeth_large_send_types type; |
@@ -832,7 +832,7 @@ qeth_dev_blkt_store(struct qeth_card *card, const char *buf, size_t count, | |||
832 | } | 832 | } |
833 | 833 | ||
834 | static ssize_t | 834 | static ssize_t |
835 | qeth_dev_blkt_total_show(struct device *dev, char *buf) | 835 | qeth_dev_blkt_total_show(struct device *dev, struct device_attribute *attr, char *buf) |
836 | { | 836 | { |
837 | struct qeth_card *card = dev->driver_data; | 837 | struct qeth_card *card = dev->driver_data; |
838 | 838 | ||
@@ -841,7 +841,7 @@ qeth_dev_blkt_total_show(struct device *dev, char *buf) | |||
841 | 841 | ||
842 | 842 | ||
843 | static ssize_t | 843 | static ssize_t |
844 | qeth_dev_blkt_total_store(struct device *dev, const char *buf, size_t count) | 844 | qeth_dev_blkt_total_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
845 | { | 845 | { |
846 | struct qeth_card *card = dev->driver_data; | 846 | struct qeth_card *card = dev->driver_data; |
847 | 847 | ||
@@ -855,7 +855,7 @@ static DEVICE_ATTR(total, 0644, qeth_dev_blkt_total_show, | |||
855 | qeth_dev_blkt_total_store); | 855 | qeth_dev_blkt_total_store); |
856 | 856 | ||
857 | static ssize_t | 857 | static ssize_t |
858 | qeth_dev_blkt_inter_show(struct device *dev, char *buf) | 858 | qeth_dev_blkt_inter_show(struct device *dev, struct device_attribute *attr, char *buf) |
859 | { | 859 | { |
860 | struct qeth_card *card = dev->driver_data; | 860 | struct qeth_card *card = dev->driver_data; |
861 | 861 | ||
@@ -864,7 +864,7 @@ qeth_dev_blkt_inter_show(struct device *dev, char *buf) | |||
864 | 864 | ||
865 | 865 | ||
866 | static ssize_t | 866 | static ssize_t |
867 | qeth_dev_blkt_inter_store(struct device *dev, const char *buf, size_t count) | 867 | qeth_dev_blkt_inter_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
868 | { | 868 | { |
869 | struct qeth_card *card = dev->driver_data; | 869 | struct qeth_card *card = dev->driver_data; |
870 | 870 | ||
@@ -876,7 +876,7 @@ static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show, | |||
876 | qeth_dev_blkt_inter_store); | 876 | qeth_dev_blkt_inter_store); |
877 | 877 | ||
878 | static ssize_t | 878 | static ssize_t |
879 | qeth_dev_blkt_inter_jumbo_show(struct device *dev, char *buf) | 879 | qeth_dev_blkt_inter_jumbo_show(struct device *dev, struct device_attribute *attr, char *buf) |
880 | { | 880 | { |
881 | struct qeth_card *card = dev->driver_data; | 881 | struct qeth_card *card = dev->driver_data; |
882 | 882 | ||
@@ -886,7 +886,7 @@ qeth_dev_blkt_inter_jumbo_show(struct device *dev, char *buf) | |||
886 | 886 | ||
887 | 887 | ||
888 | static ssize_t | 888 | static ssize_t |
889 | qeth_dev_blkt_inter_jumbo_store(struct device *dev, const char *buf, size_t count) | 889 | qeth_dev_blkt_inter_jumbo_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
890 | { | 890 | { |
891 | struct qeth_card *card = dev->driver_data; | 891 | struct qeth_card *card = dev->driver_data; |
892 | 892 | ||
@@ -956,7 +956,7 @@ qeth_check_layer2(struct qeth_card *card) | |||
956 | 956 | ||
957 | 957 | ||
958 | static ssize_t | 958 | static ssize_t |
959 | qeth_dev_ipato_enable_show(struct device *dev, char *buf) | 959 | qeth_dev_ipato_enable_show(struct device *dev, struct device_attribute *attr, char *buf) |
960 | { | 960 | { |
961 | struct qeth_card *card = dev->driver_data; | 961 | struct qeth_card *card = dev->driver_data; |
962 | 962 | ||
@@ -969,7 +969,7 @@ qeth_dev_ipato_enable_show(struct device *dev, char *buf) | |||
969 | } | 969 | } |
970 | 970 | ||
971 | static ssize_t | 971 | static ssize_t |
972 | qeth_dev_ipato_enable_store(struct device *dev, const char *buf, size_t count) | 972 | qeth_dev_ipato_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
973 | { | 973 | { |
974 | struct qeth_card *card = dev->driver_data; | 974 | struct qeth_card *card = dev->driver_data; |
975 | char *tmp; | 975 | char *tmp; |
@@ -1004,7 +1004,7 @@ static QETH_DEVICE_ATTR(ipato_enable, enable, 0644, | |||
1004 | qeth_dev_ipato_enable_store); | 1004 | qeth_dev_ipato_enable_store); |
1005 | 1005 | ||
1006 | static ssize_t | 1006 | static ssize_t |
1007 | qeth_dev_ipato_invert4_show(struct device *dev, char *buf) | 1007 | qeth_dev_ipato_invert4_show(struct device *dev, struct device_attribute *attr, char *buf) |
1008 | { | 1008 | { |
1009 | struct qeth_card *card = dev->driver_data; | 1009 | struct qeth_card *card = dev->driver_data; |
1010 | 1010 | ||
@@ -1018,7 +1018,7 @@ qeth_dev_ipato_invert4_show(struct device *dev, char *buf) | |||
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | static ssize_t | 1020 | static ssize_t |
1021 | qeth_dev_ipato_invert4_store(struct device *dev, const char *buf, size_t count) | 1021 | qeth_dev_ipato_invert4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1022 | { | 1022 | { |
1023 | struct qeth_card *card = dev->driver_data; | 1023 | struct qeth_card *card = dev->driver_data; |
1024 | char *tmp; | 1024 | char *tmp; |
@@ -1084,7 +1084,7 @@ qeth_dev_ipato_add_show(char *buf, struct qeth_card *card, | |||
1084 | } | 1084 | } |
1085 | 1085 | ||
1086 | static ssize_t | 1086 | static ssize_t |
1087 | qeth_dev_ipato_add4_show(struct device *dev, char *buf) | 1087 | qeth_dev_ipato_add4_show(struct device *dev, struct device_attribute *attr, char *buf) |
1088 | { | 1088 | { |
1089 | struct qeth_card *card = dev->driver_data; | 1089 | struct qeth_card *card = dev->driver_data; |
1090 | 1090 | ||
@@ -1153,7 +1153,7 @@ qeth_dev_ipato_add_store(const char *buf, size_t count, | |||
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | static ssize_t | 1155 | static ssize_t |
1156 | qeth_dev_ipato_add4_store(struct device *dev, const char *buf, size_t count) | 1156 | qeth_dev_ipato_add4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1157 | { | 1157 | { |
1158 | struct qeth_card *card = dev->driver_data; | 1158 | struct qeth_card *card = dev->driver_data; |
1159 | 1159 | ||
@@ -1186,7 +1186,7 @@ qeth_dev_ipato_del_store(const char *buf, size_t count, | |||
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | static ssize_t | 1188 | static ssize_t |
1189 | qeth_dev_ipato_del4_store(struct device *dev, const char *buf, size_t count) | 1189 | qeth_dev_ipato_del4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1190 | { | 1190 | { |
1191 | struct qeth_card *card = dev->driver_data; | 1191 | struct qeth_card *card = dev->driver_data; |
1192 | 1192 | ||
@@ -1201,7 +1201,7 @@ static QETH_DEVICE_ATTR(ipato_del4, del4, 0200, NULL, | |||
1201 | 1201 | ||
1202 | #ifdef CONFIG_QETH_IPV6 | 1202 | #ifdef CONFIG_QETH_IPV6 |
1203 | static ssize_t | 1203 | static ssize_t |
1204 | qeth_dev_ipato_invert6_show(struct device *dev, char *buf) | 1204 | qeth_dev_ipato_invert6_show(struct device *dev, struct device_attribute *attr, char *buf) |
1205 | { | 1205 | { |
1206 | struct qeth_card *card = dev->driver_data; | 1206 | struct qeth_card *card = dev->driver_data; |
1207 | 1207 | ||
@@ -1215,7 +1215,7 @@ qeth_dev_ipato_invert6_show(struct device *dev, char *buf) | |||
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | static ssize_t | 1217 | static ssize_t |
1218 | qeth_dev_ipato_invert6_store(struct device *dev, const char *buf, size_t count) | 1218 | qeth_dev_ipato_invert6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1219 | { | 1219 | { |
1220 | struct qeth_card *card = dev->driver_data; | 1220 | struct qeth_card *card = dev->driver_data; |
1221 | char *tmp; | 1221 | char *tmp; |
@@ -1247,7 +1247,7 @@ static QETH_DEVICE_ATTR(ipato_invert6, invert6, 0644, | |||
1247 | 1247 | ||
1248 | 1248 | ||
1249 | static ssize_t | 1249 | static ssize_t |
1250 | qeth_dev_ipato_add6_show(struct device *dev, char *buf) | 1250 | qeth_dev_ipato_add6_show(struct device *dev, struct device_attribute *attr, char *buf) |
1251 | { | 1251 | { |
1252 | struct qeth_card *card = dev->driver_data; | 1252 | struct qeth_card *card = dev->driver_data; |
1253 | 1253 | ||
@@ -1258,7 +1258,7 @@ qeth_dev_ipato_add6_show(struct device *dev, char *buf) | |||
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | static ssize_t | 1260 | static ssize_t |
1261 | qeth_dev_ipato_add6_store(struct device *dev, const char *buf, size_t count) | 1261 | qeth_dev_ipato_add6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1262 | { | 1262 | { |
1263 | struct qeth_card *card = dev->driver_data; | 1263 | struct qeth_card *card = dev->driver_data; |
1264 | 1264 | ||
@@ -1273,7 +1273,7 @@ static QETH_DEVICE_ATTR(ipato_add6, add6, 0644, | |||
1273 | qeth_dev_ipato_add6_store); | 1273 | qeth_dev_ipato_add6_store); |
1274 | 1274 | ||
1275 | static ssize_t | 1275 | static ssize_t |
1276 | qeth_dev_ipato_del6_store(struct device *dev, const char *buf, size_t count) | 1276 | qeth_dev_ipato_del6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1277 | { | 1277 | { |
1278 | struct qeth_card *card = dev->driver_data; | 1278 | struct qeth_card *card = dev->driver_data; |
1279 | 1279 | ||
@@ -1341,7 +1341,7 @@ qeth_dev_vipa_add_show(char *buf, struct qeth_card *card, | |||
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | static ssize_t | 1343 | static ssize_t |
1344 | qeth_dev_vipa_add4_show(struct device *dev, char *buf) | 1344 | qeth_dev_vipa_add4_show(struct device *dev, struct device_attribute *attr, char *buf) |
1345 | { | 1345 | { |
1346 | struct qeth_card *card = dev->driver_data; | 1346 | struct qeth_card *card = dev->driver_data; |
1347 | 1347 | ||
@@ -1381,7 +1381,7 @@ qeth_dev_vipa_add_store(const char *buf, size_t count, | |||
1381 | } | 1381 | } |
1382 | 1382 | ||
1383 | static ssize_t | 1383 | static ssize_t |
1384 | qeth_dev_vipa_add4_store(struct device *dev, const char *buf, size_t count) | 1384 | qeth_dev_vipa_add4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1385 | { | 1385 | { |
1386 | struct qeth_card *card = dev->driver_data; | 1386 | struct qeth_card *card = dev->driver_data; |
1387 | 1387 | ||
@@ -1413,7 +1413,7 @@ qeth_dev_vipa_del_store(const char *buf, size_t count, | |||
1413 | } | 1413 | } |
1414 | 1414 | ||
1415 | static ssize_t | 1415 | static ssize_t |
1416 | qeth_dev_vipa_del4_store(struct device *dev, const char *buf, size_t count) | 1416 | qeth_dev_vipa_del4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1417 | { | 1417 | { |
1418 | struct qeth_card *card = dev->driver_data; | 1418 | struct qeth_card *card = dev->driver_data; |
1419 | 1419 | ||
@@ -1428,7 +1428,7 @@ static QETH_DEVICE_ATTR(vipa_del4, del4, 0200, NULL, | |||
1428 | 1428 | ||
1429 | #ifdef CONFIG_QETH_IPV6 | 1429 | #ifdef CONFIG_QETH_IPV6 |
1430 | static ssize_t | 1430 | static ssize_t |
1431 | qeth_dev_vipa_add6_show(struct device *dev, char *buf) | 1431 | qeth_dev_vipa_add6_show(struct device *dev, struct device_attribute *attr, char *buf) |
1432 | { | 1432 | { |
1433 | struct qeth_card *card = dev->driver_data; | 1433 | struct qeth_card *card = dev->driver_data; |
1434 | 1434 | ||
@@ -1439,7 +1439,7 @@ qeth_dev_vipa_add6_show(struct device *dev, char *buf) | |||
1439 | } | 1439 | } |
1440 | 1440 | ||
1441 | static ssize_t | 1441 | static ssize_t |
1442 | qeth_dev_vipa_add6_store(struct device *dev, const char *buf, size_t count) | 1442 | qeth_dev_vipa_add6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1443 | { | 1443 | { |
1444 | struct qeth_card *card = dev->driver_data; | 1444 | struct qeth_card *card = dev->driver_data; |
1445 | 1445 | ||
@@ -1454,7 +1454,7 @@ static QETH_DEVICE_ATTR(vipa_add6, add6, 0644, | |||
1454 | qeth_dev_vipa_add6_store); | 1454 | qeth_dev_vipa_add6_store); |
1455 | 1455 | ||
1456 | static ssize_t | 1456 | static ssize_t |
1457 | qeth_dev_vipa_del6_store(struct device *dev, const char *buf, size_t count) | 1457 | qeth_dev_vipa_del6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1458 | { | 1458 | { |
1459 | struct qeth_card *card = dev->driver_data; | 1459 | struct qeth_card *card = dev->driver_data; |
1460 | 1460 | ||
@@ -1522,7 +1522,7 @@ qeth_dev_rxip_add_show(char *buf, struct qeth_card *card, | |||
1522 | } | 1522 | } |
1523 | 1523 | ||
1524 | static ssize_t | 1524 | static ssize_t |
1525 | qeth_dev_rxip_add4_show(struct device *dev, char *buf) | 1525 | qeth_dev_rxip_add4_show(struct device *dev, struct device_attribute *attr, char *buf) |
1526 | { | 1526 | { |
1527 | struct qeth_card *card = dev->driver_data; | 1527 | struct qeth_card *card = dev->driver_data; |
1528 | 1528 | ||
@@ -1562,7 +1562,7 @@ qeth_dev_rxip_add_store(const char *buf, size_t count, | |||
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | static ssize_t | 1564 | static ssize_t |
1565 | qeth_dev_rxip_add4_store(struct device *dev, const char *buf, size_t count) | 1565 | qeth_dev_rxip_add4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1566 | { | 1566 | { |
1567 | struct qeth_card *card = dev->driver_data; | 1567 | struct qeth_card *card = dev->driver_data; |
1568 | 1568 | ||
@@ -1594,7 +1594,7 @@ qeth_dev_rxip_del_store(const char *buf, size_t count, | |||
1594 | } | 1594 | } |
1595 | 1595 | ||
1596 | static ssize_t | 1596 | static ssize_t |
1597 | qeth_dev_rxip_del4_store(struct device *dev, const char *buf, size_t count) | 1597 | qeth_dev_rxip_del4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1598 | { | 1598 | { |
1599 | struct qeth_card *card = dev->driver_data; | 1599 | struct qeth_card *card = dev->driver_data; |
1600 | 1600 | ||
@@ -1609,7 +1609,7 @@ static QETH_DEVICE_ATTR(rxip_del4, del4, 0200, NULL, | |||
1609 | 1609 | ||
1610 | #ifdef CONFIG_QETH_IPV6 | 1610 | #ifdef CONFIG_QETH_IPV6 |
1611 | static ssize_t | 1611 | static ssize_t |
1612 | qeth_dev_rxip_add6_show(struct device *dev, char *buf) | 1612 | qeth_dev_rxip_add6_show(struct device *dev, struct device_attribute *attr, char *buf) |
1613 | { | 1613 | { |
1614 | struct qeth_card *card = dev->driver_data; | 1614 | struct qeth_card *card = dev->driver_data; |
1615 | 1615 | ||
@@ -1620,7 +1620,7 @@ qeth_dev_rxip_add6_show(struct device *dev, char *buf) | |||
1620 | } | 1620 | } |
1621 | 1621 | ||
1622 | static ssize_t | 1622 | static ssize_t |
1623 | qeth_dev_rxip_add6_store(struct device *dev, const char *buf, size_t count) | 1623 | qeth_dev_rxip_add6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1624 | { | 1624 | { |
1625 | struct qeth_card *card = dev->driver_data; | 1625 | struct qeth_card *card = dev->driver_data; |
1626 | 1626 | ||
@@ -1635,7 +1635,7 @@ static QETH_DEVICE_ATTR(rxip_add6, add6, 0644, | |||
1635 | qeth_dev_rxip_add6_store); | 1635 | qeth_dev_rxip_add6_store); |
1636 | 1636 | ||
1637 | static ssize_t | 1637 | static ssize_t |
1638 | qeth_dev_rxip_del6_store(struct device *dev, const char *buf, size_t count) | 1638 | qeth_dev_rxip_del6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1639 | { | 1639 | { |
1640 | struct qeth_card *card = dev->driver_data; | 1640 | struct qeth_card *card = dev->driver_data; |
1641 | 1641 | ||
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 68d151aaa474..e17b4d58a9f6 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -97,11 +97,6 @@ MODULE_PARM_DESC(loglevel, | |||
97 | "FC ERP QDIO CIO Config FSF SCSI Other, " | 97 | "FC ERP QDIO CIO Config FSF SCSI Other, " |
98 | "levels: 0=none 1=normal 2=devel 3=trace"); | 98 | "levels: 0=none 1=normal 2=devel 3=trace"); |
99 | 99 | ||
100 | #ifdef ZFCP_PRINT_FLAGS | ||
101 | u32 flags_dump = 0; | ||
102 | module_param(flags_dump, uint, 0); | ||
103 | #endif | ||
104 | |||
105 | /****************************************************************/ | 100 | /****************************************************************/ |
106 | /************** Functions without logging ***********************/ | 101 | /************** Functions without logging ***********************/ |
107 | /****************************************************************/ | 102 | /****************************************************************/ |
@@ -223,13 +218,20 @@ zfcp_in_els_dbf_event(struct zfcp_adapter *adapter, const char *text, | |||
223 | * Parse "device=..." parameter string. | 218 | * Parse "device=..." parameter string. |
224 | */ | 219 | */ |
225 | static int __init | 220 | static int __init |
226 | zfcp_device_setup(char *str) | 221 | zfcp_device_setup(char *devstr) |
227 | { | 222 | { |
228 | char *tmp; | 223 | char *tmp, *str; |
224 | size_t len; | ||
229 | 225 | ||
230 | if (!str) | 226 | if (!devstr) |
231 | return 0; | 227 | return 0; |
232 | 228 | ||
229 | len = strlen(devstr) + 1; | ||
230 | str = (char *) kmalloc(len, GFP_KERNEL); | ||
231 | if (!str) | ||
232 | goto err_out; | ||
233 | memcpy(str, devstr, len); | ||
234 | |||
233 | tmp = strchr(str, ','); | 235 | tmp = strchr(str, ','); |
234 | if (!tmp) | 236 | if (!tmp) |
235 | goto err_out; | 237 | goto err_out; |
@@ -246,10 +248,12 @@ zfcp_device_setup(char *str) | |||
246 | zfcp_data.init_fcp_lun = simple_strtoull(tmp, &tmp, 0); | 248 | zfcp_data.init_fcp_lun = simple_strtoull(tmp, &tmp, 0); |
247 | if (*tmp != '\0') | 249 | if (*tmp != '\0') |
248 | goto err_out; | 250 | goto err_out; |
251 | kfree(str); | ||
249 | return 1; | 252 | return 1; |
250 | 253 | ||
251 | err_out: | 254 | err_out: |
252 | ZFCP_LOG_NORMAL("Parse error for device parameter string %s\n", str); | 255 | ZFCP_LOG_NORMAL("Parse error for device parameter string %s\n", str); |
256 | kfree(str); | ||
253 | return 0; | 257 | return 0; |
254 | } | 258 | } |
255 | 259 | ||
@@ -525,7 +529,7 @@ zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, | |||
525 | 529 | ||
526 | out: | 530 | out: |
527 | if (fsf_req != NULL) | 531 | if (fsf_req != NULL) |
528 | zfcp_fsf_req_cleanup(fsf_req); | 532 | zfcp_fsf_req_free(fsf_req); |
529 | 533 | ||
530 | if ((adapter != NULL) && (retval != -ENXIO)) | 534 | if ((adapter != NULL) && (retval != -ENXIO)) |
531 | zfcp_adapter_put(adapter); | 535 | zfcp_adapter_put(adapter); |
@@ -1154,7 +1158,7 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) | |||
1154 | INIT_LIST_HEAD(&adapter->port_remove_lh); | 1158 | INIT_LIST_HEAD(&adapter->port_remove_lh); |
1155 | 1159 | ||
1156 | /* initialize list of fsf requests */ | 1160 | /* initialize list of fsf requests */ |
1157 | rwlock_init(&adapter->fsf_req_list_lock); | 1161 | spin_lock_init(&adapter->fsf_req_list_lock); |
1158 | INIT_LIST_HEAD(&adapter->fsf_req_list_head); | 1162 | INIT_LIST_HEAD(&adapter->fsf_req_list_head); |
1159 | 1163 | ||
1160 | /* initialize abort lock */ | 1164 | /* initialize abort lock */ |
@@ -1239,9 +1243,9 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter) | |||
1239 | zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); | 1243 | zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); |
1240 | dev_set_drvdata(&adapter->ccw_device->dev, NULL); | 1244 | dev_set_drvdata(&adapter->ccw_device->dev, NULL); |
1241 | /* sanity check: no pending FSF requests */ | 1245 | /* sanity check: no pending FSF requests */ |
1242 | read_lock_irqsave(&adapter->fsf_req_list_lock, flags); | 1246 | spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); |
1243 | retval = !list_empty(&adapter->fsf_req_list_head); | 1247 | retval = !list_empty(&adapter->fsf_req_list_head); |
1244 | read_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); | 1248 | spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); |
1245 | if (retval) { | 1249 | if (retval) { |
1246 | ZFCP_LOG_NORMAL("bug: adapter %s (%p) still in use, " | 1250 | ZFCP_LOG_NORMAL("bug: adapter %s (%p) still in use, " |
1247 | "%i requests outstanding\n", | 1251 | "%i requests outstanding\n", |
@@ -1483,19 +1487,15 @@ zfcp_fsf_incoming_els_rscn(struct zfcp_adapter *adapter, | |||
1483 | fcp_rscn_element++; | 1487 | fcp_rscn_element++; |
1484 | switch (fcp_rscn_element->addr_format) { | 1488 | switch (fcp_rscn_element->addr_format) { |
1485 | case ZFCP_PORT_ADDRESS: | 1489 | case ZFCP_PORT_ADDRESS: |
1486 | ZFCP_LOG_FLAGS(1, "ZFCP_PORT_ADDRESS\n"); | ||
1487 | range_mask = ZFCP_PORTS_RANGE_PORT; | 1490 | range_mask = ZFCP_PORTS_RANGE_PORT; |
1488 | break; | 1491 | break; |
1489 | case ZFCP_AREA_ADDRESS: | 1492 | case ZFCP_AREA_ADDRESS: |
1490 | ZFCP_LOG_FLAGS(1, "ZFCP_AREA_ADDRESS\n"); | ||
1491 | range_mask = ZFCP_PORTS_RANGE_AREA; | 1493 | range_mask = ZFCP_PORTS_RANGE_AREA; |
1492 | break; | 1494 | break; |
1493 | case ZFCP_DOMAIN_ADDRESS: | 1495 | case ZFCP_DOMAIN_ADDRESS: |
1494 | ZFCP_LOG_FLAGS(1, "ZFCP_DOMAIN_ADDRESS\n"); | ||
1495 | range_mask = ZFCP_PORTS_RANGE_DOMAIN; | 1496 | range_mask = ZFCP_PORTS_RANGE_DOMAIN; |
1496 | break; | 1497 | break; |
1497 | case ZFCP_FABRIC_ADDRESS: | 1498 | case ZFCP_FABRIC_ADDRESS: |
1498 | ZFCP_LOG_FLAGS(1, "ZFCP_FABRIC_ADDRESS\n"); | ||
1499 | range_mask = ZFCP_PORTS_RANGE_FABRIC; | 1499 | range_mask = ZFCP_PORTS_RANGE_FABRIC; |
1500 | break; | 1500 | break; |
1501 | default: | 1501 | default: |
@@ -1762,7 +1762,10 @@ static void zfcp_ns_gid_pn_handler(unsigned long data) | |||
1762 | ct_iu_req = zfcp_sg_to_address(ct->req); | 1762 | ct_iu_req = zfcp_sg_to_address(ct->req); |
1763 | ct_iu_resp = zfcp_sg_to_address(ct->resp); | 1763 | ct_iu_resp = zfcp_sg_to_address(ct->resp); |
1764 | 1764 | ||
1765 | if ((ct->status != 0) || zfcp_check_ct_response(&ct_iu_resp->header)) { | 1765 | if (ct->status != 0) |
1766 | goto failed; | ||
1767 | |||
1768 | if (zfcp_check_ct_response(&ct_iu_resp->header)) { | ||
1766 | /* FIXME: do we need some specific erp entry points */ | 1769 | /* FIXME: do we need some specific erp entry points */ |
1767 | atomic_set_mask(ZFCP_STATUS_PORT_INVALID_WWPN, &port->status); | 1770 | atomic_set_mask(ZFCP_STATUS_PORT_INVALID_WWPN, &port->status); |
1768 | goto failed; | 1771 | goto failed; |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index c5daf372f853..4103b5be7683 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -62,9 +62,6 @@ | |||
62 | #include <linux/syscalls.h> | 62 | #include <linux/syscalls.h> |
63 | #include <linux/ioctl.h> | 63 | #include <linux/ioctl.h> |
64 | 64 | ||
65 | /************************ DEBUG FLAGS *****************************************/ | ||
66 | |||
67 | #define ZFCP_PRINT_FLAGS | ||
68 | 65 | ||
69 | /********************* GENERAL DEFINES *********************************/ | 66 | /********************* GENERAL DEFINES *********************************/ |
70 | 67 | ||
@@ -152,8 +149,10 @@ typedef u32 scsi_lun_t; | |||
152 | #define FSF_QTCB_UNSOLICITED_STATUS 0x6305 | 149 | #define FSF_QTCB_UNSOLICITED_STATUS 0x6305 |
153 | #define ZFCP_STATUS_READ_FAILED_THRESHOLD 3 | 150 | #define ZFCP_STATUS_READ_FAILED_THRESHOLD 3 |
154 | #define ZFCP_STATUS_READS_RECOM FSF_STATUS_READS_RECOM | 151 | #define ZFCP_STATUS_READS_RECOM FSF_STATUS_READS_RECOM |
155 | #define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 6 | 152 | |
156 | #define ZFCP_EXCHANGE_CONFIG_DATA_SLEEP 50 | 153 | /* Do 1st retry in 1 second, then double the timeout for each following retry */ |
154 | #define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 100 | ||
155 | #define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 7 | ||
157 | 156 | ||
158 | /* timeout value for "default timer" for fsf requests */ | 157 | /* timeout value for "default timer" for fsf requests */ |
159 | #define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ); | 158 | #define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ); |
@@ -472,17 +471,6 @@ do { \ | |||
472 | ZFCP_LOG(ZFCP_LOG_LEVEL_TRACE, fmt , ##args) | 471 | ZFCP_LOG(ZFCP_LOG_LEVEL_TRACE, fmt , ##args) |
473 | #endif | 472 | #endif |
474 | 473 | ||
475 | #ifndef ZFCP_PRINT_FLAGS | ||
476 | # define ZFCP_LOG_FLAGS(level, fmt, args...) | ||
477 | #else | ||
478 | extern u32 flags_dump; | ||
479 | # define ZFCP_LOG_FLAGS(level, fmt, args...) \ | ||
480 | do { \ | ||
481 | if (level <= flags_dump) \ | ||
482 | _ZFCP_LOG(fmt, ##args); \ | ||
483 | } while (0) | ||
484 | #endif | ||
485 | |||
486 | /*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/ | 474 | /*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/ |
487 | 475 | ||
488 | /* | 476 | /* |
@@ -502,6 +490,7 @@ do { \ | |||
502 | #define ZFCP_STATUS_COMMON_CLOSING 0x02000000 | 490 | #define ZFCP_STATUS_COMMON_CLOSING 0x02000000 |
503 | #define ZFCP_STATUS_COMMON_ERP_INUSE 0x01000000 | 491 | #define ZFCP_STATUS_COMMON_ERP_INUSE 0x01000000 |
504 | #define ZFCP_STATUS_COMMON_ACCESS_DENIED 0x00800000 | 492 | #define ZFCP_STATUS_COMMON_ACCESS_DENIED 0x00800000 |
493 | #define ZFCP_STATUS_COMMON_ACCESS_BOXED 0x00400000 | ||
505 | 494 | ||
506 | /* adapter status */ | 495 | /* adapter status */ |
507 | #define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002 | 496 | #define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002 |
@@ -763,6 +752,7 @@ typedef void (*zfcp_send_els_handler_t)(unsigned long); | |||
763 | /** | 752 | /** |
764 | * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els | 753 | * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els |
765 | * @adapter: adapter where request is sent from | 754 | * @adapter: adapter where request is sent from |
755 | * @port: port where ELS is destinated (port reference count has to be increased) | ||
766 | * @d_id: destiniation id of port where request is sent to | 756 | * @d_id: destiniation id of port where request is sent to |
767 | * @req: scatter-gather list for request | 757 | * @req: scatter-gather list for request |
768 | * @resp: scatter-gather list for response | 758 | * @resp: scatter-gather list for response |
@@ -777,6 +767,7 @@ typedef void (*zfcp_send_els_handler_t)(unsigned long); | |||
777 | */ | 767 | */ |
778 | struct zfcp_send_els { | 768 | struct zfcp_send_els { |
779 | struct zfcp_adapter *adapter; | 769 | struct zfcp_adapter *adapter; |
770 | struct zfcp_port *port; | ||
780 | fc_id_t d_id; | 771 | fc_id_t d_id; |
781 | struct scatterlist *req; | 772 | struct scatterlist *req; |
782 | struct scatterlist *resp; | 773 | struct scatterlist *resp; |
@@ -871,7 +862,7 @@ struct zfcp_adapter { | |||
871 | u32 ports; /* number of remote ports */ | 862 | u32 ports; /* number of remote ports */ |
872 | struct timer_list scsi_er_timer; /* SCSI err recovery watch */ | 863 | struct timer_list scsi_er_timer; /* SCSI err recovery watch */ |
873 | struct list_head fsf_req_list_head; /* head of FSF req list */ | 864 | struct list_head fsf_req_list_head; /* head of FSF req list */ |
874 | rwlock_t fsf_req_list_lock; /* lock for ops on list of | 865 | spinlock_t fsf_req_list_lock; /* lock for ops on list of |
875 | FSF requests */ | 866 | FSF requests */ |
876 | atomic_t fsf_reqs_active; /* # active FSF reqs */ | 867 | atomic_t fsf_reqs_active; /* # active FSF reqs */ |
877 | struct zfcp_qdio_queue request_queue; /* request queue */ | 868 | struct zfcp_qdio_queue request_queue; /* request queue */ |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 53ebc1cdfe2d..0cf31f7d1c0f 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include "zfcp_ext.h" | 36 | #include "zfcp_ext.h" |
37 | 37 | ||
38 | static int zfcp_erp_adisc(struct zfcp_adapter *, fc_id_t); | 38 | static int zfcp_erp_adisc(struct zfcp_port *); |
39 | static void zfcp_erp_adisc_handler(unsigned long); | 39 | static void zfcp_erp_adisc_handler(unsigned long); |
40 | 40 | ||
41 | static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *, int); | 41 | static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *, int); |
@@ -295,12 +295,12 @@ zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear_mask) | |||
295 | 295 | ||
296 | /** | 296 | /** |
297 | * zfcp_erp_adisc - send ADISC ELS command | 297 | * zfcp_erp_adisc - send ADISC ELS command |
298 | * @adapter: adapter structure | 298 | * @port: port structure |
299 | * @d_id: d_id of port where ADISC is sent to | ||
300 | */ | 299 | */ |
301 | int | 300 | int |
302 | zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id) | 301 | zfcp_erp_adisc(struct zfcp_port *port) |
303 | { | 302 | { |
303 | struct zfcp_adapter *adapter = port->adapter; | ||
304 | struct zfcp_send_els *send_els; | 304 | struct zfcp_send_els *send_els; |
305 | struct zfcp_ls_adisc *adisc; | 305 | struct zfcp_ls_adisc *adisc; |
306 | void *address = NULL; | 306 | void *address = NULL; |
@@ -332,7 +332,8 @@ zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id) | |||
332 | send_els->req_count = send_els->resp_count = 1; | 332 | send_els->req_count = send_els->resp_count = 1; |
333 | 333 | ||
334 | send_els->adapter = adapter; | 334 | send_els->adapter = adapter; |
335 | send_els->d_id = d_id; | 335 | send_els->port = port; |
336 | send_els->d_id = port->d_id; | ||
336 | send_els->handler = zfcp_erp_adisc_handler; | 337 | send_els->handler = zfcp_erp_adisc_handler; |
337 | send_els->handler_data = (unsigned long) send_els; | 338 | send_els->handler_data = (unsigned long) send_els; |
338 | 339 | ||
@@ -350,7 +351,7 @@ zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id) | |||
350 | ZFCP_LOG_INFO("ADISC request from s_id 0x%08x to d_id 0x%08x " | 351 | ZFCP_LOG_INFO("ADISC request from s_id 0x%08x to d_id 0x%08x " |
351 | "(wwpn=0x%016Lx, wwnn=0x%016Lx, " | 352 | "(wwpn=0x%016Lx, wwnn=0x%016Lx, " |
352 | "hard_nport_id=0x%08x, nport_id=0x%08x)\n", | 353 | "hard_nport_id=0x%08x, nport_id=0x%08x)\n", |
353 | adapter->s_id, d_id, (wwn_t) adisc->wwpn, | 354 | adapter->s_id, send_els->d_id, (wwn_t) adisc->wwpn, |
354 | (wwn_t) adisc->wwnn, adisc->hard_nport_id, | 355 | (wwn_t) adisc->wwnn, adisc->hard_nport_id, |
355 | adisc->nport_id); | 356 | adisc->nport_id); |
356 | 357 | ||
@@ -367,7 +368,7 @@ zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id) | |||
367 | retval = zfcp_fsf_send_els(send_els); | 368 | retval = zfcp_fsf_send_els(send_els); |
368 | if (retval != 0) { | 369 | if (retval != 0) { |
369 | ZFCP_LOG_NORMAL("error: initiation of Send ELS failed for port " | 370 | ZFCP_LOG_NORMAL("error: initiation of Send ELS failed for port " |
370 | "0x%08x on adapter %s\n", d_id, | 371 | "0x%08x on adapter %s\n", send_els->d_id, |
371 | zfcp_get_busid_by_adapter(adapter)); | 372 | zfcp_get_busid_by_adapter(adapter)); |
372 | del_timer(send_els->timer); | 373 | del_timer(send_els->timer); |
373 | goto freemem; | 374 | goto freemem; |
@@ -411,14 +412,9 @@ zfcp_erp_adisc_handler(unsigned long data) | |||
411 | del_timer(send_els->timer); | 412 | del_timer(send_els->timer); |
412 | 413 | ||
413 | adapter = send_els->adapter; | 414 | adapter = send_els->adapter; |
415 | port = send_els->port; | ||
414 | d_id = send_els->d_id; | 416 | d_id = send_els->d_id; |
415 | 417 | ||
416 | read_lock(&zfcp_data.config_lock); | ||
417 | port = zfcp_get_port_by_did(send_els->adapter, send_els->d_id); | ||
418 | read_unlock(&zfcp_data.config_lock); | ||
419 | |||
420 | BUG_ON(port == NULL); | ||
421 | |||
422 | /* request rejected or timed out */ | 418 | /* request rejected or timed out */ |
423 | if (send_els->status != 0) { | 419 | if (send_els->status != 0) { |
424 | ZFCP_LOG_NORMAL("ELS request rejected/timed out, " | 420 | ZFCP_LOG_NORMAL("ELS request rejected/timed out, " |
@@ -482,7 +478,7 @@ zfcp_test_link(struct zfcp_port *port) | |||
482 | int retval; | 478 | int retval; |
483 | 479 | ||
484 | zfcp_port_get(port); | 480 | zfcp_port_get(port); |
485 | retval = zfcp_erp_adisc(port->adapter, port->d_id); | 481 | retval = zfcp_erp_adisc(port); |
486 | if (retval != 0) { | 482 | if (retval != 0) { |
487 | zfcp_port_put(port); | 483 | zfcp_port_put(port); |
488 | ZFCP_LOG_NORMAL("reopen needed for port 0x%016Lx " | 484 | ZFCP_LOG_NORMAL("reopen needed for port 0x%016Lx " |
@@ -895,7 +891,7 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) | |||
895 | 891 | ||
896 | if (erp_action->fsf_req) { | 892 | if (erp_action->fsf_req) { |
897 | /* take lock to ensure that request is not being deleted meanwhile */ | 893 | /* take lock to ensure that request is not being deleted meanwhile */ |
898 | write_lock(&adapter->fsf_req_list_lock); | 894 | spin_lock(&adapter->fsf_req_list_lock); |
899 | /* check whether fsf req does still exist */ | 895 | /* check whether fsf req does still exist */ |
900 | list_for_each_entry(fsf_req, &adapter->fsf_req_list_head, list) | 896 | list_for_each_entry(fsf_req, &adapter->fsf_req_list_head, list) |
901 | if (fsf_req == erp_action->fsf_req) | 897 | if (fsf_req == erp_action->fsf_req) |
@@ -938,7 +934,7 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) | |||
938 | */ | 934 | */ |
939 | erp_action->fsf_req = NULL; | 935 | erp_action->fsf_req = NULL; |
940 | } | 936 | } |
941 | write_unlock(&adapter->fsf_req_list_lock); | 937 | spin_unlock(&adapter->fsf_req_list_lock); |
942 | } else | 938 | } else |
943 | debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); | 939 | debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); |
944 | 940 | ||
@@ -2286,12 +2282,12 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action) | |||
2286 | { | 2282 | { |
2287 | int retval = ZFCP_ERP_SUCCEEDED; | 2283 | int retval = ZFCP_ERP_SUCCEEDED; |
2288 | int retries; | 2284 | int retries; |
2285 | int sleep = ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP; | ||
2289 | struct zfcp_adapter *adapter = erp_action->adapter; | 2286 | struct zfcp_adapter *adapter = erp_action->adapter; |
2290 | 2287 | ||
2291 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, &adapter->status); | 2288 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, &adapter->status); |
2292 | retries = ZFCP_EXCHANGE_CONFIG_DATA_RETRIES; | ||
2293 | 2289 | ||
2294 | do { | 2290 | for (retries = ZFCP_EXCHANGE_CONFIG_DATA_RETRIES; retries; retries--) { |
2295 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, | 2291 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, |
2296 | &adapter->status); | 2292 | &adapter->status); |
2297 | ZFCP_LOG_DEBUG("Doing exchange config data\n"); | 2293 | ZFCP_LOG_DEBUG("Doing exchange config data\n"); |
@@ -2329,16 +2325,17 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action) | |||
2329 | zfcp_get_busid_by_adapter(adapter)); | 2325 | zfcp_get_busid_by_adapter(adapter)); |
2330 | break; | 2326 | break; |
2331 | } | 2327 | } |
2332 | if (atomic_test_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, | 2328 | |
2333 | &adapter->status)) { | 2329 | if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, |
2334 | ZFCP_LOG_DEBUG("host connection still initialising... " | 2330 | &adapter->status)) |
2335 | "waiting and retrying...\n"); | 2331 | break; |
2336 | /* sleep a little bit before retry */ | 2332 | |
2337 | msleep(jiffies_to_msecs(ZFCP_EXCHANGE_CONFIG_DATA_SLEEP)); | 2333 | ZFCP_LOG_DEBUG("host connection still initialising... " |
2338 | } | 2334 | "waiting and retrying...\n"); |
2339 | } while ((retries--) && | 2335 | /* sleep a little bit before retry */ |
2340 | atomic_test_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, | 2336 | msleep(jiffies_to_msecs(sleep)); |
2341 | &adapter->status)); | 2337 | sleep *= 2; |
2338 | } | ||
2342 | 2339 | ||
2343 | if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, | 2340 | if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, |
2344 | &adapter->status)) { | 2341 | &adapter->status)) { |
@@ -3485,6 +3482,45 @@ zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) | |||
3485 | } | 3482 | } |
3486 | 3483 | ||
3487 | /* | 3484 | /* |
3485 | * function: zfcp_erp_port_boxed | ||
3486 | * | ||
3487 | * purpose: | ||
3488 | */ | ||
3489 | void | ||
3490 | zfcp_erp_port_boxed(struct zfcp_port *port) | ||
3491 | { | ||
3492 | struct zfcp_adapter *adapter = port->adapter; | ||
3493 | unsigned long flags; | ||
3494 | |||
3495 | debug_text_event(adapter->erp_dbf, 3, "p_access_boxed"); | ||
3496 | debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t)); | ||
3497 | read_lock_irqsave(&zfcp_data.config_lock, flags); | ||
3498 | zfcp_erp_modify_port_status(port, | ||
3499 | ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
3500 | ZFCP_SET); | ||
3501 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | ||
3502 | zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED); | ||
3503 | } | ||
3504 | |||
3505 | /* | ||
3506 | * function: zfcp_erp_unit_boxed | ||
3507 | * | ||
3508 | * purpose: | ||
3509 | */ | ||
3510 | void | ||
3511 | zfcp_erp_unit_boxed(struct zfcp_unit *unit) | ||
3512 | { | ||
3513 | struct zfcp_adapter *adapter = unit->port->adapter; | ||
3514 | |||
3515 | debug_text_event(adapter->erp_dbf, 3, "u_access_boxed"); | ||
3516 | debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t)); | ||
3517 | zfcp_erp_modify_unit_status(unit, | ||
3518 | ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
3519 | ZFCP_SET); | ||
3520 | zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED); | ||
3521 | } | ||
3522 | |||
3523 | /* | ||
3488 | * function: zfcp_erp_port_access_denied | 3524 | * function: zfcp_erp_port_access_denied |
3489 | * | 3525 | * |
3490 | * purpose: | 3526 | * purpose: |
@@ -3495,11 +3531,13 @@ zfcp_erp_port_access_denied(struct zfcp_port *port) | |||
3495 | struct zfcp_adapter *adapter = port->adapter; | 3531 | struct zfcp_adapter *adapter = port->adapter; |
3496 | unsigned long flags; | 3532 | unsigned long flags; |
3497 | 3533 | ||
3498 | debug_text_event(adapter->erp_dbf, 3, "p_access_block"); | 3534 | debug_text_event(adapter->erp_dbf, 3, "p_access_denied"); |
3499 | debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t)); | 3535 | debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t)); |
3500 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 3536 | read_lock_irqsave(&zfcp_data.config_lock, flags); |
3501 | zfcp_erp_modify_port_status(port, ZFCP_STATUS_COMMON_ERP_FAILED | | 3537 | zfcp_erp_modify_port_status(port, |
3502 | ZFCP_STATUS_COMMON_ACCESS_DENIED, ZFCP_SET); | 3538 | ZFCP_STATUS_COMMON_ERP_FAILED | |
3539 | ZFCP_STATUS_COMMON_ACCESS_DENIED, | ||
3540 | ZFCP_SET); | ||
3503 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | 3541 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); |
3504 | } | 3542 | } |
3505 | 3543 | ||
@@ -3513,10 +3551,12 @@ zfcp_erp_unit_access_denied(struct zfcp_unit *unit) | |||
3513 | { | 3551 | { |
3514 | struct zfcp_adapter *adapter = unit->port->adapter; | 3552 | struct zfcp_adapter *adapter = unit->port->adapter; |
3515 | 3553 | ||
3516 | debug_text_event(adapter->erp_dbf, 3, "u_access_block"); | 3554 | debug_text_event(adapter->erp_dbf, 3, "u_access_denied"); |
3517 | debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t)); | 3555 | debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t)); |
3518 | zfcp_erp_modify_unit_status(unit, ZFCP_STATUS_COMMON_ERP_FAILED | | 3556 | zfcp_erp_modify_unit_status(unit, |
3519 | ZFCP_STATUS_COMMON_ACCESS_DENIED, ZFCP_SET); | 3557 | ZFCP_STATUS_COMMON_ERP_FAILED | |
3558 | ZFCP_STATUS_COMMON_ACCESS_DENIED, | ||
3559 | ZFCP_SET); | ||
3520 | } | 3560 | } |
3521 | 3561 | ||
3522 | /* | 3562 | /* |
@@ -3530,7 +3570,7 @@ zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter) | |||
3530 | struct zfcp_port *port; | 3570 | struct zfcp_port *port; |
3531 | unsigned long flags; | 3571 | unsigned long flags; |
3532 | 3572 | ||
3533 | debug_text_event(adapter->erp_dbf, 3, "a_access_unblock"); | 3573 | debug_text_event(adapter->erp_dbf, 3, "a_access_recover"); |
3534 | debug_event(adapter->erp_dbf, 3, &adapter->name, 8); | 3574 | debug_event(adapter->erp_dbf, 3, &adapter->name, 8); |
3535 | 3575 | ||
3536 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 3576 | read_lock_irqsave(&zfcp_data.config_lock, flags); |
@@ -3553,10 +3593,12 @@ zfcp_erp_port_access_changed(struct zfcp_port *port) | |||
3553 | struct zfcp_adapter *adapter = port->adapter; | 3593 | struct zfcp_adapter *adapter = port->adapter; |
3554 | struct zfcp_unit *unit; | 3594 | struct zfcp_unit *unit; |
3555 | 3595 | ||
3556 | debug_text_event(adapter->erp_dbf, 3, "p_access_unblock"); | 3596 | debug_text_event(adapter->erp_dbf, 3, "p_access_recover"); |
3557 | debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t)); | 3597 | debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t)); |
3558 | 3598 | ||
3559 | if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, | 3599 | if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, |
3600 | &port->status) && | ||
3601 | !atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
3560 | &port->status)) { | 3602 | &port->status)) { |
3561 | if (!atomic_test_mask(ZFCP_STATUS_PORT_WKA, &port->status)) | 3603 | if (!atomic_test_mask(ZFCP_STATUS_PORT_WKA, &port->status)) |
3562 | list_for_each_entry(unit, &port->unit_list_head, list) | 3604 | list_for_each_entry(unit, &port->unit_list_head, list) |
@@ -3583,10 +3625,13 @@ zfcp_erp_unit_access_changed(struct zfcp_unit *unit) | |||
3583 | { | 3625 | { |
3584 | struct zfcp_adapter *adapter = unit->port->adapter; | 3626 | struct zfcp_adapter *adapter = unit->port->adapter; |
3585 | 3627 | ||
3586 | debug_text_event(adapter->erp_dbf, 3, "u_access_unblock"); | 3628 | debug_text_event(adapter->erp_dbf, 3, "u_access_recover"); |
3587 | debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t)); | 3629 | debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t)); |
3588 | 3630 | ||
3589 | if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, &unit->status)) | 3631 | if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, |
3632 | &unit->status) && | ||
3633 | !atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
3634 | &unit->status)) | ||
3590 | return; | 3635 | return; |
3591 | 3636 | ||
3592 | ZFCP_LOG_NORMAL("reopen of unit 0x%016Lx on port 0x%016Lx " | 3637 | ZFCP_LOG_NORMAL("reopen of unit 0x%016Lx on port 0x%016Lx " |
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index d5fd43352071..42df7e57eeae 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -116,7 +116,7 @@ extern int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *, | |||
116 | struct timer_list*, int); | 116 | struct timer_list*, int); |
117 | extern int zfcp_fsf_req_complete(struct zfcp_fsf_req *); | 117 | extern int zfcp_fsf_req_complete(struct zfcp_fsf_req *); |
118 | extern void zfcp_fsf_incoming_els(struct zfcp_fsf_req *); | 118 | extern void zfcp_fsf_incoming_els(struct zfcp_fsf_req *); |
119 | extern void zfcp_fsf_req_cleanup(struct zfcp_fsf_req *); | 119 | extern void zfcp_fsf_req_free(struct zfcp_fsf_req *); |
120 | extern struct zfcp_fsf_req *zfcp_fsf_send_fcp_command_task_management( | 120 | extern struct zfcp_fsf_req *zfcp_fsf_send_fcp_command_task_management( |
121 | struct zfcp_adapter *, struct zfcp_unit *, u8, int); | 121 | struct zfcp_adapter *, struct zfcp_unit *, u8, int); |
122 | extern struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command( | 122 | extern struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command( |
@@ -171,6 +171,8 @@ extern int zfcp_erp_async_handler(struct zfcp_erp_action *, unsigned long); | |||
171 | 171 | ||
172 | extern int zfcp_test_link(struct zfcp_port *); | 172 | extern int zfcp_test_link(struct zfcp_port *); |
173 | 173 | ||
174 | extern void zfcp_erp_port_boxed(struct zfcp_port *); | ||
175 | extern void zfcp_erp_unit_boxed(struct zfcp_unit *); | ||
174 | extern void zfcp_erp_port_access_denied(struct zfcp_port *); | 176 | extern void zfcp_erp_port_access_denied(struct zfcp_port *); |
175 | extern void zfcp_erp_unit_access_denied(struct zfcp_unit *); | 177 | extern void zfcp_erp_unit_access_denied(struct zfcp_unit *); |
176 | extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *); | 178 | extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 148b11c822bf..0d9f20edc490 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -61,7 +61,6 @@ static int zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *); | |||
61 | static int zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *); | 61 | static int zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *); |
62 | static int zfcp_fsf_req_dispatch(struct zfcp_fsf_req *); | 62 | static int zfcp_fsf_req_dispatch(struct zfcp_fsf_req *); |
63 | static void zfcp_fsf_req_dismiss(struct zfcp_fsf_req *); | 63 | static void zfcp_fsf_req_dismiss(struct zfcp_fsf_req *); |
64 | static void zfcp_fsf_req_free(struct zfcp_fsf_req *); | ||
65 | 64 | ||
66 | /* association between FSF command and FSF QTCB type */ | 65 | /* association between FSF command and FSF QTCB type */ |
67 | static u32 fsf_qtcb_type[] = { | 66 | static u32 fsf_qtcb_type[] = { |
@@ -149,13 +148,13 @@ zfcp_fsf_req_alloc(mempool_t *pool, int req_flags) | |||
149 | * | 148 | * |
150 | * locks: none | 149 | * locks: none |
151 | */ | 150 | */ |
152 | static void | 151 | void |
153 | zfcp_fsf_req_free(struct zfcp_fsf_req *fsf_req) | 152 | zfcp_fsf_req_free(struct zfcp_fsf_req *fsf_req) |
154 | { | 153 | { |
155 | if (likely(fsf_req->pool != NULL)) | 154 | if (likely(fsf_req->pool != NULL)) |
156 | mempool_free(fsf_req, fsf_req->pool); | 155 | mempool_free(fsf_req, fsf_req->pool); |
157 | else | 156 | else |
158 | kfree(fsf_req); | 157 | kfree(fsf_req); |
159 | } | 158 | } |
160 | 159 | ||
161 | /* | 160 | /* |
@@ -170,30 +169,21 @@ zfcp_fsf_req_free(struct zfcp_fsf_req *fsf_req) | |||
170 | int | 169 | int |
171 | zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter) | 170 | zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter) |
172 | { | 171 | { |
173 | int retval = 0; | ||
174 | struct zfcp_fsf_req *fsf_req, *tmp; | 172 | struct zfcp_fsf_req *fsf_req, *tmp; |
173 | unsigned long flags; | ||
174 | LIST_HEAD(remove_queue); | ||
175 | 175 | ||
176 | list_for_each_entry_safe(fsf_req, tmp, &adapter->fsf_req_list_head, | 176 | spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); |
177 | list) | 177 | list_splice_init(&adapter->fsf_req_list_head, &remove_queue); |
178 | zfcp_fsf_req_dismiss(fsf_req); | 178 | atomic_set(&adapter->fsf_reqs_active, 0); |
179 | /* wait_event_timeout? */ | 179 | spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); |
180 | while (!list_empty(&adapter->fsf_req_list_head)) { | ||
181 | ZFCP_LOG_DEBUG("fsf req list of adapter %s not yet empty\n", | ||
182 | zfcp_get_busid_by_adapter(adapter)); | ||
183 | /* wait for woken intiators to clean up their requests */ | ||
184 | msleep(jiffies_to_msecs(ZFCP_FSFREQ_CLEANUP_TIMEOUT)); | ||
185 | } | ||
186 | 180 | ||
187 | /* consistency check */ | 181 | list_for_each_entry_safe(fsf_req, tmp, &remove_queue, list) { |
188 | if (atomic_read(&adapter->fsf_reqs_active)) { | 182 | list_del(&fsf_req->list); |
189 | ZFCP_LOG_NORMAL("bug: There are still %d FSF requests pending " | 183 | zfcp_fsf_req_dismiss(fsf_req); |
190 | "on adapter %s after cleanup.\n", | ||
191 | atomic_read(&adapter->fsf_reqs_active), | ||
192 | zfcp_get_busid_by_adapter(adapter)); | ||
193 | atomic_set(&adapter->fsf_reqs_active, 0); | ||
194 | } | 184 | } |
195 | 185 | ||
196 | return retval; | 186 | return 0; |
197 | } | 187 | } |
198 | 188 | ||
199 | /* | 189 | /* |
@@ -226,10 +216,6 @@ zfcp_fsf_req_complete(struct zfcp_fsf_req *fsf_req) | |||
226 | { | 216 | { |
227 | int retval = 0; | 217 | int retval = 0; |
228 | int cleanup; | 218 | int cleanup; |
229 | struct zfcp_adapter *adapter = fsf_req->adapter; | ||
230 | |||
231 | /* do some statistics */ | ||
232 | atomic_dec(&adapter->fsf_reqs_active); | ||
233 | 219 | ||
234 | if (unlikely(fsf_req->fsf_command == FSF_QTCB_UNSOLICITED_STATUS)) { | 220 | if (unlikely(fsf_req->fsf_command == FSF_QTCB_UNSOLICITED_STATUS)) { |
235 | ZFCP_LOG_DEBUG("Status read response received\n"); | 221 | ZFCP_LOG_DEBUG("Status read response received\n"); |
@@ -260,7 +246,7 @@ zfcp_fsf_req_complete(struct zfcp_fsf_req *fsf_req) | |||
260 | * lock must not be held here since it will be | 246 | * lock must not be held here since it will be |
261 | * grabed by the called routine, too | 247 | * grabed by the called routine, too |
262 | */ | 248 | */ |
263 | zfcp_fsf_req_cleanup(fsf_req); | 249 | zfcp_fsf_req_free(fsf_req); |
264 | } else { | 250 | } else { |
265 | /* notify initiator waiting for the requests completion */ | 251 | /* notify initiator waiting for the requests completion */ |
266 | ZFCP_LOG_TRACE("waking initiator of FSF request %p\n",fsf_req); | 252 | ZFCP_LOG_TRACE("waking initiator of FSF request %p\n",fsf_req); |
@@ -346,15 +332,10 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
346 | switch (fsf_req->qtcb->prefix.prot_status) { | 332 | switch (fsf_req->qtcb->prefix.prot_status) { |
347 | 333 | ||
348 | case FSF_PROT_GOOD: | 334 | case FSF_PROT_GOOD: |
349 | ZFCP_LOG_TRACE("FSF_PROT_GOOD\n"); | ||
350 | break; | ||
351 | |||
352 | case FSF_PROT_FSF_STATUS_PRESENTED: | 335 | case FSF_PROT_FSF_STATUS_PRESENTED: |
353 | ZFCP_LOG_TRACE("FSF_PROT_FSF_STATUS_PRESENTED\n"); | ||
354 | break; | 336 | break; |
355 | 337 | ||
356 | case FSF_PROT_QTCB_VERSION_ERROR: | 338 | case FSF_PROT_QTCB_VERSION_ERROR: |
357 | ZFCP_LOG_FLAGS(0, "FSF_PROT_QTCB_VERSION_ERROR\n"); | ||
358 | ZFCP_LOG_NORMAL("error: The adapter %s contains " | 339 | ZFCP_LOG_NORMAL("error: The adapter %s contains " |
359 | "microcode of version 0x%x, the device driver " | 340 | "microcode of version 0x%x, the device driver " |
360 | "only supports 0x%x. Aborting.\n", | 341 | "only supports 0x%x. Aborting.\n", |
@@ -371,7 +352,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
371 | break; | 352 | break; |
372 | 353 | ||
373 | case FSF_PROT_SEQ_NUMB_ERROR: | 354 | case FSF_PROT_SEQ_NUMB_ERROR: |
374 | ZFCP_LOG_FLAGS(0, "FSF_PROT_SEQ_NUMB_ERROR\n"); | ||
375 | ZFCP_LOG_NORMAL("bug: Sequence number mismatch between " | 355 | ZFCP_LOG_NORMAL("bug: Sequence number mismatch between " |
376 | "driver (0x%x) and adapter %s (0x%x). " | 356 | "driver (0x%x) and adapter %s (0x%x). " |
377 | "Restarting all operations on this adapter.\n", | 357 | "Restarting all operations on this adapter.\n", |
@@ -390,7 +370,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
390 | break; | 370 | break; |
391 | 371 | ||
392 | case FSF_PROT_UNSUPP_QTCB_TYPE: | 372 | case FSF_PROT_UNSUPP_QTCB_TYPE: |
393 | ZFCP_LOG_FLAGS(0, "FSF_PROT_UNSUP_QTCB_TYPE\n"); | ||
394 | ZFCP_LOG_NORMAL("error: Packet header type used by the " | 373 | ZFCP_LOG_NORMAL("error: Packet header type used by the " |
395 | "device driver is incompatible with " | 374 | "device driver is incompatible with " |
396 | "that used on adapter %s. " | 375 | "that used on adapter %s. " |
@@ -405,7 +384,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
405 | break; | 384 | break; |
406 | 385 | ||
407 | case FSF_PROT_HOST_CONNECTION_INITIALIZING: | 386 | case FSF_PROT_HOST_CONNECTION_INITIALIZING: |
408 | ZFCP_LOG_FLAGS(1, "FSF_PROT_HOST_CONNECTION_INITIALIZING\n"); | ||
409 | zfcp_cmd_dbf_event_fsf("hconinit", fsf_req, | 387 | zfcp_cmd_dbf_event_fsf("hconinit", fsf_req, |
410 | &fsf_req->qtcb->prefix.prot_status_qual, | 388 | &fsf_req->qtcb->prefix.prot_status_qual, |
411 | sizeof (union fsf_prot_status_qual)); | 389 | sizeof (union fsf_prot_status_qual)); |
@@ -416,7 +394,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
416 | break; | 394 | break; |
417 | 395 | ||
418 | case FSF_PROT_DUPLICATE_REQUEST_ID: | 396 | case FSF_PROT_DUPLICATE_REQUEST_ID: |
419 | ZFCP_LOG_FLAGS(0, "FSF_PROT_DUPLICATE_REQUEST_IDS\n"); | ||
420 | if (fsf_req->qtcb) { | 397 | if (fsf_req->qtcb) { |
421 | ZFCP_LOG_NORMAL("bug: The request identifier 0x%Lx " | 398 | ZFCP_LOG_NORMAL("bug: The request identifier 0x%Lx " |
422 | "to the adapter %s is ambiguous. " | 399 | "to the adapter %s is ambiguous. " |
@@ -445,7 +422,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
445 | break; | 422 | break; |
446 | 423 | ||
447 | case FSF_PROT_LINK_DOWN: | 424 | case FSF_PROT_LINK_DOWN: |
448 | ZFCP_LOG_FLAGS(1, "FSF_PROT_LINK_DOWN\n"); | ||
449 | /* | 425 | /* |
450 | * 'test and set' is not atomic here - | 426 | * 'test and set' is not atomic here - |
451 | * it's ok as long as calls to our response queue handler | 427 | * it's ok as long as calls to our response queue handler |
@@ -502,13 +478,11 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
502 | ZFCP_STATUS_COMMON_ERP_FAILED, | 478 | ZFCP_STATUS_COMMON_ERP_FAILED, |
503 | &adapter->status); | 479 | &adapter->status); |
504 | zfcp_erp_adapter_reopen(adapter, 0); | 480 | zfcp_erp_adapter_reopen(adapter, 0); |
505 | debug_text_event(adapter->erp_dbf, 1, "prot_link_down"); | ||
506 | } | 481 | } |
507 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 482 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
508 | break; | 483 | break; |
509 | 484 | ||
510 | case FSF_PROT_REEST_QUEUE: | 485 | case FSF_PROT_REEST_QUEUE: |
511 | ZFCP_LOG_FLAGS(1, "FSF_PROT_REEST_QUEUE\n"); | ||
512 | debug_text_event(adapter->erp_dbf, 1, "prot_reest_queue"); | 486 | debug_text_event(adapter->erp_dbf, 1, "prot_reest_queue"); |
513 | ZFCP_LOG_INFO("The local link to adapter with " | 487 | ZFCP_LOG_INFO("The local link to adapter with " |
514 | "%s was re-plugged. " | 488 | "%s was re-plugged. " |
@@ -528,7 +502,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
528 | break; | 502 | break; |
529 | 503 | ||
530 | case FSF_PROT_ERROR_STATE: | 504 | case FSF_PROT_ERROR_STATE: |
531 | ZFCP_LOG_FLAGS(0, "FSF_PROT_ERROR_STATE\n"); | ||
532 | ZFCP_LOG_NORMAL("error: The adapter %s " | 505 | ZFCP_LOG_NORMAL("error: The adapter %s " |
533 | "has entered the error state. " | 506 | "has entered the error state. " |
534 | "Restarting all operations on this " | 507 | "Restarting all operations on this " |
@@ -589,7 +562,6 @@ zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
589 | /* evaluate FSF Status */ | 562 | /* evaluate FSF Status */ |
590 | switch (fsf_req->qtcb->header.fsf_status) { | 563 | switch (fsf_req->qtcb->header.fsf_status) { |
591 | case FSF_UNKNOWN_COMMAND: | 564 | case FSF_UNKNOWN_COMMAND: |
592 | ZFCP_LOG_FLAGS(0, "FSF_UNKNOWN_COMMAND\n"); | ||
593 | ZFCP_LOG_NORMAL("bug: Command issued by the device driver is " | 565 | ZFCP_LOG_NORMAL("bug: Command issued by the device driver is " |
594 | "not known by the adapter %s " | 566 | "not known by the adapter %s " |
595 | "Stopping all operations on this adapter. " | 567 | "Stopping all operations on this adapter. " |
@@ -606,14 +578,12 @@ zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
606 | break; | 578 | break; |
607 | 579 | ||
608 | case FSF_FCP_RSP_AVAILABLE: | 580 | case FSF_FCP_RSP_AVAILABLE: |
609 | ZFCP_LOG_FLAGS(2, "FSF_FCP_RSP_AVAILABLE\n"); | ||
610 | ZFCP_LOG_DEBUG("FCP Sense data will be presented to the " | 581 | ZFCP_LOG_DEBUG("FCP Sense data will be presented to the " |
611 | "SCSI stack.\n"); | 582 | "SCSI stack.\n"); |
612 | debug_text_event(fsf_req->adapter->erp_dbf, 3, "fsf_s_rsp"); | 583 | debug_text_event(fsf_req->adapter->erp_dbf, 3, "fsf_s_rsp"); |
613 | break; | 584 | break; |
614 | 585 | ||
615 | case FSF_ADAPTER_STATUS_AVAILABLE: | 586 | case FSF_ADAPTER_STATUS_AVAILABLE: |
616 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
617 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_astatus"); | 587 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_astatus"); |
618 | zfcp_fsf_fsfstatus_qual_eval(fsf_req); | 588 | zfcp_fsf_fsfstatus_qual_eval(fsf_req); |
619 | break; | 589 | break; |
@@ -647,11 +617,9 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req) | |||
647 | 617 | ||
648 | switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) { | 618 | switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) { |
649 | case FSF_SQ_FCP_RSP_AVAILABLE: | 619 | case FSF_SQ_FCP_RSP_AVAILABLE: |
650 | ZFCP_LOG_FLAGS(2, "FSF_SQ_FCP_RSP_AVAILABLE\n"); | ||
651 | debug_text_event(fsf_req->adapter->erp_dbf, 4, "fsf_sq_rsp"); | 620 | debug_text_event(fsf_req->adapter->erp_dbf, 4, "fsf_sq_rsp"); |
652 | break; | 621 | break; |
653 | case FSF_SQ_RETRY_IF_POSSIBLE: | 622 | case FSF_SQ_RETRY_IF_POSSIBLE: |
654 | ZFCP_LOG_FLAGS(2, "FSF_SQ_RETRY_IF_POSSIBLE\n"); | ||
655 | /* The SCSI-stack may now issue retries or escalate */ | 623 | /* The SCSI-stack may now issue retries or escalate */ |
656 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_retry"); | 624 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_retry"); |
657 | zfcp_cmd_dbf_event_fsf("sqretry", fsf_req, | 625 | zfcp_cmd_dbf_event_fsf("sqretry", fsf_req, |
@@ -660,7 +628,6 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req) | |||
660 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 628 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
661 | break; | 629 | break; |
662 | case FSF_SQ_COMMAND_ABORTED: | 630 | case FSF_SQ_COMMAND_ABORTED: |
663 | ZFCP_LOG_FLAGS(2, "FSF_SQ_COMMAND_ABORTED\n"); | ||
664 | /* Carry the aborted state on to upper layer */ | 631 | /* Carry the aborted state on to upper layer */ |
665 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_abort"); | 632 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_abort"); |
666 | zfcp_cmd_dbf_event_fsf("sqabort", fsf_req, | 633 | zfcp_cmd_dbf_event_fsf("sqabort", fsf_req, |
@@ -670,7 +637,6 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req) | |||
670 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 637 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
671 | break; | 638 | break; |
672 | case FSF_SQ_NO_RECOM: | 639 | case FSF_SQ_NO_RECOM: |
673 | ZFCP_LOG_FLAGS(0, "FSF_SQ_NO_RECOM\n"); | ||
674 | debug_text_exception(fsf_req->adapter->erp_dbf, 0, | 640 | debug_text_exception(fsf_req->adapter->erp_dbf, 0, |
675 | "fsf_sq_no_rec"); | 641 | "fsf_sq_no_rec"); |
676 | ZFCP_LOG_NORMAL("bug: No recommendation could be given for a" | 642 | ZFCP_LOG_NORMAL("bug: No recommendation could be given for a" |
@@ -684,7 +650,6 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req) | |||
684 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 650 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
685 | break; | 651 | break; |
686 | case FSF_SQ_ULP_PROGRAMMING_ERROR: | 652 | case FSF_SQ_ULP_PROGRAMMING_ERROR: |
687 | ZFCP_LOG_FLAGS(0, "FSF_SQ_ULP_PROGRAMMING_ERROR\n"); | ||
688 | ZFCP_LOG_NORMAL("error: not enough SBALs for data transfer " | 653 | ZFCP_LOG_NORMAL("error: not enough SBALs for data transfer " |
689 | "(adapter %s)\n", | 654 | "(adapter %s)\n", |
690 | zfcp_get_busid_by_adapter(fsf_req->adapter)); | 655 | zfcp_get_busid_by_adapter(fsf_req->adapter)); |
@@ -740,72 +705,58 @@ zfcp_fsf_req_dispatch(struct zfcp_fsf_req *fsf_req) | |||
740 | switch (fsf_req->fsf_command) { | 705 | switch (fsf_req->fsf_command) { |
741 | 706 | ||
742 | case FSF_QTCB_FCP_CMND: | 707 | case FSF_QTCB_FCP_CMND: |
743 | ZFCP_LOG_FLAGS(3, "FSF_QTCB_FCP_CMND\n"); | ||
744 | zfcp_fsf_send_fcp_command_handler(fsf_req); | 708 | zfcp_fsf_send_fcp_command_handler(fsf_req); |
745 | break; | 709 | break; |
746 | 710 | ||
747 | case FSF_QTCB_ABORT_FCP_CMND: | 711 | case FSF_QTCB_ABORT_FCP_CMND: |
748 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_ABORT_FCP_CMND\n"); | ||
749 | zfcp_fsf_abort_fcp_command_handler(fsf_req); | 712 | zfcp_fsf_abort_fcp_command_handler(fsf_req); |
750 | break; | 713 | break; |
751 | 714 | ||
752 | case FSF_QTCB_SEND_GENERIC: | 715 | case FSF_QTCB_SEND_GENERIC: |
753 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_SEND_GENERIC\n"); | ||
754 | zfcp_fsf_send_ct_handler(fsf_req); | 716 | zfcp_fsf_send_ct_handler(fsf_req); |
755 | break; | 717 | break; |
756 | 718 | ||
757 | case FSF_QTCB_OPEN_PORT_WITH_DID: | 719 | case FSF_QTCB_OPEN_PORT_WITH_DID: |
758 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_OPEN_PORT_WITH_DID\n"); | ||
759 | zfcp_fsf_open_port_handler(fsf_req); | 720 | zfcp_fsf_open_port_handler(fsf_req); |
760 | break; | 721 | break; |
761 | 722 | ||
762 | case FSF_QTCB_OPEN_LUN: | 723 | case FSF_QTCB_OPEN_LUN: |
763 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_OPEN_LUN\n"); | ||
764 | zfcp_fsf_open_unit_handler(fsf_req); | 724 | zfcp_fsf_open_unit_handler(fsf_req); |
765 | break; | 725 | break; |
766 | 726 | ||
767 | case FSF_QTCB_CLOSE_LUN: | 727 | case FSF_QTCB_CLOSE_LUN: |
768 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_CLOSE_LUN\n"); | ||
769 | zfcp_fsf_close_unit_handler(fsf_req); | 728 | zfcp_fsf_close_unit_handler(fsf_req); |
770 | break; | 729 | break; |
771 | 730 | ||
772 | case FSF_QTCB_CLOSE_PORT: | 731 | case FSF_QTCB_CLOSE_PORT: |
773 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_CLOSE_PORT\n"); | ||
774 | zfcp_fsf_close_port_handler(fsf_req); | 732 | zfcp_fsf_close_port_handler(fsf_req); |
775 | break; | 733 | break; |
776 | 734 | ||
777 | case FSF_QTCB_CLOSE_PHYSICAL_PORT: | 735 | case FSF_QTCB_CLOSE_PHYSICAL_PORT: |
778 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_CLOSE_PHYSICAL_PORT\n"); | ||
779 | zfcp_fsf_close_physical_port_handler(fsf_req); | 736 | zfcp_fsf_close_physical_port_handler(fsf_req); |
780 | break; | 737 | break; |
781 | 738 | ||
782 | case FSF_QTCB_EXCHANGE_CONFIG_DATA: | 739 | case FSF_QTCB_EXCHANGE_CONFIG_DATA: |
783 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_EXCHANGE_CONFIG_DATA\n"); | ||
784 | zfcp_fsf_exchange_config_data_handler(fsf_req); | 740 | zfcp_fsf_exchange_config_data_handler(fsf_req); |
785 | break; | 741 | break; |
786 | 742 | ||
787 | case FSF_QTCB_EXCHANGE_PORT_DATA: | 743 | case FSF_QTCB_EXCHANGE_PORT_DATA: |
788 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_EXCHANGE_PORT_DATA\n"); | ||
789 | zfcp_fsf_exchange_port_data_handler(fsf_req); | 744 | zfcp_fsf_exchange_port_data_handler(fsf_req); |
790 | break; | 745 | break; |
791 | 746 | ||
792 | case FSF_QTCB_SEND_ELS: | 747 | case FSF_QTCB_SEND_ELS: |
793 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_SEND_ELS\n"); | ||
794 | zfcp_fsf_send_els_handler(fsf_req); | 748 | zfcp_fsf_send_els_handler(fsf_req); |
795 | break; | 749 | break; |
796 | 750 | ||
797 | case FSF_QTCB_DOWNLOAD_CONTROL_FILE: | 751 | case FSF_QTCB_DOWNLOAD_CONTROL_FILE: |
798 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_DOWNLOAD_CONTROL_FILE\n"); | ||
799 | zfcp_fsf_control_file_handler(fsf_req); | 752 | zfcp_fsf_control_file_handler(fsf_req); |
800 | break; | 753 | break; |
801 | 754 | ||
802 | case FSF_QTCB_UPLOAD_CONTROL_FILE: | 755 | case FSF_QTCB_UPLOAD_CONTROL_FILE: |
803 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_UPLOAD_CONTROL_FILE\n"); | ||
804 | zfcp_fsf_control_file_handler(fsf_req); | 756 | zfcp_fsf_control_file_handler(fsf_req); |
805 | break; | 757 | break; |
806 | 758 | ||
807 | default: | 759 | default: |
808 | ZFCP_LOG_FLAGS(2, "FSF_QTCB_UNKNOWN\n"); | ||
809 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 760 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
810 | ZFCP_LOG_NORMAL("bug: Command issued by the device driver is " | 761 | ZFCP_LOG_NORMAL("bug: Command issued by the device driver is " |
811 | "not supported by the adapter %s\n", | 762 | "not supported by the adapter %s\n", |
@@ -929,13 +880,11 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req) | |||
929 | switch (status_buffer->status_subtype) { | 880 | switch (status_buffer->status_subtype) { |
930 | 881 | ||
931 | case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: | 882 | case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: |
932 | ZFCP_LOG_FLAGS(2, "FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT\n"); | ||
933 | debug_text_event(adapter->erp_dbf, 3, "unsol_pc_phys:"); | 883 | debug_text_event(adapter->erp_dbf, 3, "unsol_pc_phys:"); |
934 | zfcp_erp_port_reopen(port, 0); | 884 | zfcp_erp_port_reopen(port, 0); |
935 | break; | 885 | break; |
936 | 886 | ||
937 | case FSF_STATUS_READ_SUB_ERROR_PORT: | 887 | case FSF_STATUS_READ_SUB_ERROR_PORT: |
938 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_SUB_ERROR_PORT\n"); | ||
939 | debug_text_event(adapter->erp_dbf, 1, "unsol_pc_err:"); | 888 | debug_text_event(adapter->erp_dbf, 1, "unsol_pc_err:"); |
940 | zfcp_erp_port_shutdown(port, 0); | 889 | zfcp_erp_port_shutdown(port, 0); |
941 | break; | 890 | break; |
@@ -973,14 +922,13 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
973 | 922 | ||
974 | if (fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) { | 923 | if (fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) { |
975 | mempool_free(status_buffer, adapter->pool.data_status_read); | 924 | mempool_free(status_buffer, adapter->pool.data_status_read); |
976 | zfcp_fsf_req_cleanup(fsf_req); | 925 | zfcp_fsf_req_free(fsf_req); |
977 | goto out; | 926 | goto out; |
978 | } | 927 | } |
979 | 928 | ||
980 | switch (status_buffer->status_type) { | 929 | switch (status_buffer->status_type) { |
981 | 930 | ||
982 | case FSF_STATUS_READ_PORT_CLOSED: | 931 | case FSF_STATUS_READ_PORT_CLOSED: |
983 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_PORT_CLOSED\n"); | ||
984 | debug_text_event(adapter->erp_dbf, 3, "unsol_pclosed:"); | 932 | debug_text_event(adapter->erp_dbf, 3, "unsol_pclosed:"); |
985 | debug_event(adapter->erp_dbf, 3, | 933 | debug_event(adapter->erp_dbf, 3, |
986 | &status_buffer->d_id, sizeof (u32)); | 934 | &status_buffer->d_id, sizeof (u32)); |
@@ -988,13 +936,11 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
988 | break; | 936 | break; |
989 | 937 | ||
990 | case FSF_STATUS_READ_INCOMING_ELS: | 938 | case FSF_STATUS_READ_INCOMING_ELS: |
991 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_INCOMING_ELS\n"); | ||
992 | debug_text_event(adapter->erp_dbf, 3, "unsol_els:"); | 939 | debug_text_event(adapter->erp_dbf, 3, "unsol_els:"); |
993 | zfcp_fsf_incoming_els(fsf_req); | 940 | zfcp_fsf_incoming_els(fsf_req); |
994 | break; | 941 | break; |
995 | 942 | ||
996 | case FSF_STATUS_READ_SENSE_DATA_AVAIL: | 943 | case FSF_STATUS_READ_SENSE_DATA_AVAIL: |
997 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_SENSE_DATA_AVAIL\n"); | ||
998 | debug_text_event(adapter->erp_dbf, 3, "unsol_sense:"); | 944 | debug_text_event(adapter->erp_dbf, 3, "unsol_sense:"); |
999 | ZFCP_LOG_INFO("unsolicited sense data received (adapter %s)\n", | 945 | ZFCP_LOG_INFO("unsolicited sense data received (adapter %s)\n", |
1000 | zfcp_get_busid_by_adapter(adapter)); | 946 | zfcp_get_busid_by_adapter(adapter)); |
@@ -1003,7 +949,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
1003 | break; | 949 | break; |
1004 | 950 | ||
1005 | case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: | 951 | case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: |
1006 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_BIT_ERROR_THRESHOLD\n"); | ||
1007 | debug_text_event(adapter->erp_dbf, 3, "unsol_bit_err:"); | 952 | debug_text_event(adapter->erp_dbf, 3, "unsol_bit_err:"); |
1008 | ZFCP_LOG_NORMAL("Bit error threshold data received:\n"); | 953 | ZFCP_LOG_NORMAL("Bit error threshold data received:\n"); |
1009 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, | 954 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, |
@@ -1012,7 +957,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
1012 | break; | 957 | break; |
1013 | 958 | ||
1014 | case FSF_STATUS_READ_LINK_DOWN: | 959 | case FSF_STATUS_READ_LINK_DOWN: |
1015 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_LINK_DOWN\n"); | ||
1016 | debug_text_event(adapter->erp_dbf, 0, "unsol_link_down:"); | 960 | debug_text_event(adapter->erp_dbf, 0, "unsol_link_down:"); |
1017 | ZFCP_LOG_INFO("Local link to adapter %s is down\n", | 961 | ZFCP_LOG_INFO("Local link to adapter %s is down\n", |
1018 | zfcp_get_busid_by_adapter(adapter)); | 962 | zfcp_get_busid_by_adapter(adapter)); |
@@ -1022,7 +966,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
1022 | break; | 966 | break; |
1023 | 967 | ||
1024 | case FSF_STATUS_READ_LINK_UP: | 968 | case FSF_STATUS_READ_LINK_UP: |
1025 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_LINK_UP\n"); | ||
1026 | debug_text_event(adapter->erp_dbf, 2, "unsol_link_up:"); | 969 | debug_text_event(adapter->erp_dbf, 2, "unsol_link_up:"); |
1027 | ZFCP_LOG_INFO("Local link to adapter %s was replugged. " | 970 | ZFCP_LOG_INFO("Local link to adapter %s was replugged. " |
1028 | "Restarting operations on this adapter\n", | 971 | "Restarting operations on this adapter\n", |
@@ -1037,7 +980,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
1037 | break; | 980 | break; |
1038 | 981 | ||
1039 | case FSF_STATUS_READ_CFDC_UPDATED: | 982 | case FSF_STATUS_READ_CFDC_UPDATED: |
1040 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_CFDC_UPDATED\n"); | ||
1041 | debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_update:"); | 983 | debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_update:"); |
1042 | ZFCP_LOG_INFO("CFDC has been updated on the adapter %s\n", | 984 | ZFCP_LOG_INFO("CFDC has been updated on the adapter %s\n", |
1043 | zfcp_get_busid_by_adapter(adapter)); | 985 | zfcp_get_busid_by_adapter(adapter)); |
@@ -1045,7 +987,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
1045 | break; | 987 | break; |
1046 | 988 | ||
1047 | case FSF_STATUS_READ_CFDC_HARDENED: | 989 | case FSF_STATUS_READ_CFDC_HARDENED: |
1048 | ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_CFDC_HARDENED\n"); | ||
1049 | debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_harden:"); | 990 | debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_harden:"); |
1050 | switch (status_buffer->status_subtype) { | 991 | switch (status_buffer->status_subtype) { |
1051 | case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE: | 992 | case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE: |
@@ -1078,7 +1019,7 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
1078 | break; | 1019 | break; |
1079 | } | 1020 | } |
1080 | mempool_free(status_buffer, adapter->pool.data_status_read); | 1021 | mempool_free(status_buffer, adapter->pool.data_status_read); |
1081 | zfcp_fsf_req_cleanup(fsf_req); | 1022 | zfcp_fsf_req_free(fsf_req); |
1082 | /* | 1023 | /* |
1083 | * recycle buffer and start new request repeat until outbound | 1024 | * recycle buffer and start new request repeat until outbound |
1084 | * queue is empty or adapter shutdown is requested | 1025 | * queue is empty or adapter shutdown is requested |
@@ -1214,7 +1155,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1214 | 1155 | ||
1215 | case FSF_PORT_HANDLE_NOT_VALID: | 1156 | case FSF_PORT_HANDLE_NOT_VALID: |
1216 | if (status_qual >> 4 != status_qual % 0xf) { | 1157 | if (status_qual >> 4 != status_qual % 0xf) { |
1217 | ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
1218 | debug_text_event(new_fsf_req->adapter->erp_dbf, 3, | 1158 | debug_text_event(new_fsf_req->adapter->erp_dbf, 3, |
1219 | "fsf_s_phand_nv0"); | 1159 | "fsf_s_phand_nv0"); |
1220 | /* | 1160 | /* |
@@ -1223,7 +1163,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1223 | * fine. | 1163 | * fine. |
1224 | */ | 1164 | */ |
1225 | } else { | 1165 | } else { |
1226 | ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
1227 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for " | 1166 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for " |
1228 | "port 0x%016Lx on adapter %s invalid. " | 1167 | "port 0x%016Lx on adapter %s invalid. " |
1229 | "This may happen occasionally.\n", | 1168 | "This may happen occasionally.\n", |
@@ -1246,7 +1185,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1246 | case FSF_LUN_HANDLE_NOT_VALID: | 1185 | case FSF_LUN_HANDLE_NOT_VALID: |
1247 | if (status_qual >> 4 != status_qual % 0xf) { | 1186 | if (status_qual >> 4 != status_qual % 0xf) { |
1248 | /* 2 */ | 1187 | /* 2 */ |
1249 | ZFCP_LOG_FLAGS(0, "FSF_LUN_HANDLE_NOT_VALID\n"); | ||
1250 | debug_text_event(new_fsf_req->adapter->erp_dbf, 3, | 1188 | debug_text_event(new_fsf_req->adapter->erp_dbf, 3, |
1251 | "fsf_s_lhand_nv0"); | 1189 | "fsf_s_lhand_nv0"); |
1252 | /* | 1190 | /* |
@@ -1255,7 +1193,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1255 | * This is fine. | 1193 | * This is fine. |
1256 | */ | 1194 | */ |
1257 | } else { | 1195 | } else { |
1258 | ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n"); | ||
1259 | ZFCP_LOG_INFO | 1196 | ZFCP_LOG_INFO |
1260 | ("Warning: Temporary LUN identifier 0x%x of LUN " | 1197 | ("Warning: Temporary LUN identifier 0x%x of LUN " |
1261 | "0x%016Lx on port 0x%016Lx on adapter %s is " | 1198 | "0x%016Lx on port 0x%016Lx on adapter %s is " |
@@ -1279,7 +1216,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1279 | break; | 1216 | break; |
1280 | 1217 | ||
1281 | case FSF_FCP_COMMAND_DOES_NOT_EXIST: | 1218 | case FSF_FCP_COMMAND_DOES_NOT_EXIST: |
1282 | ZFCP_LOG_FLAGS(2, "FSF_FCP_COMMAND_DOES_NOT_EXIST\n"); | ||
1283 | retval = 0; | 1219 | retval = 0; |
1284 | debug_text_event(new_fsf_req->adapter->erp_dbf, 3, | 1220 | debug_text_event(new_fsf_req->adapter->erp_dbf, 3, |
1285 | "fsf_s_no_exist"); | 1221 | "fsf_s_no_exist"); |
@@ -1287,50 +1223,37 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1287 | break; | 1223 | break; |
1288 | 1224 | ||
1289 | case FSF_PORT_BOXED: | 1225 | case FSF_PORT_BOXED: |
1290 | /* 2 */ | ||
1291 | ZFCP_LOG_FLAGS(0, "FSF_PORT_BOXED\n"); | ||
1292 | ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to " | 1226 | ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to " |
1293 | "be reopened\n", unit->port->wwpn, | 1227 | "be reopened\n", unit->port->wwpn, |
1294 | zfcp_get_busid_by_unit(unit)); | 1228 | zfcp_get_busid_by_unit(unit)); |
1295 | debug_text_event(new_fsf_req->adapter->erp_dbf, 2, | 1229 | debug_text_event(new_fsf_req->adapter->erp_dbf, 2, |
1296 | "fsf_s_pboxed"); | 1230 | "fsf_s_pboxed"); |
1297 | zfcp_erp_port_reopen(unit->port, 0); | 1231 | zfcp_erp_port_boxed(unit->port); |
1298 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1232 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1299 | | ZFCP_STATUS_FSFREQ_RETRY; | 1233 | | ZFCP_STATUS_FSFREQ_RETRY; |
1300 | break; | 1234 | break; |
1301 | 1235 | ||
1302 | case FSF_LUN_BOXED: | 1236 | case FSF_LUN_BOXED: |
1303 | ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n"); | ||
1304 | ZFCP_LOG_INFO( | 1237 | ZFCP_LOG_INFO( |
1305 | "unit 0x%016Lx on port 0x%016Lx on adapter %s needs " | 1238 | "unit 0x%016Lx on port 0x%016Lx on adapter %s needs " |
1306 | "to be reopened\n", | 1239 | "to be reopened\n", |
1307 | unit->fcp_lun, unit->port->wwpn, | 1240 | unit->fcp_lun, unit->port->wwpn, |
1308 | zfcp_get_busid_by_unit(unit)); | 1241 | zfcp_get_busid_by_unit(unit)); |
1309 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); | 1242 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); |
1310 | zfcp_erp_unit_reopen(unit, 0); | 1243 | zfcp_erp_unit_boxed(unit); |
1311 | zfcp_cmd_dbf_event_fsf("unitbox", new_fsf_req, | ||
1312 | &new_fsf_req->qtcb->header.fsf_status_qual, | ||
1313 | sizeof(union fsf_status_qual)); | ||
1314 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1244 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1315 | | ZFCP_STATUS_FSFREQ_RETRY; | 1245 | | ZFCP_STATUS_FSFREQ_RETRY; |
1316 | break; | 1246 | break; |
1317 | 1247 | ||
1318 | case FSF_ADAPTER_STATUS_AVAILABLE: | 1248 | case FSF_ADAPTER_STATUS_AVAILABLE: |
1319 | /* 2 */ | ||
1320 | ZFCP_LOG_FLAGS(0, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
1321 | switch (new_fsf_req->qtcb->header.fsf_status_qual.word[0]) { | 1249 | switch (new_fsf_req->qtcb->header.fsf_status_qual.word[0]) { |
1322 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 1250 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
1323 | ZFCP_LOG_FLAGS(2, | ||
1324 | "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
1325 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, | 1251 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, |
1326 | "fsf_sq_ltest"); | 1252 | "fsf_sq_ltest"); |
1327 | /* reopening link to port */ | 1253 | zfcp_test_link(unit->port); |
1328 | zfcp_erp_port_reopen(unit->port, 0); | ||
1329 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1254 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1330 | break; | 1255 | break; |
1331 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: | 1256 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: |
1332 | ZFCP_LOG_FLAGS(2, | ||
1333 | "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); | ||
1334 | /* SCSI stack will escalate */ | 1257 | /* SCSI stack will escalate */ |
1335 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, | 1258 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, |
1336 | "fsf_sq_ulp"); | 1259 | "fsf_sq_ulp"); |
@@ -1350,8 +1273,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1350 | break; | 1273 | break; |
1351 | 1274 | ||
1352 | case FSF_GOOD: | 1275 | case FSF_GOOD: |
1353 | /* 3 */ | ||
1354 | ZFCP_LOG_FLAGS(0, "FSF_GOOD\n"); | ||
1355 | retval = 0; | 1276 | retval = 0; |
1356 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED; | 1277 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED; |
1357 | break; | 1278 | break; |
@@ -1553,12 +1474,10 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1553 | switch (header->fsf_status) { | 1474 | switch (header->fsf_status) { |
1554 | 1475 | ||
1555 | case FSF_GOOD: | 1476 | case FSF_GOOD: |
1556 | ZFCP_LOG_FLAGS(2,"FSF_GOOD\n"); | ||
1557 | retval = 0; | 1477 | retval = 0; |
1558 | break; | 1478 | break; |
1559 | 1479 | ||
1560 | case FSF_SERVICE_CLASS_NOT_SUPPORTED: | 1480 | case FSF_SERVICE_CLASS_NOT_SUPPORTED: |
1561 | ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n"); | ||
1562 | if (adapter->fc_service_class <= 3) { | 1481 | if (adapter->fc_service_class <= 3) { |
1563 | ZFCP_LOG_INFO("error: adapter %s does not support fc " | 1482 | ZFCP_LOG_INFO("error: adapter %s does not support fc " |
1564 | "class %d.\n", | 1483 | "class %d.\n", |
@@ -1578,17 +1497,14 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1578 | break; | 1497 | break; |
1579 | 1498 | ||
1580 | case FSF_ADAPTER_STATUS_AVAILABLE: | 1499 | case FSF_ADAPTER_STATUS_AVAILABLE: |
1581 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
1582 | switch (header->fsf_status_qual.word[0]){ | 1500 | switch (header->fsf_status_qual.word[0]){ |
1583 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 1501 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
1584 | ZFCP_LOG_FLAGS(2,"FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
1585 | /* reopening link to port */ | 1502 | /* reopening link to port */ |
1586 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest"); | 1503 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest"); |
1587 | zfcp_test_link(port); | 1504 | zfcp_test_link(port); |
1588 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1505 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1589 | break; | 1506 | break; |
1590 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: | 1507 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: |
1591 | ZFCP_LOG_FLAGS(2,"FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); | ||
1592 | /* ERP strategy will escalate */ | 1508 | /* ERP strategy will escalate */ |
1593 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); | 1509 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); |
1594 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1510 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
@@ -1602,7 +1518,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1602 | break; | 1518 | break; |
1603 | 1519 | ||
1604 | case FSF_ACCESS_DENIED: | 1520 | case FSF_ACCESS_DENIED: |
1605 | ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); | ||
1606 | ZFCP_LOG_NORMAL("access denied, cannot send generic service " | 1521 | ZFCP_LOG_NORMAL("access denied, cannot send generic service " |
1607 | "command (adapter %s, port d_id=0x%08x)\n", | 1522 | "command (adapter %s, port d_id=0x%08x)\n", |
1608 | zfcp_get_busid_by_port(port), port->d_id); | 1523 | zfcp_get_busid_by_port(port), port->d_id); |
@@ -1625,7 +1540,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1625 | break; | 1540 | break; |
1626 | 1541 | ||
1627 | case FSF_GENERIC_COMMAND_REJECTED: | 1542 | case FSF_GENERIC_COMMAND_REJECTED: |
1628 | ZFCP_LOG_FLAGS(2, "FSF_GENERIC_COMMAND_REJECTED\n"); | ||
1629 | ZFCP_LOG_INFO("generic service command rejected " | 1543 | ZFCP_LOG_INFO("generic service command rejected " |
1630 | "(adapter %s, port d_id=0x%08x)\n", | 1544 | "(adapter %s, port d_id=0x%08x)\n", |
1631 | zfcp_get_busid_by_port(port), port->d_id); | 1545 | zfcp_get_busid_by_port(port), port->d_id); |
@@ -1638,7 +1552,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1638 | break; | 1552 | break; |
1639 | 1553 | ||
1640 | case FSF_PORT_HANDLE_NOT_VALID: | 1554 | case FSF_PORT_HANDLE_NOT_VALID: |
1641 | ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
1642 | ZFCP_LOG_DEBUG("Temporary port identifier 0x%x for port " | 1555 | ZFCP_LOG_DEBUG("Temporary port identifier 0x%x for port " |
1643 | "0x%016Lx on adapter %s invalid. This may " | 1556 | "0x%016Lx on adapter %s invalid. This may " |
1644 | "happen occasionally.\n", port->handle, | 1557 | "happen occasionally.\n", port->handle, |
@@ -1653,12 +1566,11 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1653 | break; | 1566 | break; |
1654 | 1567 | ||
1655 | case FSF_PORT_BOXED: | 1568 | case FSF_PORT_BOXED: |
1656 | ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); | ||
1657 | ZFCP_LOG_INFO("port needs to be reopened " | 1569 | ZFCP_LOG_INFO("port needs to be reopened " |
1658 | "(adapter %s, port d_id=0x%08x)\n", | 1570 | "(adapter %s, port d_id=0x%08x)\n", |
1659 | zfcp_get_busid_by_port(port), port->d_id); | 1571 | zfcp_get_busid_by_port(port), port->d_id); |
1660 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); | 1572 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); |
1661 | zfcp_erp_port_reopen(port, 0); | 1573 | zfcp_erp_port_boxed(port); |
1662 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1574 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1663 | | ZFCP_STATUS_FSFREQ_RETRY; | 1575 | | ZFCP_STATUS_FSFREQ_RETRY; |
1664 | break; | 1576 | break; |
@@ -1666,7 +1578,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1666 | /* following states should never occure, all cases avoided | 1578 | /* following states should never occure, all cases avoided |
1667 | in zfcp_fsf_send_ct - but who knows ... */ | 1579 | in zfcp_fsf_send_ct - but who knows ... */ |
1668 | case FSF_PAYLOAD_SIZE_MISMATCH: | 1580 | case FSF_PAYLOAD_SIZE_MISMATCH: |
1669 | ZFCP_LOG_FLAGS(2, "FSF_PAYLOAD_SIZE_MISMATCH\n"); | ||
1670 | ZFCP_LOG_INFO("payload size mismatch (adapter: %s, " | 1581 | ZFCP_LOG_INFO("payload size mismatch (adapter: %s, " |
1671 | "req_buf_length=%d, resp_buf_length=%d)\n", | 1582 | "req_buf_length=%d, resp_buf_length=%d)\n", |
1672 | zfcp_get_busid_by_adapter(adapter), | 1583 | zfcp_get_busid_by_adapter(adapter), |
@@ -1674,7 +1585,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1674 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1585 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1675 | break; | 1586 | break; |
1676 | case FSF_REQUEST_SIZE_TOO_LARGE: | 1587 | case FSF_REQUEST_SIZE_TOO_LARGE: |
1677 | ZFCP_LOG_FLAGS(2, "FSF_REQUEST_SIZE_TOO_LARGE\n"); | ||
1678 | ZFCP_LOG_INFO("request size too large (adapter: %s, " | 1588 | ZFCP_LOG_INFO("request size too large (adapter: %s, " |
1679 | "req_buf_length=%d)\n", | 1589 | "req_buf_length=%d)\n", |
1680 | zfcp_get_busid_by_adapter(adapter), | 1590 | zfcp_get_busid_by_adapter(adapter), |
@@ -1682,7 +1592,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1682 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1592 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1683 | break; | 1593 | break; |
1684 | case FSF_RESPONSE_SIZE_TOO_LARGE: | 1594 | case FSF_RESPONSE_SIZE_TOO_LARGE: |
1685 | ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_SIZE_TOO_LARGE\n"); | ||
1686 | ZFCP_LOG_INFO("response size too large (adapter: %s, " | 1595 | ZFCP_LOG_INFO("response size too large (adapter: %s, " |
1687 | "resp_buf_length=%d)\n", | 1596 | "resp_buf_length=%d)\n", |
1688 | zfcp_get_busid_by_adapter(adapter), | 1597 | zfcp_get_busid_by_adapter(adapter), |
@@ -1690,7 +1599,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1690 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1599 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1691 | break; | 1600 | break; |
1692 | case FSF_SBAL_MISMATCH: | 1601 | case FSF_SBAL_MISMATCH: |
1693 | ZFCP_LOG_FLAGS(2, "FSF_SBAL_MISMATCH\n"); | ||
1694 | ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, " | 1602 | ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, " |
1695 | "resp_buf_length=%d)\n", | 1603 | "resp_buf_length=%d)\n", |
1696 | zfcp_get_busid_by_adapter(adapter), | 1604 | zfcp_get_busid_by_adapter(adapter), |
@@ -1846,8 +1754,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1846 | static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | 1754 | static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) |
1847 | { | 1755 | { |
1848 | struct zfcp_adapter *adapter; | 1756 | struct zfcp_adapter *adapter; |
1849 | fc_id_t d_id; | ||
1850 | struct zfcp_port *port; | 1757 | struct zfcp_port *port; |
1758 | fc_id_t d_id; | ||
1851 | struct fsf_qtcb_header *header; | 1759 | struct fsf_qtcb_header *header; |
1852 | struct fsf_qtcb_bottom_support *bottom; | 1760 | struct fsf_qtcb_bottom_support *bottom; |
1853 | struct zfcp_send_els *send_els; | 1761 | struct zfcp_send_els *send_els; |
@@ -1856,6 +1764,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1856 | 1764 | ||
1857 | send_els = fsf_req->data.send_els; | 1765 | send_els = fsf_req->data.send_els; |
1858 | adapter = send_els->adapter; | 1766 | adapter = send_els->adapter; |
1767 | port = send_els->port; | ||
1859 | d_id = send_els->d_id; | 1768 | d_id = send_els->d_id; |
1860 | header = &fsf_req->qtcb->header; | 1769 | header = &fsf_req->qtcb->header; |
1861 | bottom = &fsf_req->qtcb->bottom.support; | 1770 | bottom = &fsf_req->qtcb->bottom.support; |
@@ -1866,12 +1775,10 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1866 | switch (header->fsf_status) { | 1775 | switch (header->fsf_status) { |
1867 | 1776 | ||
1868 | case FSF_GOOD: | 1777 | case FSF_GOOD: |
1869 | ZFCP_LOG_FLAGS(2, "FSF_GOOD\n"); | ||
1870 | retval = 0; | 1778 | retval = 0; |
1871 | break; | 1779 | break; |
1872 | 1780 | ||
1873 | case FSF_SERVICE_CLASS_NOT_SUPPORTED: | 1781 | case FSF_SERVICE_CLASS_NOT_SUPPORTED: |
1874 | ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n"); | ||
1875 | if (adapter->fc_service_class <= 3) { | 1782 | if (adapter->fc_service_class <= 3) { |
1876 | ZFCP_LOG_INFO("error: adapter %s does " | 1783 | ZFCP_LOG_INFO("error: adapter %s does " |
1877 | "not support fibrechannel class %d.\n", | 1784 | "not support fibrechannel class %d.\n", |
@@ -1891,22 +1798,14 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1891 | break; | 1798 | break; |
1892 | 1799 | ||
1893 | case FSF_ADAPTER_STATUS_AVAILABLE: | 1800 | case FSF_ADAPTER_STATUS_AVAILABLE: |
1894 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
1895 | switch (header->fsf_status_qual.word[0]){ | 1801 | switch (header->fsf_status_qual.word[0]){ |
1896 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 1802 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
1897 | ZFCP_LOG_FLAGS(2,"FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
1898 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest"); | 1803 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest"); |
1899 | if (send_els->ls_code != ZFCP_LS_ADISC) { | 1804 | if (port && (send_els->ls_code != ZFCP_LS_ADISC)) |
1900 | read_lock(&zfcp_data.config_lock); | 1805 | zfcp_test_link(port); |
1901 | port = zfcp_get_port_by_did(adapter, d_id); | ||
1902 | if (port) | ||
1903 | zfcp_test_link(port); | ||
1904 | read_unlock(&zfcp_data.config_lock); | ||
1905 | } | ||
1906 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1806 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1907 | break; | 1807 | break; |
1908 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: | 1808 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: |
1909 | ZFCP_LOG_FLAGS(2,"FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); | ||
1910 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); | 1809 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); |
1911 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1810 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1912 | retval = | 1811 | retval = |
@@ -1915,7 +1814,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1915 | &header->fsf_status_qual.word[2]); | 1814 | &header->fsf_status_qual.word[2]); |
1916 | break; | 1815 | break; |
1917 | case FSF_SQ_RETRY_IF_POSSIBLE: | 1816 | case FSF_SQ_RETRY_IF_POSSIBLE: |
1918 | ZFCP_LOG_FLAGS(2, "FSF_SQ_RETRY_IF_POSSIBLE\n"); | ||
1919 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_retry"); | 1817 | debug_text_event(adapter->erp_dbf, 1, "fsf_sq_retry"); |
1920 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1818 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1921 | break; | 1819 | break; |
@@ -1928,7 +1826,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1928 | break; | 1826 | break; |
1929 | 1827 | ||
1930 | case FSF_ELS_COMMAND_REJECTED: | 1828 | case FSF_ELS_COMMAND_REJECTED: |
1931 | ZFCP_LOG_FLAGS(2, "FSF_ELS_COMMAND_REJECTED\n"); | ||
1932 | ZFCP_LOG_INFO("ELS has been rejected because command filter " | 1829 | ZFCP_LOG_INFO("ELS has been rejected because command filter " |
1933 | "prohibited sending " | 1830 | "prohibited sending " |
1934 | "(adapter: %s, port d_id: 0x%08x)\n", | 1831 | "(adapter: %s, port d_id: 0x%08x)\n", |
@@ -1937,7 +1834,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1937 | break; | 1834 | break; |
1938 | 1835 | ||
1939 | case FSF_PAYLOAD_SIZE_MISMATCH: | 1836 | case FSF_PAYLOAD_SIZE_MISMATCH: |
1940 | ZFCP_LOG_FLAGS(2, "FSF_PAYLOAD_SIZE_MISMATCH\n"); | ||
1941 | ZFCP_LOG_INFO( | 1837 | ZFCP_LOG_INFO( |
1942 | "ELS request size and ELS response size must be either " | 1838 | "ELS request size and ELS response size must be either " |
1943 | "both 0, or both greater than 0 " | 1839 | "both 0, or both greater than 0 " |
@@ -1948,7 +1844,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1948 | break; | 1844 | break; |
1949 | 1845 | ||
1950 | case FSF_REQUEST_SIZE_TOO_LARGE: | 1846 | case FSF_REQUEST_SIZE_TOO_LARGE: |
1951 | ZFCP_LOG_FLAGS(2, "FSF_REQUEST_SIZE_TOO_LARGE\n"); | ||
1952 | ZFCP_LOG_INFO( | 1847 | ZFCP_LOG_INFO( |
1953 | "Length of the ELS request buffer, " | 1848 | "Length of the ELS request buffer, " |
1954 | "specified in QTCB bottom, " | 1849 | "specified in QTCB bottom, " |
@@ -1960,7 +1855,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1960 | break; | 1855 | break; |
1961 | 1856 | ||
1962 | case FSF_RESPONSE_SIZE_TOO_LARGE: | 1857 | case FSF_RESPONSE_SIZE_TOO_LARGE: |
1963 | ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_SIZE_TOO_LARGE\n"); | ||
1964 | ZFCP_LOG_INFO( | 1858 | ZFCP_LOG_INFO( |
1965 | "Length of the ELS response buffer, " | 1859 | "Length of the ELS response buffer, " |
1966 | "specified in QTCB bottom, " | 1860 | "specified in QTCB bottom, " |
@@ -1973,7 +1867,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1973 | 1867 | ||
1974 | case FSF_SBAL_MISMATCH: | 1868 | case FSF_SBAL_MISMATCH: |
1975 | /* should never occure, avoided in zfcp_fsf_send_els */ | 1869 | /* should never occure, avoided in zfcp_fsf_send_els */ |
1976 | ZFCP_LOG_FLAGS(2, "FSF_SBAL_MISMATCH\n"); | ||
1977 | ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, " | 1870 | ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, " |
1978 | "resp_buf_length=%d)\n", | 1871 | "resp_buf_length=%d)\n", |
1979 | zfcp_get_busid_by_adapter(adapter), | 1872 | zfcp_get_busid_by_adapter(adapter), |
@@ -1982,7 +1875,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1982 | break; | 1875 | break; |
1983 | 1876 | ||
1984 | case FSF_ACCESS_DENIED: | 1877 | case FSF_ACCESS_DENIED: |
1985 | ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); | ||
1986 | ZFCP_LOG_NORMAL("access denied, cannot send ELS command " | 1878 | ZFCP_LOG_NORMAL("access denied, cannot send ELS command " |
1987 | "(adapter %s, port d_id=0x%08x)\n", | 1879 | "(adapter %s, port d_id=0x%08x)\n", |
1988 | zfcp_get_busid_by_adapter(adapter), d_id); | 1880 | zfcp_get_busid_by_adapter(adapter), d_id); |
@@ -2000,11 +1892,8 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
2000 | } | 1892 | } |
2001 | } | 1893 | } |
2002 | debug_text_event(adapter->erp_dbf, 1, "fsf_s_access"); | 1894 | debug_text_event(adapter->erp_dbf, 1, "fsf_s_access"); |
2003 | read_lock(&zfcp_data.config_lock); | ||
2004 | port = zfcp_get_port_by_did(adapter, d_id); | ||
2005 | if (port != NULL) | 1895 | if (port != NULL) |
2006 | zfcp_erp_port_access_denied(port); | 1896 | zfcp_erp_port_access_denied(port); |
2007 | read_unlock(&zfcp_data.config_lock); | ||
2008 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1897 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2009 | break; | 1898 | break; |
2010 | 1899 | ||
@@ -2195,14 +2084,11 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2195 | switch (fsf_req->qtcb->header.fsf_status) { | 2084 | switch (fsf_req->qtcb->header.fsf_status) { |
2196 | 2085 | ||
2197 | case FSF_GOOD: | 2086 | case FSF_GOOD: |
2198 | ZFCP_LOG_FLAGS(2, "FSF_GOOD\n"); | ||
2199 | |||
2200 | if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1)) | 2087 | if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1)) |
2201 | return -EIO; | 2088 | return -EIO; |
2202 | 2089 | ||
2203 | switch (adapter->fc_topology) { | 2090 | switch (adapter->fc_topology) { |
2204 | case FSF_TOPO_P2P: | 2091 | case FSF_TOPO_P2P: |
2205 | ZFCP_LOG_FLAGS(1, "FSF_TOPO_P2P\n"); | ||
2206 | ZFCP_LOG_NORMAL("Point-to-Point fibrechannel " | 2092 | ZFCP_LOG_NORMAL("Point-to-Point fibrechannel " |
2207 | "configuration detected at adapter %s\n" | 2093 | "configuration detected at adapter %s\n" |
2208 | "Peer WWNN 0x%016llx, " | 2094 | "Peer WWNN 0x%016llx, " |
@@ -2216,7 +2102,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2216 | "top-p-to-p"); | 2102 | "top-p-to-p"); |
2217 | break; | 2103 | break; |
2218 | case FSF_TOPO_AL: | 2104 | case FSF_TOPO_AL: |
2219 | ZFCP_LOG_FLAGS(1, "FSF_TOPO_AL\n"); | ||
2220 | ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " | 2105 | ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " |
2221 | "topology detected at adapter %s " | 2106 | "topology detected at adapter %s " |
2222 | "unsupported, shutting down adapter\n", | 2107 | "unsupported, shutting down adapter\n", |
@@ -2226,7 +2111,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2226 | zfcp_erp_adapter_shutdown(adapter, 0); | 2111 | zfcp_erp_adapter_shutdown(adapter, 0); |
2227 | return -EIO; | 2112 | return -EIO; |
2228 | case FSF_TOPO_FABRIC: | 2113 | case FSF_TOPO_FABRIC: |
2229 | ZFCP_LOG_FLAGS(1, "FSF_TOPO_FABRIC\n"); | ||
2230 | ZFCP_LOG_INFO("Switched fabric fibrechannel " | 2114 | ZFCP_LOG_INFO("Switched fabric fibrechannel " |
2231 | "network detected at adapter %s.\n", | 2115 | "network detected at adapter %s.\n", |
2232 | zfcp_get_busid_by_adapter(adapter)); | 2116 | zfcp_get_busid_by_adapter(adapter)); |
@@ -2357,7 +2241,7 @@ zfcp_fsf_exchange_port_data(struct zfcp_adapter *adapter, | |||
2357 | wait_event(fsf_req->completion_wq, | 2241 | wait_event(fsf_req->completion_wq, |
2358 | fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); | 2242 | fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); |
2359 | del_timer_sync(timer); | 2243 | del_timer_sync(timer); |
2360 | zfcp_fsf_req_cleanup(fsf_req); | 2244 | zfcp_fsf_req_free(fsf_req); |
2361 | out: | 2245 | out: |
2362 | kfree(timer); | 2246 | kfree(timer); |
2363 | return retval; | 2247 | return retval; |
@@ -2379,7 +2263,6 @@ zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2379 | 2263 | ||
2380 | switch (fsf_req->qtcb->header.fsf_status) { | 2264 | switch (fsf_req->qtcb->header.fsf_status) { |
2381 | case FSF_GOOD: | 2265 | case FSF_GOOD: |
2382 | ZFCP_LOG_FLAGS(2,"FSF_GOOD\n"); | ||
2383 | bottom = &fsf_req->qtcb->bottom.port; | 2266 | bottom = &fsf_req->qtcb->bottom.port; |
2384 | memcpy(data, bottom, sizeof(*data)); | 2267 | memcpy(data, bottom, sizeof(*data)); |
2385 | break; | 2268 | break; |
@@ -2481,7 +2364,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2481 | switch (header->fsf_status) { | 2364 | switch (header->fsf_status) { |
2482 | 2365 | ||
2483 | case FSF_PORT_ALREADY_OPEN: | 2366 | case FSF_PORT_ALREADY_OPEN: |
2484 | ZFCP_LOG_FLAGS(0, "FSF_PORT_ALREADY_OPEN\n"); | ||
2485 | ZFCP_LOG_NORMAL("bug: remote port 0x%016Lx on adapter %s " | 2367 | ZFCP_LOG_NORMAL("bug: remote port 0x%016Lx on adapter %s " |
2486 | "is already open.\n", | 2368 | "is already open.\n", |
2487 | port->wwpn, zfcp_get_busid_by_port(port)); | 2369 | port->wwpn, zfcp_get_busid_by_port(port)); |
@@ -2494,7 +2376,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2494 | break; | 2376 | break; |
2495 | 2377 | ||
2496 | case FSF_ACCESS_DENIED: | 2378 | case FSF_ACCESS_DENIED: |
2497 | ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); | ||
2498 | ZFCP_LOG_NORMAL("Access denied, cannot open port 0x%016Lx " | 2379 | ZFCP_LOG_NORMAL("Access denied, cannot open port 0x%016Lx " |
2499 | "on adapter %s\n", | 2380 | "on adapter %s\n", |
2500 | port->wwpn, zfcp_get_busid_by_port(port)); | 2381 | port->wwpn, zfcp_get_busid_by_port(port)); |
@@ -2517,7 +2398,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2517 | break; | 2398 | break; |
2518 | 2399 | ||
2519 | case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED: | 2400 | case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED: |
2520 | ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED\n"); | ||
2521 | ZFCP_LOG_INFO("error: The FSF adapter is out of resources. " | 2401 | ZFCP_LOG_INFO("error: The FSF adapter is out of resources. " |
2522 | "The remote port 0x%016Lx on adapter %s " | 2402 | "The remote port 0x%016Lx on adapter %s " |
2523 | "could not be opened. Disabling it.\n", | 2403 | "could not be opened. Disabling it.\n", |
@@ -2529,11 +2409,8 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2529 | break; | 2409 | break; |
2530 | 2410 | ||
2531 | case FSF_ADAPTER_STATUS_AVAILABLE: | 2411 | case FSF_ADAPTER_STATUS_AVAILABLE: |
2532 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
2533 | switch (header->fsf_status_qual.word[0]) { | 2412 | switch (header->fsf_status_qual.word[0]) { |
2534 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 2413 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
2535 | ZFCP_LOG_FLAGS(2, | ||
2536 | "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
2537 | debug_text_event(fsf_req->adapter->erp_dbf, 1, | 2414 | debug_text_event(fsf_req->adapter->erp_dbf, 1, |
2538 | "fsf_sq_ltest"); | 2415 | "fsf_sq_ltest"); |
2539 | /* ERP strategy will escalate */ | 2416 | /* ERP strategy will escalate */ |
@@ -2546,7 +2423,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2546 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2423 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2547 | break; | 2424 | break; |
2548 | case FSF_SQ_NO_RETRY_POSSIBLE: | 2425 | case FSF_SQ_NO_RETRY_POSSIBLE: |
2549 | ZFCP_LOG_FLAGS(0, "FSF_SQ_NO_RETRY_POSSIBLE\n"); | ||
2550 | ZFCP_LOG_NORMAL("The remote port 0x%016Lx on " | 2426 | ZFCP_LOG_NORMAL("The remote port 0x%016Lx on " |
2551 | "adapter %s could not be opened. " | 2427 | "adapter %s could not be opened. " |
2552 | "Disabling it.\n", | 2428 | "Disabling it.\n", |
@@ -2572,7 +2448,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2572 | break; | 2448 | break; |
2573 | 2449 | ||
2574 | case FSF_GOOD: | 2450 | case FSF_GOOD: |
2575 | ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); | ||
2576 | /* save port handle assigned by FSF */ | 2451 | /* save port handle assigned by FSF */ |
2577 | port->handle = header->port_handle; | 2452 | port->handle = header->port_handle; |
2578 | ZFCP_LOG_INFO("The remote port 0x%016Lx via adapter %s " | 2453 | ZFCP_LOG_INFO("The remote port 0x%016Lx via adapter %s " |
@@ -2582,6 +2457,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2582 | /* mark port as open */ | 2457 | /* mark port as open */ |
2583 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN | | 2458 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN | |
2584 | ZFCP_STATUS_PORT_PHYS_OPEN, &port->status); | 2459 | ZFCP_STATUS_PORT_PHYS_OPEN, &port->status); |
2460 | atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED | | ||
2461 | ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
2462 | &port->status); | ||
2585 | retval = 0; | 2463 | retval = 0; |
2586 | /* check whether D_ID has changed during open */ | 2464 | /* check whether D_ID has changed during open */ |
2587 | /* | 2465 | /* |
@@ -2630,7 +2508,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2630 | 2508 | ||
2631 | case FSF_UNKNOWN_OP_SUBTYPE: | 2509 | case FSF_UNKNOWN_OP_SUBTYPE: |
2632 | /* should never occure, subtype not set in zfcp_fsf_open_port */ | 2510 | /* should never occure, subtype not set in zfcp_fsf_open_port */ |
2633 | ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_OP_SUBTYPE\n"); | ||
2634 | ZFCP_LOG_INFO("unknown operation subtype (adapter: %s, " | 2511 | ZFCP_LOG_INFO("unknown operation subtype (adapter: %s, " |
2635 | "op_subtype=0x%x)\n", | 2512 | "op_subtype=0x%x)\n", |
2636 | zfcp_get_busid_by_port(port), | 2513 | zfcp_get_busid_by_port(port), |
@@ -2739,7 +2616,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2739 | switch (fsf_req->qtcb->header.fsf_status) { | 2616 | switch (fsf_req->qtcb->header.fsf_status) { |
2740 | 2617 | ||
2741 | case FSF_PORT_HANDLE_NOT_VALID: | 2618 | case FSF_PORT_HANDLE_NOT_VALID: |
2742 | ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
2743 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " | 2619 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " |
2744 | "0x%016Lx on adapter %s invalid. This may happen " | 2620 | "0x%016Lx on adapter %s invalid. This may happen " |
2745 | "occasionally.\n", port->handle, | 2621 | "occasionally.\n", port->handle, |
@@ -2755,7 +2631,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2755 | break; | 2631 | break; |
2756 | 2632 | ||
2757 | case FSF_ADAPTER_STATUS_AVAILABLE: | 2633 | case FSF_ADAPTER_STATUS_AVAILABLE: |
2758 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
2759 | /* Note: FSF has actually closed the port in this case. | 2634 | /* Note: FSF has actually closed the port in this case. |
2760 | * The status code is just daft. Fingers crossed for a change | 2635 | * The status code is just daft. Fingers crossed for a change |
2761 | */ | 2636 | */ |
@@ -2763,7 +2638,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2763 | break; | 2638 | break; |
2764 | 2639 | ||
2765 | case FSF_GOOD: | 2640 | case FSF_GOOD: |
2766 | ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); | ||
2767 | ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, " | 2641 | ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, " |
2768 | "port handle 0x%x\n", port->wwpn, | 2642 | "port handle 0x%x\n", port->wwpn, |
2769 | zfcp_get_busid_by_port(port), port->handle); | 2643 | zfcp_get_busid_by_port(port), port->handle); |
@@ -2884,7 +2758,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2884 | switch (header->fsf_status) { | 2758 | switch (header->fsf_status) { |
2885 | 2759 | ||
2886 | case FSF_PORT_HANDLE_NOT_VALID: | 2760 | case FSF_PORT_HANDLE_NOT_VALID: |
2887 | ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
2888 | ZFCP_LOG_INFO("Temporary port identifier 0x%x invalid" | 2761 | ZFCP_LOG_INFO("Temporary port identifier 0x%x invalid" |
2889 | "(adapter %s, port 0x%016Lx). " | 2762 | "(adapter %s, port 0x%016Lx). " |
2890 | "This may happen occasionally.\n", | 2763 | "This may happen occasionally.\n", |
@@ -2902,7 +2775,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2902 | break; | 2775 | break; |
2903 | 2776 | ||
2904 | case FSF_ACCESS_DENIED: | 2777 | case FSF_ACCESS_DENIED: |
2905 | ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); | ||
2906 | ZFCP_LOG_NORMAL("Access denied, cannot close " | 2778 | ZFCP_LOG_NORMAL("Access denied, cannot close " |
2907 | "physical port 0x%016Lx on adapter %s\n", | 2779 | "physical port 0x%016Lx on adapter %s\n", |
2908 | port->wwpn, zfcp_get_busid_by_port(port)); | 2780 | port->wwpn, zfcp_get_busid_by_port(port)); |
@@ -2925,32 +2797,26 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2925 | break; | 2797 | break; |
2926 | 2798 | ||
2927 | case FSF_PORT_BOXED: | 2799 | case FSF_PORT_BOXED: |
2928 | ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); | ||
2929 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter " | 2800 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter " |
2930 | "%s needs to be reopened but it was attempted " | 2801 | "%s needs to be reopened but it was attempted " |
2931 | "to close it physically.\n", | 2802 | "to close it physically.\n", |
2932 | port->wwpn, | 2803 | port->wwpn, |
2933 | zfcp_get_busid_by_port(port)); | 2804 | zfcp_get_busid_by_port(port)); |
2934 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_pboxed"); | 2805 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_pboxed"); |
2935 | zfcp_erp_port_reopen(port, 0); | 2806 | zfcp_erp_port_boxed(port); |
2936 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 2807 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
2937 | ZFCP_STATUS_FSFREQ_RETRY; | 2808 | ZFCP_STATUS_FSFREQ_RETRY; |
2938 | break; | 2809 | break; |
2939 | 2810 | ||
2940 | case FSF_ADAPTER_STATUS_AVAILABLE: | 2811 | case FSF_ADAPTER_STATUS_AVAILABLE: |
2941 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
2942 | switch (header->fsf_status_qual.word[0]) { | 2812 | switch (header->fsf_status_qual.word[0]) { |
2943 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 2813 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
2944 | ZFCP_LOG_FLAGS(2, | ||
2945 | "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
2946 | debug_text_event(fsf_req->adapter->erp_dbf, 1, | 2814 | debug_text_event(fsf_req->adapter->erp_dbf, 1, |
2947 | "fsf_sq_ltest"); | 2815 | "fsf_sq_ltest"); |
2948 | /* This will now be escalated by ERP */ | 2816 | /* This will now be escalated by ERP */ |
2949 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2817 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2950 | break; | 2818 | break; |
2951 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: | 2819 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: |
2952 | ZFCP_LOG_FLAGS(2, | ||
2953 | "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); | ||
2954 | /* ERP strategy will escalate */ | 2820 | /* ERP strategy will escalate */ |
2955 | debug_text_event(fsf_req->adapter->erp_dbf, 1, | 2821 | debug_text_event(fsf_req->adapter->erp_dbf, 1, |
2956 | "fsf_sq_ulp"); | 2822 | "fsf_sq_ulp"); |
@@ -2970,7 +2836,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2970 | break; | 2836 | break; |
2971 | 2837 | ||
2972 | case FSF_GOOD: | 2838 | case FSF_GOOD: |
2973 | ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); | ||
2974 | ZFCP_LOG_DEBUG("Remote port 0x%016Lx via adapter %s " | 2839 | ZFCP_LOG_DEBUG("Remote port 0x%016Lx via adapter %s " |
2975 | "physically closed, port handle 0x%x\n", | 2840 | "physically closed, port handle 0x%x\n", |
2976 | port->wwpn, | 2841 | port->wwpn, |
@@ -3116,7 +2981,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3116 | switch (header->fsf_status) { | 2981 | switch (header->fsf_status) { |
3117 | 2982 | ||
3118 | case FSF_PORT_HANDLE_NOT_VALID: | 2983 | case FSF_PORT_HANDLE_NOT_VALID: |
3119 | ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
3120 | ZFCP_LOG_INFO("Temporary port identifier 0x%x " | 2984 | ZFCP_LOG_INFO("Temporary port identifier 0x%x " |
3121 | "for port 0x%016Lx on adapter %s invalid " | 2985 | "for port 0x%016Lx on adapter %s invalid " |
3122 | "This may happen occasionally\n", | 2986 | "This may happen occasionally\n", |
@@ -3132,7 +2996,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3132 | break; | 2996 | break; |
3133 | 2997 | ||
3134 | case FSF_LUN_ALREADY_OPEN: | 2998 | case FSF_LUN_ALREADY_OPEN: |
3135 | ZFCP_LOG_FLAGS(0, "FSF_LUN_ALREADY_OPEN\n"); | ||
3136 | ZFCP_LOG_NORMAL("bug: Attempted to open unit 0x%016Lx on " | 2999 | ZFCP_LOG_NORMAL("bug: Attempted to open unit 0x%016Lx on " |
3137 | "remote port 0x%016Lx on adapter %s twice.\n", | 3000 | "remote port 0x%016Lx on adapter %s twice.\n", |
3138 | unit->fcp_lun, | 3001 | unit->fcp_lun, |
@@ -3143,7 +3006,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3143 | break; | 3006 | break; |
3144 | 3007 | ||
3145 | case FSF_ACCESS_DENIED: | 3008 | case FSF_ACCESS_DENIED: |
3146 | ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); | ||
3147 | ZFCP_LOG_NORMAL("Access denied, cannot open unit 0x%016Lx on " | 3009 | ZFCP_LOG_NORMAL("Access denied, cannot open unit 0x%016Lx on " |
3148 | "remote port 0x%016Lx on adapter %s\n", | 3010 | "remote port 0x%016Lx on adapter %s\n", |
3149 | unit->fcp_lun, unit->port->wwpn, | 3011 | unit->fcp_lun, unit->port->wwpn, |
@@ -3169,18 +3031,16 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3169 | break; | 3031 | break; |
3170 | 3032 | ||
3171 | case FSF_PORT_BOXED: | 3033 | case FSF_PORT_BOXED: |
3172 | ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); | ||
3173 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " | 3034 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " |
3174 | "needs to be reopened\n", | 3035 | "needs to be reopened\n", |
3175 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); | 3036 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); |
3176 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); | 3037 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); |
3177 | zfcp_erp_port_reopen(unit->port, 0); | 3038 | zfcp_erp_port_boxed(unit->port); |
3178 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3039 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3179 | ZFCP_STATUS_FSFREQ_RETRY; | 3040 | ZFCP_STATUS_FSFREQ_RETRY; |
3180 | break; | 3041 | break; |
3181 | 3042 | ||
3182 | case FSF_LUN_SHARING_VIOLATION: | 3043 | case FSF_LUN_SHARING_VIOLATION: |
3183 | ZFCP_LOG_FLAGS(2, "FSF_LUN_SHARING_VIOLATION\n"); | ||
3184 | if (header->fsf_status_qual.word[0] != 0) { | 3044 | if (header->fsf_status_qual.word[0] != 0) { |
3185 | ZFCP_LOG_NORMAL("FCP-LUN 0x%Lx at the remote port " | 3045 | ZFCP_LOG_NORMAL("FCP-LUN 0x%Lx at the remote port " |
3186 | "with WWPN 0x%Lx " | 3046 | "with WWPN 0x%Lx " |
@@ -3224,7 +3084,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3224 | break; | 3084 | break; |
3225 | 3085 | ||
3226 | case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED: | 3086 | case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED: |
3227 | ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED\n"); | ||
3228 | ZFCP_LOG_INFO("error: The adapter ran out of resources. " | 3087 | ZFCP_LOG_INFO("error: The adapter ran out of resources. " |
3229 | "There is no handle (temporary port identifier) " | 3088 | "There is no handle (temporary port identifier) " |
3230 | "available for unit 0x%016Lx on port 0x%016Lx " | 3089 | "available for unit 0x%016Lx on port 0x%016Lx " |
@@ -3239,20 +3098,15 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3239 | break; | 3098 | break; |
3240 | 3099 | ||
3241 | case FSF_ADAPTER_STATUS_AVAILABLE: | 3100 | case FSF_ADAPTER_STATUS_AVAILABLE: |
3242 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
3243 | switch (header->fsf_status_qual.word[0]) { | 3101 | switch (header->fsf_status_qual.word[0]) { |
3244 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 3102 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
3245 | ZFCP_LOG_FLAGS(2, | ||
3246 | "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
3247 | /* Re-establish link to port */ | 3103 | /* Re-establish link to port */ |
3248 | debug_text_event(adapter->erp_dbf, 1, | 3104 | debug_text_event(adapter->erp_dbf, 1, |
3249 | "fsf_sq_ltest"); | 3105 | "fsf_sq_ltest"); |
3250 | zfcp_erp_port_reopen(unit->port, 0); | 3106 | zfcp_test_link(unit->port); |
3251 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3107 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3252 | break; | 3108 | break; |
3253 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: | 3109 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: |
3254 | ZFCP_LOG_FLAGS(2, | ||
3255 | "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); | ||
3256 | /* ERP strategy will escalate */ | 3110 | /* ERP strategy will escalate */ |
3257 | debug_text_event(adapter->erp_dbf, 1, | 3111 | debug_text_event(adapter->erp_dbf, 1, |
3258 | "fsf_sq_ulp"); | 3112 | "fsf_sq_ulp"); |
@@ -3271,7 +3125,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3271 | break; | 3125 | break; |
3272 | 3126 | ||
3273 | case FSF_INVALID_COMMAND_OPTION: | 3127 | case FSF_INVALID_COMMAND_OPTION: |
3274 | ZFCP_LOG_FLAGS(2, "FSF_INVALID_COMMAND_OPTION\n"); | ||
3275 | ZFCP_LOG_NORMAL( | 3128 | ZFCP_LOG_NORMAL( |
3276 | "Invalid option 0x%x has been specified " | 3129 | "Invalid option 0x%x has been specified " |
3277 | "in QTCB bottom sent to the adapter %s\n", | 3130 | "in QTCB bottom sent to the adapter %s\n", |
@@ -3282,7 +3135,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3282 | break; | 3135 | break; |
3283 | 3136 | ||
3284 | case FSF_GOOD: | 3137 | case FSF_GOOD: |
3285 | ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); | ||
3286 | /* save LUN handle assigned by FSF */ | 3138 | /* save LUN handle assigned by FSF */ |
3287 | unit->handle = header->lun_handle; | 3139 | unit->handle = header->lun_handle; |
3288 | ZFCP_LOG_TRACE("unit 0x%016Lx on remote port 0x%016Lx on " | 3140 | ZFCP_LOG_TRACE("unit 0x%016Lx on remote port 0x%016Lx on " |
@@ -3293,7 +3145,9 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3293 | unit->handle); | 3145 | unit->handle); |
3294 | /* mark unit as open */ | 3146 | /* mark unit as open */ |
3295 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status); | 3147 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status); |
3296 | 3148 | atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED | | |
3149 | ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
3150 | &unit->status); | ||
3297 | if (adapter->supported_features & FSF_FEATURE_LUN_SHARING){ | 3151 | if (adapter->supported_features & FSF_FEATURE_LUN_SHARING){ |
3298 | if (!exclusive) | 3152 | if (!exclusive) |
3299 | atomic_set_mask(ZFCP_STATUS_UNIT_SHARED, | 3153 | atomic_set_mask(ZFCP_STATUS_UNIT_SHARED, |
@@ -3437,7 +3291,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3437 | switch (fsf_req->qtcb->header.fsf_status) { | 3291 | switch (fsf_req->qtcb->header.fsf_status) { |
3438 | 3292 | ||
3439 | case FSF_PORT_HANDLE_NOT_VALID: | 3293 | case FSF_PORT_HANDLE_NOT_VALID: |
3440 | ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
3441 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " | 3294 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " |
3442 | "0x%016Lx on adapter %s invalid. This may " | 3295 | "0x%016Lx on adapter %s invalid. This may " |
3443 | "happen in rare circumstances\n", | 3296 | "happen in rare circumstances\n", |
@@ -3458,7 +3311,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3458 | break; | 3311 | break; |
3459 | 3312 | ||
3460 | case FSF_LUN_HANDLE_NOT_VALID: | 3313 | case FSF_LUN_HANDLE_NOT_VALID: |
3461 | ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n"); | ||
3462 | ZFCP_LOG_INFO("Temporary LUN identifier 0x%x of unit " | 3314 | ZFCP_LOG_INFO("Temporary LUN identifier 0x%x of unit " |
3463 | "0x%016Lx on port 0x%016Lx on adapter %s is " | 3315 | "0x%016Lx on port 0x%016Lx on adapter %s is " |
3464 | "invalid. This may happen occasionally.\n", | 3316 | "invalid. This may happen occasionally.\n", |
@@ -3480,32 +3332,26 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3480 | break; | 3332 | break; |
3481 | 3333 | ||
3482 | case FSF_PORT_BOXED: | 3334 | case FSF_PORT_BOXED: |
3483 | ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); | ||
3484 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " | 3335 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " |
3485 | "needs to be reopened\n", | 3336 | "needs to be reopened\n", |
3486 | unit->port->wwpn, | 3337 | unit->port->wwpn, |
3487 | zfcp_get_busid_by_unit(unit)); | 3338 | zfcp_get_busid_by_unit(unit)); |
3488 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); | 3339 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); |
3489 | zfcp_erp_port_reopen(unit->port, 0); | 3340 | zfcp_erp_port_boxed(unit->port); |
3490 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3341 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3491 | ZFCP_STATUS_FSFREQ_RETRY; | 3342 | ZFCP_STATUS_FSFREQ_RETRY; |
3492 | break; | 3343 | break; |
3493 | 3344 | ||
3494 | case FSF_ADAPTER_STATUS_AVAILABLE: | 3345 | case FSF_ADAPTER_STATUS_AVAILABLE: |
3495 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
3496 | switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) { | 3346 | switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) { |
3497 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 3347 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
3498 | ZFCP_LOG_FLAGS(2, | ||
3499 | "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
3500 | /* re-establish link to port */ | 3348 | /* re-establish link to port */ |
3501 | debug_text_event(fsf_req->adapter->erp_dbf, 1, | 3349 | debug_text_event(fsf_req->adapter->erp_dbf, 1, |
3502 | "fsf_sq_ltest"); | 3350 | "fsf_sq_ltest"); |
3503 | zfcp_erp_port_reopen(unit->port, 0); | 3351 | zfcp_test_link(unit->port); |
3504 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3352 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3505 | break; | 3353 | break; |
3506 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: | 3354 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: |
3507 | ZFCP_LOG_FLAGS(2, | ||
3508 | "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); | ||
3509 | /* ERP strategy will escalate */ | 3355 | /* ERP strategy will escalate */ |
3510 | debug_text_event(fsf_req->adapter->erp_dbf, 1, | 3356 | debug_text_event(fsf_req->adapter->erp_dbf, 1, |
3511 | "fsf_sq_ulp"); | 3357 | "fsf_sq_ulp"); |
@@ -3526,7 +3372,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3526 | break; | 3372 | break; |
3527 | 3373 | ||
3528 | case FSF_GOOD: | 3374 | case FSF_GOOD: |
3529 | ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); | ||
3530 | ZFCP_LOG_TRACE("unit 0x%016Lx on port 0x%016Lx on adapter %s " | 3375 | ZFCP_LOG_TRACE("unit 0x%016Lx on port 0x%016Lx on adapter %s " |
3531 | "closed, port handle 0x%x\n", | 3376 | "closed, port handle 0x%x\n", |
3532 | unit->fcp_lun, | 3377 | unit->fcp_lun, |
@@ -3622,7 +3467,6 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, | |||
3622 | */ | 3467 | */ |
3623 | switch (scsi_cmnd->sc_data_direction) { | 3468 | switch (scsi_cmnd->sc_data_direction) { |
3624 | case DMA_NONE: | 3469 | case DMA_NONE: |
3625 | ZFCP_LOG_FLAGS(3, "DMA_NONE\n"); | ||
3626 | fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND; | 3470 | fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND; |
3627 | /* | 3471 | /* |
3628 | * FIXME(qdio): | 3472 | * FIXME(qdio): |
@@ -3632,19 +3476,16 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, | |||
3632 | sbtype = SBAL_FLAGS0_TYPE_READ; | 3476 | sbtype = SBAL_FLAGS0_TYPE_READ; |
3633 | break; | 3477 | break; |
3634 | case DMA_FROM_DEVICE: | 3478 | case DMA_FROM_DEVICE: |
3635 | ZFCP_LOG_FLAGS(3, "DMA_FROM_DEVICE\n"); | ||
3636 | fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_READ; | 3479 | fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_READ; |
3637 | sbtype = SBAL_FLAGS0_TYPE_READ; | 3480 | sbtype = SBAL_FLAGS0_TYPE_READ; |
3638 | fcp_cmnd_iu->rddata = 1; | 3481 | fcp_cmnd_iu->rddata = 1; |
3639 | break; | 3482 | break; |
3640 | case DMA_TO_DEVICE: | 3483 | case DMA_TO_DEVICE: |
3641 | ZFCP_LOG_FLAGS(3, "DMA_TO_DEVICE\n"); | ||
3642 | fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_WRITE; | 3484 | fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_WRITE; |
3643 | sbtype = SBAL_FLAGS0_TYPE_WRITE; | 3485 | sbtype = SBAL_FLAGS0_TYPE_WRITE; |
3644 | fcp_cmnd_iu->wddata = 1; | 3486 | fcp_cmnd_iu->wddata = 1; |
3645 | break; | 3487 | break; |
3646 | case DMA_BIDIRECTIONAL: | 3488 | case DMA_BIDIRECTIONAL: |
3647 | ZFCP_LOG_FLAGS(0, "DMA_BIDIRECTIONAL not supported\n"); | ||
3648 | default: | 3489 | default: |
3649 | /* | 3490 | /* |
3650 | * dummy, catch this condition earlier | 3491 | * dummy, catch this condition earlier |
@@ -3877,7 +3718,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3877 | switch (header->fsf_status) { | 3718 | switch (header->fsf_status) { |
3878 | 3719 | ||
3879 | case FSF_PORT_HANDLE_NOT_VALID: | 3720 | case FSF_PORT_HANDLE_NOT_VALID: |
3880 | ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); | ||
3881 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " | 3721 | ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " |
3882 | "0x%016Lx on adapter %s invalid\n", | 3722 | "0x%016Lx on adapter %s invalid\n", |
3883 | unit->port->handle, | 3723 | unit->port->handle, |
@@ -3892,7 +3732,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3892 | break; | 3732 | break; |
3893 | 3733 | ||
3894 | case FSF_LUN_HANDLE_NOT_VALID: | 3734 | case FSF_LUN_HANDLE_NOT_VALID: |
3895 | ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n"); | ||
3896 | ZFCP_LOG_INFO("Temporary LUN identifier 0x%x for unit " | 3735 | ZFCP_LOG_INFO("Temporary LUN identifier 0x%x for unit " |
3897 | "0x%016Lx on port 0x%016Lx on adapter %s is " | 3736 | "0x%016Lx on port 0x%016Lx on adapter %s is " |
3898 | "invalid. This may happen occasionally.\n", | 3737 | "invalid. This may happen occasionally.\n", |
@@ -3911,7 +3750,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3911 | break; | 3750 | break; |
3912 | 3751 | ||
3913 | case FSF_HANDLE_MISMATCH: | 3752 | case FSF_HANDLE_MISMATCH: |
3914 | ZFCP_LOG_FLAGS(0, "FSF_HANDLE_MISMATCH\n"); | ||
3915 | ZFCP_LOG_NORMAL("bug: The port handle 0x%x has changed " | 3753 | ZFCP_LOG_NORMAL("bug: The port handle 0x%x has changed " |
3916 | "unexpectedly. (adapter %s, port 0x%016Lx, " | 3754 | "unexpectedly. (adapter %s, port 0x%016Lx, " |
3917 | "unit 0x%016Lx)\n", | 3755 | "unit 0x%016Lx)\n", |
@@ -3934,7 +3772,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3934 | break; | 3772 | break; |
3935 | 3773 | ||
3936 | case FSF_SERVICE_CLASS_NOT_SUPPORTED: | 3774 | case FSF_SERVICE_CLASS_NOT_SUPPORTED: |
3937 | ZFCP_LOG_FLAGS(0, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n"); | ||
3938 | if (fsf_req->adapter->fc_service_class <= 3) { | 3775 | if (fsf_req->adapter->fc_service_class <= 3) { |
3939 | ZFCP_LOG_NORMAL("error: The adapter %s does " | 3776 | ZFCP_LOG_NORMAL("error: The adapter %s does " |
3940 | "not support fibrechannel class %d.\n", | 3777 | "not support fibrechannel class %d.\n", |
@@ -3959,7 +3796,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3959 | break; | 3796 | break; |
3960 | 3797 | ||
3961 | case FSF_FCPLUN_NOT_VALID: | 3798 | case FSF_FCPLUN_NOT_VALID: |
3962 | ZFCP_LOG_FLAGS(0, "FSF_FCPLUN_NOT_VALID\n"); | ||
3963 | ZFCP_LOG_NORMAL("bug: unit 0x%016Lx on port 0x%016Lx on " | 3799 | ZFCP_LOG_NORMAL("bug: unit 0x%016Lx on port 0x%016Lx on " |
3964 | "adapter %s does not have correct unit " | 3800 | "adapter %s does not have correct unit " |
3965 | "handle 0x%x\n", | 3801 | "handle 0x%x\n", |
@@ -3982,7 +3818,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3982 | break; | 3818 | break; |
3983 | 3819 | ||
3984 | case FSF_ACCESS_DENIED: | 3820 | case FSF_ACCESS_DENIED: |
3985 | ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); | ||
3986 | ZFCP_LOG_NORMAL("Access denied, cannot send FCP command to " | 3821 | ZFCP_LOG_NORMAL("Access denied, cannot send FCP command to " |
3987 | "unit 0x%016Lx on port 0x%016Lx on " | 3822 | "unit 0x%016Lx on port 0x%016Lx on " |
3988 | "adapter %s\n", unit->fcp_lun, unit->port->wwpn, | 3823 | "adapter %s\n", unit->fcp_lun, unit->port->wwpn, |
@@ -4006,7 +3841,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
4006 | break; | 3841 | break; |
4007 | 3842 | ||
4008 | case FSF_DIRECTION_INDICATOR_NOT_VALID: | 3843 | case FSF_DIRECTION_INDICATOR_NOT_VALID: |
4009 | ZFCP_LOG_FLAGS(0, "FSF_DIRECTION_INDICATOR_NOT_VALID\n"); | ||
4010 | ZFCP_LOG_INFO("bug: Invalid data direction given for unit " | 3844 | ZFCP_LOG_INFO("bug: Invalid data direction given for unit " |
4011 | "0x%016Lx on port 0x%016Lx on adapter %s " | 3845 | "0x%016Lx on port 0x%016Lx on adapter %s " |
4012 | "(debug info %d)\n", | 3846 | "(debug info %d)\n", |
@@ -4026,7 +3860,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
4026 | break; | 3860 | break; |
4027 | 3861 | ||
4028 | case FSF_CMND_LENGTH_NOT_VALID: | 3862 | case FSF_CMND_LENGTH_NOT_VALID: |
4029 | ZFCP_LOG_FLAGS(0, "FSF_CMND_LENGTH_NOT_VALID\n"); | ||
4030 | ZFCP_LOG_NORMAL | 3863 | ZFCP_LOG_NORMAL |
4031 | ("bug: An invalid control-data-block length field " | 3864 | ("bug: An invalid control-data-block length field " |
4032 | "was found in a command for unit 0x%016Lx on port " | 3865 | "was found in a command for unit 0x%016Lx on port " |
@@ -4046,69 +3879,43 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
4046 | break; | 3879 | break; |
4047 | 3880 | ||
4048 | case FSF_PORT_BOXED: | 3881 | case FSF_PORT_BOXED: |
4049 | ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); | ||
4050 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " | 3882 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " |
4051 | "needs to be reopened\n", | 3883 | "needs to be reopened\n", |
4052 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); | 3884 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); |
4053 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); | 3885 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); |
4054 | zfcp_erp_port_reopen(unit->port, 0); | 3886 | zfcp_erp_port_boxed(unit->port); |
4055 | zfcp_cmd_dbf_event_fsf("portbox", fsf_req, | ||
4056 | &header->fsf_status_qual, | ||
4057 | sizeof (union fsf_status_qual)); | ||
4058 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3887 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
4059 | ZFCP_STATUS_FSFREQ_RETRY; | 3888 | ZFCP_STATUS_FSFREQ_RETRY; |
4060 | break; | 3889 | break; |
4061 | 3890 | ||
4062 | case FSF_LUN_BOXED: | 3891 | case FSF_LUN_BOXED: |
4063 | ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n"); | ||
4064 | ZFCP_LOG_NORMAL("unit needs to be reopened (adapter %s, " | 3892 | ZFCP_LOG_NORMAL("unit needs to be reopened (adapter %s, " |
4065 | "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", | 3893 | "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", |
4066 | zfcp_get_busid_by_unit(unit), | 3894 | zfcp_get_busid_by_unit(unit), |
4067 | unit->port->wwpn, unit->fcp_lun); | 3895 | unit->port->wwpn, unit->fcp_lun); |
4068 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); | 3896 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); |
4069 | zfcp_erp_unit_reopen(unit, 0); | 3897 | zfcp_erp_unit_boxed(unit); |
4070 | zfcp_cmd_dbf_event_fsf("unitbox", fsf_req, | ||
4071 | &header->fsf_status_qual, | ||
4072 | sizeof(union fsf_status_qual)); | ||
4073 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3898 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
4074 | | ZFCP_STATUS_FSFREQ_RETRY; | 3899 | | ZFCP_STATUS_FSFREQ_RETRY; |
4075 | break; | 3900 | break; |
4076 | 3901 | ||
4077 | case FSF_ADAPTER_STATUS_AVAILABLE: | 3902 | case FSF_ADAPTER_STATUS_AVAILABLE: |
4078 | ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n"); | ||
4079 | switch (header->fsf_status_qual.word[0]) { | 3903 | switch (header->fsf_status_qual.word[0]) { |
4080 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: | 3904 | case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: |
4081 | ZFCP_LOG_FLAGS(2, | ||
4082 | "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n"); | ||
4083 | /* re-establish link to port */ | 3905 | /* re-establish link to port */ |
4084 | debug_text_event(fsf_req->adapter->erp_dbf, 1, | 3906 | debug_text_event(fsf_req->adapter->erp_dbf, 1, |
4085 | "fsf_sq_ltest"); | 3907 | "fsf_sq_ltest"); |
4086 | zfcp_erp_port_reopen(unit->port, 0); | 3908 | zfcp_test_link(unit->port); |
4087 | zfcp_cmd_dbf_event_fsf( | ||
4088 | "sqltest", | ||
4089 | fsf_req, | ||
4090 | &header->fsf_status_qual, | ||
4091 | sizeof (union fsf_status_qual)); | ||
4092 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | ||
4093 | break; | 3909 | break; |
4094 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: | 3910 | case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: |
4095 | ZFCP_LOG_FLAGS(3, | ||
4096 | "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n"); | ||
4097 | /* FIXME(hw) need proper specs for proper action */ | 3911 | /* FIXME(hw) need proper specs for proper action */ |
4098 | /* let scsi stack deal with retries and escalation */ | 3912 | /* let scsi stack deal with retries and escalation */ |
4099 | debug_text_event(fsf_req->adapter->erp_dbf, 1, | 3913 | debug_text_event(fsf_req->adapter->erp_dbf, 1, |
4100 | "fsf_sq_ulp"); | 3914 | "fsf_sq_ulp"); |
4101 | zfcp_cmd_dbf_event_fsf( | ||
4102 | "sqdeperp", | ||
4103 | fsf_req, | ||
4104 | &header->fsf_status_qual, | ||
4105 | sizeof (union fsf_status_qual)); | ||
4106 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | ||
4107 | break; | 3915 | break; |
4108 | default: | 3916 | default: |
4109 | /* FIXME: shall we consider this a successful transfer? */ | ||
4110 | ZFCP_LOG_NORMAL | 3917 | ZFCP_LOG_NORMAL |
4111 | ("bug: Wrong status qualifier 0x%x arrived.\n", | 3918 | ("Unknown status qualifier 0x%x arrived.\n", |
4112 | header->fsf_status_qual.word[0]); | 3919 | header->fsf_status_qual.word[0]); |
4113 | debug_text_event(fsf_req->adapter->erp_dbf, 0, | 3920 | debug_text_event(fsf_req->adapter->erp_dbf, 0, |
4114 | "fsf_sq_inval:"); | 3921 | "fsf_sq_inval:"); |
@@ -4117,14 +3924,13 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
4117 | sizeof(u32)); | 3924 | sizeof(u32)); |
4118 | break; | 3925 | break; |
4119 | } | 3926 | } |
3927 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | ||
4120 | break; | 3928 | break; |
4121 | 3929 | ||
4122 | case FSF_GOOD: | 3930 | case FSF_GOOD: |
4123 | ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); | ||
4124 | break; | 3931 | break; |
4125 | 3932 | ||
4126 | case FSF_FCP_RSP_AVAILABLE: | 3933 | case FSF_FCP_RSP_AVAILABLE: |
4127 | ZFCP_LOG_FLAGS(2, "FSF_FCP_RSP_AVAILABLE\n"); | ||
4128 | break; | 3934 | break; |
4129 | 3935 | ||
4130 | default: | 3936 | default: |
@@ -4217,14 +4023,12 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) | |||
4217 | ZFCP_LOG_DEBUG("rsp_len is valid\n"); | 4023 | ZFCP_LOG_DEBUG("rsp_len is valid\n"); |
4218 | switch (fcp_rsp_info[3]) { | 4024 | switch (fcp_rsp_info[3]) { |
4219 | case RSP_CODE_GOOD: | 4025 | case RSP_CODE_GOOD: |
4220 | ZFCP_LOG_FLAGS(3, "RSP_CODE_GOOD\n"); | ||
4221 | /* ok, continue */ | 4026 | /* ok, continue */ |
4222 | ZFCP_LOG_TRACE("no failure or Task Management " | 4027 | ZFCP_LOG_TRACE("no failure or Task Management " |
4223 | "Function complete\n"); | 4028 | "Function complete\n"); |
4224 | set_host_byte(&scpnt->result, DID_OK); | 4029 | set_host_byte(&scpnt->result, DID_OK); |
4225 | break; | 4030 | break; |
4226 | case RSP_CODE_LENGTH_MISMATCH: | 4031 | case RSP_CODE_LENGTH_MISMATCH: |
4227 | ZFCP_LOG_FLAGS(0, "RSP_CODE_LENGTH_MISMATCH\n"); | ||
4228 | /* hardware bug */ | 4032 | /* hardware bug */ |
4229 | ZFCP_LOG_NORMAL("bug: FCP response code indictates " | 4033 | ZFCP_LOG_NORMAL("bug: FCP response code indictates " |
4230 | "that the fibrechannel protocol data " | 4034 | "that the fibrechannel protocol data " |
@@ -4242,7 +4046,6 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) | |||
4242 | set_host_byte(&scpnt->result, DID_ERROR); | 4046 | set_host_byte(&scpnt->result, DID_ERROR); |
4243 | goto skip_fsfstatus; | 4047 | goto skip_fsfstatus; |
4244 | case RSP_CODE_FIELD_INVALID: | 4048 | case RSP_CODE_FIELD_INVALID: |
4245 | ZFCP_LOG_FLAGS(0, "RSP_CODE_FIELD_INVALID\n"); | ||
4246 | /* driver or hardware bug */ | 4049 | /* driver or hardware bug */ |
4247 | ZFCP_LOG_NORMAL("bug: FCP response code indictates " | 4050 | ZFCP_LOG_NORMAL("bug: FCP response code indictates " |
4248 | "that the fibrechannel protocol data " | 4051 | "that the fibrechannel protocol data " |
@@ -4261,7 +4064,6 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) | |||
4261 | zfcp_cmd_dbf_event_fsf("codeinv", fsf_req, NULL, 0); | 4064 | zfcp_cmd_dbf_event_fsf("codeinv", fsf_req, NULL, 0); |
4262 | goto skip_fsfstatus; | 4065 | goto skip_fsfstatus; |
4263 | case RSP_CODE_RO_MISMATCH: | 4066 | case RSP_CODE_RO_MISMATCH: |
4264 | ZFCP_LOG_FLAGS(0, "RSP_CODE_RO_MISMATCH\n"); | ||
4265 | /* hardware bug */ | 4067 | /* hardware bug */ |
4266 | ZFCP_LOG_NORMAL("bug: The FCP response code indicates " | 4068 | ZFCP_LOG_NORMAL("bug: The FCP response code indicates " |
4267 | "that conflicting values for the " | 4069 | "that conflicting values for the " |
@@ -4407,13 +4209,11 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req) | |||
4407 | /* check FCP_RSP_INFO */ | 4209 | /* check FCP_RSP_INFO */ |
4408 | switch (fcp_rsp_info[3]) { | 4210 | switch (fcp_rsp_info[3]) { |
4409 | case RSP_CODE_GOOD: | 4211 | case RSP_CODE_GOOD: |
4410 | ZFCP_LOG_FLAGS(3, "RSP_CODE_GOOD\n"); | ||
4411 | /* ok, continue */ | 4212 | /* ok, continue */ |
4412 | ZFCP_LOG_DEBUG("no failure or Task Management " | 4213 | ZFCP_LOG_DEBUG("no failure or Task Management " |
4413 | "Function complete\n"); | 4214 | "Function complete\n"); |
4414 | break; | 4215 | break; |
4415 | case RSP_CODE_TASKMAN_UNSUPP: | 4216 | case RSP_CODE_TASKMAN_UNSUPP: |
4416 | ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_UNSUPP\n"); | ||
4417 | ZFCP_LOG_NORMAL("bug: A reuested task management function " | 4217 | ZFCP_LOG_NORMAL("bug: A reuested task management function " |
4418 | "is not supported on the target device " | 4218 | "is not supported on the target device " |
4419 | "unit 0x%016Lx, port 0x%016Lx, adapter %s\n ", | 4219 | "unit 0x%016Lx, port 0x%016Lx, adapter %s\n ", |
@@ -4423,7 +4223,6 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req) | |||
4423 | fsf_req->status |= ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP; | 4223 | fsf_req->status |= ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP; |
4424 | break; | 4224 | break; |
4425 | case RSP_CODE_TASKMAN_FAILED: | 4225 | case RSP_CODE_TASKMAN_FAILED: |
4426 | ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_FAILED\n"); | ||
4427 | ZFCP_LOG_NORMAL("bug: A reuested task management function " | 4226 | ZFCP_LOG_NORMAL("bug: A reuested task management function " |
4428 | "failed to complete successfully. " | 4227 | "failed to complete successfully. " |
4429 | "unit 0x%016Lx, port 0x%016Lx, adapter %s.\n", | 4228 | "unit 0x%016Lx, port 0x%016Lx, adapter %s.\n", |
@@ -4610,7 +4409,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4610 | switch (header->fsf_status) { | 4409 | switch (header->fsf_status) { |
4611 | 4410 | ||
4612 | case FSF_GOOD: | 4411 | case FSF_GOOD: |
4613 | ZFCP_LOG_FLAGS(2, "FSF_GOOD\n"); | ||
4614 | ZFCP_LOG_NORMAL( | 4412 | ZFCP_LOG_NORMAL( |
4615 | "The FSF request has been successfully completed " | 4413 | "The FSF request has been successfully completed " |
4616 | "on the adapter %s\n", | 4414 | "on the adapter %s\n", |
@@ -4618,7 +4416,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4618 | break; | 4416 | break; |
4619 | 4417 | ||
4620 | case FSF_OPERATION_PARTIALLY_SUCCESSFUL: | 4418 | case FSF_OPERATION_PARTIALLY_SUCCESSFUL: |
4621 | ZFCP_LOG_FLAGS(2, "FSF_OPERATION_PARTIALLY_SUCCESSFUL\n"); | ||
4622 | if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) { | 4419 | if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) { |
4623 | switch (header->fsf_status_qual.word[0]) { | 4420 | switch (header->fsf_status_qual.word[0]) { |
4624 | 4421 | ||
@@ -4655,7 +4452,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4655 | break; | 4452 | break; |
4656 | 4453 | ||
4657 | case FSF_AUTHORIZATION_FAILURE: | 4454 | case FSF_AUTHORIZATION_FAILURE: |
4658 | ZFCP_LOG_FLAGS(2, "FSF_AUTHORIZATION_FAILURE\n"); | ||
4659 | ZFCP_LOG_NORMAL( | 4455 | ZFCP_LOG_NORMAL( |
4660 | "Adapter %s does not accept privileged commands\n", | 4456 | "Adapter %s does not accept privileged commands\n", |
4661 | zfcp_get_busid_by_adapter(adapter)); | 4457 | zfcp_get_busid_by_adapter(adapter)); |
@@ -4664,7 +4460,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4664 | break; | 4460 | break; |
4665 | 4461 | ||
4666 | case FSF_CFDC_ERROR_DETECTED: | 4462 | case FSF_CFDC_ERROR_DETECTED: |
4667 | ZFCP_LOG_FLAGS(2, "FSF_CFDC_ERROR_DETECTED\n"); | ||
4668 | ZFCP_LOG_NORMAL( | 4463 | ZFCP_LOG_NORMAL( |
4669 | "Error at position %d in the CFDC, " | 4464 | "Error at position %d in the CFDC, " |
4670 | "CFDC is discarded by the adapter %s\n", | 4465 | "CFDC is discarded by the adapter %s\n", |
@@ -4675,7 +4470,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4675 | break; | 4470 | break; |
4676 | 4471 | ||
4677 | case FSF_CONTROL_FILE_UPDATE_ERROR: | 4472 | case FSF_CONTROL_FILE_UPDATE_ERROR: |
4678 | ZFCP_LOG_FLAGS(2, "FSF_CONTROL_FILE_UPDATE_ERROR\n"); | ||
4679 | ZFCP_LOG_NORMAL( | 4473 | ZFCP_LOG_NORMAL( |
4680 | "Adapter %s cannot harden the control file, " | 4474 | "Adapter %s cannot harden the control file, " |
4681 | "file is discarded\n", | 4475 | "file is discarded\n", |
@@ -4685,7 +4479,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4685 | break; | 4479 | break; |
4686 | 4480 | ||
4687 | case FSF_CONTROL_FILE_TOO_LARGE: | 4481 | case FSF_CONTROL_FILE_TOO_LARGE: |
4688 | ZFCP_LOG_FLAGS(2, "FSF_CONTROL_FILE_TOO_LARGE\n"); | ||
4689 | ZFCP_LOG_NORMAL( | 4482 | ZFCP_LOG_NORMAL( |
4690 | "Control file is too large, file is discarded " | 4483 | "Control file is too large, file is discarded " |
4691 | "by the adapter %s\n", | 4484 | "by the adapter %s\n", |
@@ -4695,7 +4488,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4695 | break; | 4488 | break; |
4696 | 4489 | ||
4697 | case FSF_ACCESS_CONFLICT_DETECTED: | 4490 | case FSF_ACCESS_CONFLICT_DETECTED: |
4698 | ZFCP_LOG_FLAGS(2, "FSF_ACCESS_CONFLICT_DETECTED\n"); | ||
4699 | if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) | 4491 | if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) |
4700 | ZFCP_LOG_NORMAL( | 4492 | ZFCP_LOG_NORMAL( |
4701 | "CFDC has been discarded by the adapter %s, " | 4493 | "CFDC has been discarded by the adapter %s, " |
@@ -4708,7 +4500,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4708 | break; | 4500 | break; |
4709 | 4501 | ||
4710 | case FSF_CONFLICTS_OVERRULED: | 4502 | case FSF_CONFLICTS_OVERRULED: |
4711 | ZFCP_LOG_FLAGS(2, "FSF_CONFLICTS_OVERRULED\n"); | ||
4712 | if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) | 4503 | if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) |
4713 | ZFCP_LOG_NORMAL( | 4504 | ZFCP_LOG_NORMAL( |
4714 | "CFDC has been activated on the adapter %s, " | 4505 | "CFDC has been activated on the adapter %s, " |
@@ -4721,7 +4512,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4721 | break; | 4512 | break; |
4722 | 4513 | ||
4723 | case FSF_UNKNOWN_OP_SUBTYPE: | 4514 | case FSF_UNKNOWN_OP_SUBTYPE: |
4724 | ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_OP_SUBTYPE\n"); | ||
4725 | ZFCP_LOG_NORMAL("unknown operation subtype (adapter: %s, " | 4515 | ZFCP_LOG_NORMAL("unknown operation subtype (adapter: %s, " |
4726 | "op_subtype=0x%x)\n", | 4516 | "op_subtype=0x%x)\n", |
4727 | zfcp_get_busid_by_adapter(adapter), | 4517 | zfcp_get_busid_by_adapter(adapter), |
@@ -4731,7 +4521,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req) | |||
4731 | break; | 4521 | break; |
4732 | 4522 | ||
4733 | case FSF_INVALID_COMMAND_OPTION: | 4523 | case FSF_INVALID_COMMAND_OPTION: |
4734 | ZFCP_LOG_FLAGS(2, "FSF_INVALID_COMMAND_OPTION\n"); | ||
4735 | ZFCP_LOG_NORMAL( | 4524 | ZFCP_LOG_NORMAL( |
4736 | "Invalid option 0x%x has been specified " | 4525 | "Invalid option 0x%x has been specified " |
4737 | "in QTCB bottom sent to the adapter %s\n", | 4526 | "in QTCB bottom sent to the adapter %s\n", |
@@ -4800,7 +4589,7 @@ zfcp_fsf_req_wait_and_cleanup(struct zfcp_fsf_req *fsf_req, | |||
4800 | *status = fsf_req->status; | 4589 | *status = fsf_req->status; |
4801 | 4590 | ||
4802 | /* cleanup request */ | 4591 | /* cleanup request */ |
4803 | zfcp_fsf_req_cleanup(fsf_req); | 4592 | zfcp_fsf_req_free(fsf_req); |
4804 | out: | 4593 | out: |
4805 | return retval; | 4594 | return retval; |
4806 | } | 4595 | } |
@@ -4999,9 +4788,9 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) | |||
4999 | inc_seq_no = 0; | 4788 | inc_seq_no = 0; |
5000 | 4789 | ||
5001 | /* put allocated FSF request at list tail */ | 4790 | /* put allocated FSF request at list tail */ |
5002 | write_lock_irqsave(&adapter->fsf_req_list_lock, flags); | 4791 | spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); |
5003 | list_add_tail(&fsf_req->list, &adapter->fsf_req_list_head); | 4792 | list_add_tail(&fsf_req->list, &adapter->fsf_req_list_head); |
5004 | write_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); | 4793 | spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); |
5005 | 4794 | ||
5006 | /* figure out expiration time of timeout and start timeout */ | 4795 | /* figure out expiration time of timeout and start timeout */ |
5007 | if (unlikely(timer)) { | 4796 | if (unlikely(timer)) { |
@@ -5045,9 +4834,9 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) | |||
5045 | */ | 4834 | */ |
5046 | if (timer) | 4835 | if (timer) |
5047 | del_timer(timer); | 4836 | del_timer(timer); |
5048 | write_lock_irqsave(&adapter->fsf_req_list_lock, flags); | 4837 | spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); |
5049 | list_del(&fsf_req->list); | 4838 | list_del(&fsf_req->list); |
5050 | write_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); | 4839 | spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); |
5051 | /* | 4840 | /* |
5052 | * adjust the number of free SBALs in request queue as well as | 4841 | * adjust the number of free SBALs in request queue as well as |
5053 | * position of first one | 4842 | * position of first one |
@@ -5085,25 +4874,4 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) | |||
5085 | return retval; | 4874 | return retval; |
5086 | } | 4875 | } |
5087 | 4876 | ||
5088 | /* | ||
5089 | * function: zfcp_fsf_req_cleanup | ||
5090 | * | ||
5091 | * purpose: cleans up an FSF request and removes it from the specified list | ||
5092 | * | ||
5093 | * returns: | ||
5094 | * | ||
5095 | * assumption: no pending SB in SBALEs other than QTCB | ||
5096 | */ | ||
5097 | void | ||
5098 | zfcp_fsf_req_cleanup(struct zfcp_fsf_req *fsf_req) | ||
5099 | { | ||
5100 | struct zfcp_adapter *adapter = fsf_req->adapter; | ||
5101 | unsigned long flags; | ||
5102 | |||
5103 | write_lock_irqsave(&adapter->fsf_req_list_lock, flags); | ||
5104 | list_del(&fsf_req->list); | ||
5105 | write_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); | ||
5106 | zfcp_fsf_req_free(fsf_req); | ||
5107 | } | ||
5108 | |||
5109 | #undef ZFCP_LOG_AREA | 4877 | #undef ZFCP_LOG_AREA |
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index 06e862d7bc90..24e16ec331d9 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
@@ -229,52 +229,14 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, | |||
229 | ZFCP_LOG_TRACE("status is" | 229 | ZFCP_LOG_TRACE("status is" |
230 | " QDIO_STATUS_OUTBOUND_INT \n"); | 230 | " QDIO_STATUS_OUTBOUND_INT \n"); |
231 | } | 231 | } |
232 | } // if (ZFCP_LOG_CHECK(ZFCP_LOG_LEVEL_TRACE)) | 232 | } |
233 | if (unlikely(status & QDIO_STATUS_LOOK_FOR_ERROR)) { | 233 | if (unlikely(status & QDIO_STATUS_LOOK_FOR_ERROR)) { |
234 | retval = -EIO; | 234 | retval = -EIO; |
235 | 235 | ||
236 | ZFCP_LOG_FLAGS(1, "QDIO_STATUS_LOOK_FOR_ERROR \n"); | ||
237 | |||
238 | ZFCP_LOG_INFO("QDIO problem occurred (status=0x%x, " | 236 | ZFCP_LOG_INFO("QDIO problem occurred (status=0x%x, " |
239 | "qdio_error=0x%x, siga_error=0x%x)\n", | 237 | "qdio_error=0x%x, siga_error=0x%x)\n", |
240 | status, qdio_error, siga_error); | 238 | status, qdio_error, siga_error); |
241 | 239 | ||
242 | if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { | ||
243 | ZFCP_LOG_FLAGS(2, | ||
244 | "QDIO_STATUS_ACTIVATE_CHECK_CONDITION\n"); | ||
245 | } | ||
246 | if (status & QDIO_STATUS_MORE_THAN_ONE_QDIO_ERROR) { | ||
247 | ZFCP_LOG_FLAGS(2, | ||
248 | "QDIO_STATUS_MORE_THAN_ONE_QDIO_ERROR\n"); | ||
249 | } | ||
250 | if (status & QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR) { | ||
251 | ZFCP_LOG_FLAGS(2, | ||
252 | "QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR\n"); | ||
253 | } | ||
254 | |||
255 | if (siga_error & QDIO_SIGA_ERROR_ACCESS_EXCEPTION) { | ||
256 | ZFCP_LOG_FLAGS(2, "QDIO_SIGA_ERROR_ACCESS_EXCEPTION\n"); | ||
257 | } | ||
258 | |||
259 | if (siga_error & QDIO_SIGA_ERROR_B_BIT_SET) { | ||
260 | ZFCP_LOG_FLAGS(2, "QDIO_SIGA_ERROR_B_BIT_SET\n"); | ||
261 | } | ||
262 | |||
263 | switch (qdio_error) { | ||
264 | case 0: | ||
265 | ZFCP_LOG_FLAGS(3, "QDIO_OK"); | ||
266 | break; | ||
267 | case SLSB_P_INPUT_ERROR: | ||
268 | ZFCP_LOG_FLAGS(1, "SLSB_P_INPUT_ERROR\n"); | ||
269 | break; | ||
270 | case SLSB_P_OUTPUT_ERROR: | ||
271 | ZFCP_LOG_FLAGS(1, "SLSB_P_OUTPUT_ERROR\n"); | ||
272 | break; | ||
273 | default: | ||
274 | ZFCP_LOG_NORMAL("bug: unknown QDIO error 0x%x\n", | ||
275 | qdio_error); | ||
276 | break; | ||
277 | } | ||
278 | /* Restarting IO on the failed adapter from scratch */ | 240 | /* Restarting IO on the failed adapter from scratch */ |
279 | debug_text_event(adapter->erp_dbf, 1, "qdio_err"); | 241 | debug_text_event(adapter->erp_dbf, 1, "qdio_err"); |
280 | /* | 242 | /* |
@@ -484,37 +446,37 @@ int | |||
484 | zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr) | 446 | zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr) |
485 | { | 447 | { |
486 | struct zfcp_fsf_req *fsf_req; | 448 | struct zfcp_fsf_req *fsf_req; |
487 | int retval = 0; | ||
488 | 449 | ||
489 | /* invalid (per convention used in this driver) */ | 450 | /* invalid (per convention used in this driver) */ |
490 | if (unlikely(!sbale_addr)) { | 451 | if (unlikely(!sbale_addr)) { |
491 | ZFCP_LOG_NORMAL("bug: invalid reqid\n"); | 452 | ZFCP_LOG_NORMAL("bug: invalid reqid\n"); |
492 | retval = -EINVAL; | 453 | return -EINVAL; |
493 | goto out; | ||
494 | } | 454 | } |
495 | 455 | ||
496 | /* valid request id and thus (hopefully :) valid fsf_req address */ | 456 | /* valid request id and thus (hopefully :) valid fsf_req address */ |
497 | fsf_req = (struct zfcp_fsf_req *) sbale_addr; | 457 | fsf_req = (struct zfcp_fsf_req *) sbale_addr; |
498 | 458 | ||
459 | /* serialize with zfcp_fsf_req_dismiss_all */ | ||
460 | spin_lock(&adapter->fsf_req_list_lock); | ||
461 | if (list_empty(&adapter->fsf_req_list_head)) { | ||
462 | spin_unlock(&adapter->fsf_req_list_lock); | ||
463 | return 0; | ||
464 | } | ||
465 | list_del(&fsf_req->list); | ||
466 | atomic_dec(&adapter->fsf_reqs_active); | ||
467 | spin_unlock(&adapter->fsf_req_list_lock); | ||
468 | |||
499 | if (unlikely(adapter != fsf_req->adapter)) { | 469 | if (unlikely(adapter != fsf_req->adapter)) { |
500 | ZFCP_LOG_NORMAL("bug: invalid reqid (fsf_req=%p, " | 470 | ZFCP_LOG_NORMAL("bug: invalid reqid (fsf_req=%p, " |
501 | "fsf_req->adapter=%p, adapter=%p)\n", | 471 | "fsf_req->adapter=%p, adapter=%p)\n", |
502 | fsf_req, fsf_req->adapter, adapter); | 472 | fsf_req, fsf_req->adapter, adapter); |
503 | retval = -EINVAL; | 473 | return -EINVAL; |
504 | goto out; | ||
505 | } | ||
506 | |||
507 | ZFCP_LOG_TRACE("fsf_req at %p, QTCB at %p\n", fsf_req, fsf_req->qtcb); | ||
508 | if (likely(fsf_req->qtcb)) { | ||
509 | ZFCP_LOG_TRACE("hex dump of QTCB:\n"); | ||
510 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE, (char *) fsf_req->qtcb, | ||
511 | sizeof(struct fsf_qtcb)); | ||
512 | } | 474 | } |
513 | 475 | ||
514 | /* finish the FSF request */ | 476 | /* finish the FSF request */ |
515 | zfcp_fsf_req_complete(fsf_req); | 477 | zfcp_fsf_req_complete(fsf_req); |
516 | out: | 478 | |
517 | return retval; | 479 | return 0; |
518 | } | 480 | } |
519 | 481 | ||
520 | /** | 482 | /** |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index e21b547fd427..b61d309352c3 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -433,7 +433,7 @@ zfcp_port_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id) | |||
433 | * FAILED - otherwise | 433 | * FAILED - otherwise |
434 | */ | 434 | */ |
435 | int | 435 | int |
436 | zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | 436 | __zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) |
437 | { | 437 | { |
438 | int retval = SUCCESS; | 438 | int retval = SUCCESS; |
439 | struct zfcp_fsf_req *new_fsf_req, *old_fsf_req; | 439 | struct zfcp_fsf_req *new_fsf_req, *old_fsf_req; |
@@ -575,7 +575,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
575 | *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[0]; | 575 | *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[0]; |
576 | dbf_fsf_qual[1] = | 576 | dbf_fsf_qual[1] = |
577 | *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[2]; | 577 | *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[2]; |
578 | zfcp_fsf_req_cleanup(new_fsf_req); | 578 | zfcp_fsf_req_free(new_fsf_req); |
579 | #else | 579 | #else |
580 | retval = zfcp_fsf_req_wait_and_cleanup(new_fsf_req, | 580 | retval = zfcp_fsf_req_wait_and_cleanup(new_fsf_req, |
581 | ZFCP_UNINTERRUPTIBLE, &status); | 581 | ZFCP_UNINTERRUPTIBLE, &status); |
@@ -611,6 +611,17 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
611 | return retval; | 611 | return retval; |
612 | } | 612 | } |
613 | 613 | ||
614 | int | ||
615 | zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | ||
616 | { | ||
617 | int rc; | ||
618 | struct Scsi_Host *scsi_host = scpnt->device->host; | ||
619 | spin_lock_irq(scsi_host->host_lock); | ||
620 | rc = __zfcp_scsi_eh_abort_handler(scpnt); | ||
621 | spin_unlock_irq(scsi_host->host_lock); | ||
622 | return rc; | ||
623 | } | ||
624 | |||
614 | /* | 625 | /* |
615 | * function: zfcp_scsi_eh_device_reset_handler | 626 | * function: zfcp_scsi_eh_device_reset_handler |
616 | * | 627 | * |
@@ -625,8 +636,6 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) | |||
625 | struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata; | 636 | struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata; |
626 | struct Scsi_Host *scsi_host = scpnt->device->host; | 637 | struct Scsi_Host *scsi_host = scpnt->device->host; |
627 | 638 | ||
628 | spin_unlock_irq(scsi_host->host_lock); | ||
629 | |||
630 | if (!unit) { | 639 | if (!unit) { |
631 | ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n"); | 640 | ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n"); |
632 | retval = SUCCESS; | 641 | retval = SUCCESS; |
@@ -669,7 +678,6 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) | |||
669 | retval = SUCCESS; | 678 | retval = SUCCESS; |
670 | } | 679 | } |
671 | out: | 680 | out: |
672 | spin_lock_irq(scsi_host->host_lock); | ||
673 | return retval; | 681 | return retval; |
674 | } | 682 | } |
675 | 683 | ||
@@ -723,8 +731,6 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt) | |||
723 | struct zfcp_unit *unit; | 731 | struct zfcp_unit *unit; |
724 | struct Scsi_Host *scsi_host = scpnt->device->host; | 732 | struct Scsi_Host *scsi_host = scpnt->device->host; |
725 | 733 | ||
726 | spin_unlock_irq(scsi_host->host_lock); | ||
727 | |||
728 | unit = (struct zfcp_unit *) scpnt->device->hostdata; | 734 | unit = (struct zfcp_unit *) scpnt->device->hostdata; |
729 | ZFCP_LOG_NORMAL("bus reset because of problems with " | 735 | ZFCP_LOG_NORMAL("bus reset because of problems with " |
730 | "unit 0x%016Lx\n", unit->fcp_lun); | 736 | "unit 0x%016Lx\n", unit->fcp_lun); |
@@ -732,7 +738,6 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt) | |||
732 | zfcp_erp_wait(unit->port->adapter); | 738 | zfcp_erp_wait(unit->port->adapter); |
733 | retval = SUCCESS; | 739 | retval = SUCCESS; |
734 | 740 | ||
735 | spin_lock_irq(scsi_host->host_lock); | ||
736 | return retval; | 741 | return retval; |
737 | } | 742 | } |
738 | 743 | ||
@@ -750,8 +755,6 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) | |||
750 | struct zfcp_unit *unit; | 755 | struct zfcp_unit *unit; |
751 | struct Scsi_Host *scsi_host = scpnt->device->host; | 756 | struct Scsi_Host *scsi_host = scpnt->device->host; |
752 | 757 | ||
753 | spin_unlock_irq(scsi_host->host_lock); | ||
754 | |||
755 | unit = (struct zfcp_unit *) scpnt->device->hostdata; | 758 | unit = (struct zfcp_unit *) scpnt->device->hostdata; |
756 | ZFCP_LOG_NORMAL("host reset because of problems with " | 759 | ZFCP_LOG_NORMAL("host reset because of problems with " |
757 | "unit 0x%016Lx\n", unit->fcp_lun); | 760 | "unit 0x%016Lx\n", unit->fcp_lun); |
@@ -759,7 +762,6 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) | |||
759 | zfcp_erp_wait(unit->port->adapter); | 762 | zfcp_erp_wait(unit->port->adapter); |
760 | retval = SUCCESS; | 763 | retval = SUCCESS; |
761 | 764 | ||
762 | spin_lock_irq(scsi_host->host_lock); | ||
763 | return retval; | 765 | return retval; |
764 | } | 766 | } |
765 | 767 | ||
@@ -922,7 +924,7 @@ struct fc_function_template zfcp_transport_functions = { | |||
922 | * Generates attribute for a unit. | 924 | * Generates attribute for a unit. |
923 | */ | 925 | */ |
924 | #define ZFCP_DEFINE_SCSI_ATTR(_name, _format, _value) \ | 926 | #define ZFCP_DEFINE_SCSI_ATTR(_name, _format, _value) \ |
925 | static ssize_t zfcp_sysfs_scsi_##_name##_show(struct device *dev, \ | 927 | static ssize_t zfcp_sysfs_scsi_##_name##_show(struct device *dev, struct device_attribute *attr, \ |
926 | char *buf) \ | 928 | char *buf) \ |
927 | { \ | 929 | { \ |
928 | struct scsi_device *sdev; \ | 930 | struct scsi_device *sdev; \ |
diff --git a/drivers/s390/scsi/zfcp_sysfs_adapter.c b/drivers/s390/scsi/zfcp_sysfs_adapter.c index 23e2dca55bb8..e7345a74800a 100644 --- a/drivers/s390/scsi/zfcp_sysfs_adapter.c +++ b/drivers/s390/scsi/zfcp_sysfs_adapter.c | |||
@@ -50,7 +50,7 @@ static const char fc_topologies[5][25] = { | |||
50 | * Generates attributes for an adapter. | 50 | * Generates attributes for an adapter. |
51 | */ | 51 | */ |
52 | #define ZFCP_DEFINE_ADAPTER_ATTR(_name, _format, _value) \ | 52 | #define ZFCP_DEFINE_ADAPTER_ATTR(_name, _format, _value) \ |
53 | static ssize_t zfcp_sysfs_adapter_##_name##_show(struct device *dev, \ | 53 | static ssize_t zfcp_sysfs_adapter_##_name##_show(struct device *dev, struct device_attribute *attr, \ |
54 | char *buf) \ | 54 | char *buf) \ |
55 | { \ | 55 | { \ |
56 | struct zfcp_adapter *adapter; \ | 56 | struct zfcp_adapter *adapter; \ |
@@ -90,7 +90,7 @@ ZFCP_DEFINE_ADAPTER_ATTR(in_recovery, "%d\n", atomic_test_mask | |||
90 | * Store function of the "port_add" attribute of an adapter. | 90 | * Store function of the "port_add" attribute of an adapter. |
91 | */ | 91 | */ |
92 | static ssize_t | 92 | static ssize_t |
93 | zfcp_sysfs_port_add_store(struct device *dev, const char *buf, size_t count) | 93 | zfcp_sysfs_port_add_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
94 | { | 94 | { |
95 | wwn_t wwpn; | 95 | wwn_t wwpn; |
96 | char *endp; | 96 | char *endp; |
@@ -135,7 +135,7 @@ static DEVICE_ATTR(port_add, S_IWUSR, NULL, zfcp_sysfs_port_add_store); | |||
135 | * Store function of the "port_remove" attribute of an adapter. | 135 | * Store function of the "port_remove" attribute of an adapter. |
136 | */ | 136 | */ |
137 | static ssize_t | 137 | static ssize_t |
138 | zfcp_sysfs_port_remove_store(struct device *dev, const char *buf, size_t count) | 138 | zfcp_sysfs_port_remove_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
139 | { | 139 | { |
140 | struct zfcp_adapter *adapter; | 140 | struct zfcp_adapter *adapter; |
141 | struct zfcp_port *port; | 141 | struct zfcp_port *port; |
@@ -196,7 +196,7 @@ static DEVICE_ATTR(port_remove, S_IWUSR, NULL, zfcp_sysfs_port_remove_store); | |||
196 | * started for the belonging adapter. | 196 | * started for the belonging adapter. |
197 | */ | 197 | */ |
198 | static ssize_t | 198 | static ssize_t |
199 | zfcp_sysfs_adapter_failed_store(struct device *dev, | 199 | zfcp_sysfs_adapter_failed_store(struct device *dev, struct device_attribute *attr, |
200 | const char *buf, size_t count) | 200 | const char *buf, size_t count) |
201 | { | 201 | { |
202 | struct zfcp_adapter *adapter; | 202 | struct zfcp_adapter *adapter; |
@@ -236,7 +236,7 @@ zfcp_sysfs_adapter_failed_store(struct device *dev, | |||
236 | * "0" if adapter is working, otherwise "1". | 236 | * "0" if adapter is working, otherwise "1". |
237 | */ | 237 | */ |
238 | static ssize_t | 238 | static ssize_t |
239 | zfcp_sysfs_adapter_failed_show(struct device *dev, char *buf) | 239 | zfcp_sysfs_adapter_failed_show(struct device *dev, struct device_attribute *attr, char *buf) |
240 | { | 240 | { |
241 | struct zfcp_adapter *adapter; | 241 | struct zfcp_adapter *adapter; |
242 | 242 | ||
diff --git a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c index 6aafb2abb4b5..7a84c7d474d9 100644 --- a/drivers/s390/scsi/zfcp_sysfs_port.c +++ b/drivers/s390/scsi/zfcp_sysfs_port.c | |||
@@ -53,7 +53,7 @@ zfcp_sysfs_port_release(struct device *dev) | |||
53 | * Generates attributes for a port. | 53 | * Generates attributes for a port. |
54 | */ | 54 | */ |
55 | #define ZFCP_DEFINE_PORT_ATTR(_name, _format, _value) \ | 55 | #define ZFCP_DEFINE_PORT_ATTR(_name, _format, _value) \ |
56 | static ssize_t zfcp_sysfs_port_##_name##_show(struct device *dev, \ | 56 | static ssize_t zfcp_sysfs_port_##_name##_show(struct device *dev, struct device_attribute *attr, \ |
57 | char *buf) \ | 57 | char *buf) \ |
58 | { \ | 58 | { \ |
59 | struct zfcp_port *port; \ | 59 | struct zfcp_port *port; \ |
@@ -82,7 +82,7 @@ ZFCP_DEFINE_PORT_ATTR(access_denied, "%d\n", atomic_test_mask | |||
82 | * Store function of the "unit_add" attribute of a port. | 82 | * Store function of the "unit_add" attribute of a port. |
83 | */ | 83 | */ |
84 | static ssize_t | 84 | static ssize_t |
85 | zfcp_sysfs_unit_add_store(struct device *dev, const char *buf, size_t count) | 85 | zfcp_sysfs_unit_add_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
86 | { | 86 | { |
87 | fcp_lun_t fcp_lun; | 87 | fcp_lun_t fcp_lun; |
88 | char *endp; | 88 | char *endp; |
@@ -125,7 +125,7 @@ static DEVICE_ATTR(unit_add, S_IWUSR, NULL, zfcp_sysfs_unit_add_store); | |||
125 | * @count: number of bytes in buffer | 125 | * @count: number of bytes in buffer |
126 | */ | 126 | */ |
127 | static ssize_t | 127 | static ssize_t |
128 | zfcp_sysfs_unit_remove_store(struct device *dev, const char *buf, size_t count) | 128 | zfcp_sysfs_unit_remove_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
129 | { | 129 | { |
130 | struct zfcp_port *port; | 130 | struct zfcp_port *port; |
131 | struct zfcp_unit *unit; | 131 | struct zfcp_unit *unit; |
@@ -186,7 +186,7 @@ static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store); | |||
186 | * started for the belonging port. | 186 | * started for the belonging port. |
187 | */ | 187 | */ |
188 | static ssize_t | 188 | static ssize_t |
189 | zfcp_sysfs_port_failed_store(struct device *dev, const char *buf, size_t count) | 189 | zfcp_sysfs_port_failed_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
190 | { | 190 | { |
191 | struct zfcp_port *port; | 191 | struct zfcp_port *port; |
192 | unsigned int val; | 192 | unsigned int val; |
@@ -224,7 +224,7 @@ zfcp_sysfs_port_failed_store(struct device *dev, const char *buf, size_t count) | |||
224 | * "0" if port is working, otherwise "1". | 224 | * "0" if port is working, otherwise "1". |
225 | */ | 225 | */ |
226 | static ssize_t | 226 | static ssize_t |
227 | zfcp_sysfs_port_failed_show(struct device *dev, char *buf) | 227 | zfcp_sysfs_port_failed_show(struct device *dev, struct device_attribute *attr, char *buf) |
228 | { | 228 | { |
229 | struct zfcp_port *port; | 229 | struct zfcp_port *port; |
230 | 230 | ||
diff --git a/drivers/s390/scsi/zfcp_sysfs_unit.c b/drivers/s390/scsi/zfcp_sysfs_unit.c index 87c0b461831f..0556642c9e1d 100644 --- a/drivers/s390/scsi/zfcp_sysfs_unit.c +++ b/drivers/s390/scsi/zfcp_sysfs_unit.c | |||
@@ -53,7 +53,7 @@ zfcp_sysfs_unit_release(struct device *dev) | |||
53 | * Generates attribute for a unit. | 53 | * Generates attribute for a unit. |
54 | */ | 54 | */ |
55 | #define ZFCP_DEFINE_UNIT_ATTR(_name, _format, _value) \ | 55 | #define ZFCP_DEFINE_UNIT_ATTR(_name, _format, _value) \ |
56 | static ssize_t zfcp_sysfs_unit_##_name##_show(struct device *dev, \ | 56 | static ssize_t zfcp_sysfs_unit_##_name##_show(struct device *dev, struct device_attribute *attr, \ |
57 | char *buf) \ | 57 | char *buf) \ |
58 | { \ | 58 | { \ |
59 | struct zfcp_unit *unit; \ | 59 | struct zfcp_unit *unit; \ |
@@ -86,7 +86,7 @@ ZFCP_DEFINE_UNIT_ATTR(access_readonly, "%d\n", atomic_test_mask | |||
86 | * started for the belonging unit. | 86 | * started for the belonging unit. |
87 | */ | 87 | */ |
88 | static ssize_t | 88 | static ssize_t |
89 | zfcp_sysfs_unit_failed_store(struct device *dev, const char *buf, size_t count) | 89 | zfcp_sysfs_unit_failed_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
90 | { | 90 | { |
91 | struct zfcp_unit *unit; | 91 | struct zfcp_unit *unit; |
92 | unsigned int val; | 92 | unsigned int val; |
@@ -123,7 +123,7 @@ zfcp_sysfs_unit_failed_store(struct device *dev, const char *buf, size_t count) | |||
123 | * "0" if unit is working, otherwise "1". | 123 | * "0" if unit is working, otherwise "1". |
124 | */ | 124 | */ |
125 | static ssize_t | 125 | static ssize_t |
126 | zfcp_sysfs_unit_failed_show(struct device *dev, char *buf) | 126 | zfcp_sysfs_unit_failed_show(struct device *dev, struct device_attribute *attr, char *buf) |
127 | { | 127 | { |
128 | struct zfcp_unit *unit; | 128 | struct zfcp_unit *unit; |
129 | 129 | ||