diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-01-17 22:49:59 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-01-17 22:49:59 -0500 |
| commit | d65177c1ae7f085723154105c5dc8d9e16ae8265 (patch) | |
| tree | 14408129d880d89cc5e937f2810f243ed1e6fcde /drivers/s390 | |
| parent | d41f084a74de860fe879403fbbad13abdf7aea8e (diff) | |
| parent | 15578eeb6cd4b74492f26e60624aa1a9a52ddd7b (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'drivers/s390')
28 files changed, 321 insertions, 174 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 9c25654b1e75..ef4c687e7c01 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
| @@ -1635,7 +1635,7 @@ dasd_setup_queue(struct dasd_device * device) | |||
| 1635 | blk_queue_max_hw_segments(device->request_queue, -1L); | 1635 | blk_queue_max_hw_segments(device->request_queue, -1L); |
| 1636 | blk_queue_max_segment_size(device->request_queue, -1L); | 1636 | blk_queue_max_segment_size(device->request_queue, -1L); |
| 1637 | blk_queue_segment_boundary(device->request_queue, -1L); | 1637 | blk_queue_segment_boundary(device->request_queue, -1L); |
| 1638 | blk_queue_ordered(device->request_queue, 1); | 1638 | blk_queue_ordered(device->request_queue, QUEUE_ORDERED_TAG, NULL); |
| 1639 | } | 1639 | } |
| 1640 | 1640 | ||
| 1641 | /* | 1641 | /* |
diff --git a/drivers/s390/cio/airq.c b/drivers/s390/cio/airq.c index 83e6a060668e..cd2cc28e16a7 100644 --- a/drivers/s390/cio/airq.c +++ b/drivers/s390/cio/airq.c | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | * drivers/s390/cio/airq.c | 2 | * drivers/s390/cio/airq.c |
| 3 | * S/390 common I/O routines -- support for adapter interruptions | 3 | * S/390 common I/O routines -- support for adapter interruptions |
| 4 | * | 4 | * |
| 5 | * $Revision: 1.12 $ | 5 | * $Revision: 1.15 $ |
| 6 | * | 6 | * |
| 7 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, | 7 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, |
| 8 | * IBM Corporation | 8 | * IBM Corporation |
| 9 | * Author(s): Ingo Adlung (adlung@de.ibm.com) | 9 | * Author(s): Ingo Adlung (adlung@de.ibm.com) |
| 10 | * Cornelia Huck (cohuck@de.ibm.com) | 10 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 11 | * Arnd Bergmann (arndb@de.ibm.com) | 11 | * Arnd Bergmann (arndb@de.ibm.com) |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index daf21e03b21d..72f27c151c09 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
| @@ -1,12 +1,12 @@ | |||
| 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.39 $ | 4 | * $Revision: 1.42 $ |
| 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 |
| 8 | * Author(s): Ingo Adlung (adlung@de.ibm.com) | 8 | * Author(s): Ingo Adlung (adlung@de.ibm.com) |
| 9 | * Cornelia Huck (cohuck@de.ibm.com) | 9 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 10 | * Arnd Bergmann (arndb@de.ibm.com) | 10 | * Arnd Bergmann (arndb@de.ibm.com) |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index e849289d4f3c..6c077ad71edc 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/s390/cio/ccwgroup.c | 2 | * drivers/s390/cio/ccwgroup.c |
| 3 | * bus driver for ccwgroup | 3 | * bus driver for ccwgroup |
| 4 | * $Revision: 1.33 $ | 4 | * $Revision: 1.35 $ |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 7 | * IBM Corporation | 7 | * IBM Corporation |
| 8 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) | 8 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) |
| 9 | * Cornelia Huck (cohuck@de.ibm.com) | 9 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 10 | */ | 10 | */ |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
| @@ -52,11 +52,7 @@ ccwgroup_uevent (struct device *dev, char **envp, int num_envp, char *buffer, | |||
| 52 | return 0; | 52 | return 0; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static struct bus_type ccwgroup_bus_type = { | 55 | static struct bus_type ccwgroup_bus_type; |
| 56 | .name = "ccwgroup", | ||
| 57 | .match = ccwgroup_bus_match, | ||
| 58 | .uevent = ccwgroup_uevent, | ||
| 59 | }; | ||
| 60 | 56 | ||
| 61 | static inline void | 57 | static inline void |
| 62 | __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev) | 58 | __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev) |
| @@ -389,6 +385,14 @@ ccwgroup_remove (struct device *dev) | |||
| 389 | return 0; | 385 | return 0; |
| 390 | } | 386 | } |
| 391 | 387 | ||
| 388 | static struct bus_type ccwgroup_bus_type = { | ||
| 389 | .name = "ccwgroup", | ||
| 390 | .match = ccwgroup_bus_match, | ||
| 391 | .uevent = ccwgroup_uevent, | ||
| 392 | .probe = ccwgroup_probe, | ||
| 393 | .remove = ccwgroup_remove, | ||
| 394 | }; | ||
| 395 | |||
| 392 | int | 396 | int |
| 393 | ccwgroup_driver_register (struct ccwgroup_driver *cdriver) | 397 | ccwgroup_driver_register (struct ccwgroup_driver *cdriver) |
| 394 | { | 398 | { |
| @@ -396,8 +400,6 @@ ccwgroup_driver_register (struct ccwgroup_driver *cdriver) | |||
| 396 | cdriver->driver = (struct device_driver) { | 400 | cdriver->driver = (struct device_driver) { |
| 397 | .bus = &ccwgroup_bus_type, | 401 | .bus = &ccwgroup_bus_type, |
| 398 | .name = cdriver->name, | 402 | .name = cdriver->name, |
| 399 | .probe = ccwgroup_probe, | ||
| 400 | .remove = ccwgroup_remove, | ||
| 401 | }; | 403 | }; |
| 402 | 404 | ||
| 403 | return driver_register(&cdriver->driver); | 405 | return driver_register(&cdriver->driver); |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 7270808c02d1..2cbb724791a8 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/s390/cio/chsc.c | 2 | * drivers/s390/cio/chsc.c |
| 3 | * S/390 common I/O routines -- channel subsystem call | 3 | * S/390 common I/O routines -- channel subsystem call |
| 4 | * $Revision: 1.126 $ | 4 | * $Revision: 1.128 $ |
| 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 |
| 8 | * Author(s): Ingo Adlung (adlung@de.ibm.com) | 8 | * Author(s): Ingo Adlung (adlung@de.ibm.com) |
| 9 | * Cornelia Huck (cohuck@de.ibm.com) | 9 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 10 | * Arnd Bergmann (arndb@de.ibm.com) | 10 | * Arnd Bergmann (arndb@de.ibm.com) |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 7376bc87206d..6223b06d27d5 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/s390/cio/cio.c | 2 | * drivers/s390/cio/cio.c |
| 3 | * S/390 common I/O routines -- low level i/o calls | 3 | * S/390 common I/O routines -- low level i/o calls |
| 4 | * $Revision: 1.138 $ | 4 | * $Revision: 1.140 $ |
| 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 |
| 8 | * Author(s): Ingo Adlung (adlung@de.ibm.com) | 8 | * Author(s): Ingo Adlung (adlung@de.ibm.com) |
| 9 | * Cornelia Huck (cohuck@de.ibm.com) | 9 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 10 | * Arnd Bergmann (arndb@de.ibm.com) | 10 | * Arnd Bergmann (arndb@de.ibm.com) |
| 11 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 11 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 12 | */ | 12 | */ |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index e565193650c7..516108779f60 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/s390/cio/css.c | 2 | * drivers/s390/cio/css.c |
| 3 | * driver for channel subsystem | 3 | * driver for channel subsystem |
| 4 | * $Revision: 1.93 $ | 4 | * $Revision: 1.96 $ |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 7 | * IBM Corporation | 7 | * IBM Corporation |
| 8 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) | 8 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) |
| 9 | * Cornelia Huck (cohuck@de.ibm.com) | 9 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 10 | */ | 10 | */ |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
| @@ -542,9 +542,41 @@ css_bus_match (struct device *dev, struct device_driver *drv) | |||
| 542 | return 0; | 542 | return 0; |
| 543 | } | 543 | } |
| 544 | 544 | ||
| 545 | static int | ||
| 546 | css_probe (struct device *dev) | ||
| 547 | { | ||
| 548 | struct subchannel *sch; | ||
| 549 | |||
| 550 | sch = to_subchannel(dev); | ||
| 551 | sch->driver = container_of (dev->driver, struct css_driver, drv); | ||
| 552 | return (sch->driver->probe ? sch->driver->probe(sch) : 0); | ||
| 553 | } | ||
| 554 | |||
| 555 | static int | ||
| 556 | css_remove (struct device *dev) | ||
| 557 | { | ||
| 558 | struct subchannel *sch; | ||
| 559 | |||
| 560 | sch = to_subchannel(dev); | ||
| 561 | return (sch->driver->remove ? sch->driver->remove(sch) : 0); | ||
| 562 | } | ||
| 563 | |||
| 564 | static void | ||
| 565 | css_shutdown (struct device *dev) | ||
| 566 | { | ||
| 567 | struct subchannel *sch; | ||
| 568 | |||
| 569 | sch = to_subchannel(dev); | ||
| 570 | if (sch->driver->shutdown) | ||
| 571 | sch->driver->shutdown(sch); | ||
| 572 | } | ||
| 573 | |||
| 545 | struct bus_type css_bus_type = { | 574 | struct bus_type css_bus_type = { |
| 546 | .name = "css", | 575 | .name = "css", |
| 547 | .match = &css_bus_match, | 576 | .match = css_bus_match, |
| 577 | .probe = css_probe, | ||
| 578 | .remove = css_remove, | ||
| 579 | .shutdown = css_shutdown, | ||
| 548 | }; | 580 | }; |
| 549 | 581 | ||
| 550 | subsys_initcall(init_channel_subsystem); | 582 | subsys_initcall(init_channel_subsystem); |
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index 251ebd7a7d3a..b6375861cb37 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
| @@ -115,6 +115,7 @@ struct ccw_device_private { | |||
| 115 | * Currently, we only care about I/O subchannels (type 0), these | 115 | * Currently, we only care about I/O subchannels (type 0), these |
| 116 | * have a ccw_device connected to them. | 116 | * have a ccw_device connected to them. |
| 117 | */ | 117 | */ |
| 118 | struct subchannel; | ||
| 118 | struct css_driver { | 119 | struct css_driver { |
| 119 | unsigned int subchannel_type; | 120 | unsigned int subchannel_type; |
| 120 | struct device_driver drv; | 121 | struct device_driver drv; |
| @@ -122,6 +123,9 @@ struct css_driver { | |||
| 122 | int (*notify)(struct device *, int); | 123 | int (*notify)(struct device *, int); |
| 123 | void (*verify)(struct device *); | 124 | void (*verify)(struct device *); |
| 124 | void (*termination)(struct device *); | 125 | void (*termination)(struct device *); |
| 126 | int (*probe)(struct subchannel *); | ||
| 127 | int (*remove)(struct subchannel *); | ||
| 128 | void (*shutdown)(struct subchannel *); | ||
| 125 | }; | 129 | }; |
| 126 | 130 | ||
| 127 | /* | 131 | /* |
| @@ -143,7 +147,7 @@ extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *); | |||
| 143 | struct channel_subsystem { | 147 | struct channel_subsystem { |
| 144 | u8 cssid; | 148 | u8 cssid; |
| 145 | int valid; | 149 | int valid; |
| 146 | struct channel_path *chps[__MAX_CHPID]; | 150 | struct channel_path *chps[__MAX_CHPID + 1]; |
| 147 | struct device device; | 151 | struct device device; |
| 148 | struct pgid global_pgid; | 152 | struct pgid global_pgid; |
| 149 | }; | 153 | }; |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index fa3e4c0a2536..a67e7e60e330 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/s390/cio/device.c | 2 | * drivers/s390/cio/device.c |
| 3 | * bus driver for ccw devices | 3 | * bus driver for ccw devices |
| 4 | * $Revision: 1.137 $ | 4 | * $Revision: 1.140 $ |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 7 | * IBM Corporation | 7 | * IBM Corporation |
| 8 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) | 8 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) |
| 9 | * Cornelia Huck (cohuck@de.ibm.com) | 9 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 10 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 10 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 11 | */ | 11 | */ |
| 12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
| @@ -107,33 +107,29 @@ ccw_uevent (struct device *dev, char **envp, int num_envp, | |||
| 107 | return 0; | 107 | return 0; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | struct bus_type ccw_bus_type = { | 110 | struct bus_type ccw_bus_type; |
| 111 | .name = "ccw", | ||
| 112 | .match = &ccw_bus_match, | ||
| 113 | .uevent = &ccw_uevent, | ||
| 114 | }; | ||
| 115 | 111 | ||
| 116 | static int io_subchannel_probe (struct device *); | 112 | static int io_subchannel_probe (struct subchannel *); |
| 117 | static int io_subchannel_remove (struct device *); | 113 | static int io_subchannel_remove (struct subchannel *); |
| 118 | void io_subchannel_irq (struct device *); | 114 | void io_subchannel_irq (struct device *); |
| 119 | static int io_subchannel_notify(struct device *, int); | 115 | static int io_subchannel_notify(struct device *, int); |
| 120 | static void io_subchannel_verify(struct device *); | 116 | static void io_subchannel_verify(struct device *); |
| 121 | static void io_subchannel_ioterm(struct device *); | 117 | static void io_subchannel_ioterm(struct device *); |
| 122 | static void io_subchannel_shutdown(struct device *); | 118 | static void io_subchannel_shutdown(struct subchannel *); |
| 123 | 119 | ||
| 124 | struct css_driver io_subchannel_driver = { | 120 | struct css_driver io_subchannel_driver = { |
| 125 | .subchannel_type = SUBCHANNEL_TYPE_IO, | 121 | .subchannel_type = SUBCHANNEL_TYPE_IO, |
| 126 | .drv = { | 122 | .drv = { |
| 127 | .name = "io_subchannel", | 123 | .name = "io_subchannel", |
| 128 | .bus = &css_bus_type, | 124 | .bus = &css_bus_type, |
| 129 | .probe = &io_subchannel_probe, | ||
| 130 | .remove = &io_subchannel_remove, | ||
| 131 | .shutdown = &io_subchannel_shutdown, | ||
| 132 | }, | 125 | }, |
| 133 | .irq = io_subchannel_irq, | 126 | .irq = io_subchannel_irq, |
| 134 | .notify = io_subchannel_notify, | 127 | .notify = io_subchannel_notify, |
| 135 | .verify = io_subchannel_verify, | 128 | .verify = io_subchannel_verify, |
| 136 | .termination = io_subchannel_ioterm, | 129 | .termination = io_subchannel_ioterm, |
| 130 | .probe = io_subchannel_probe, | ||
| 131 | .remove = io_subchannel_remove, | ||
| 132 | .shutdown = io_subchannel_shutdown, | ||
| 137 | }; | 133 | }; |
| 138 | 134 | ||
| 139 | struct workqueue_struct *ccw_device_work; | 135 | struct workqueue_struct *ccw_device_work; |
| @@ -803,14 +799,12 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch) | |||
| 803 | } | 799 | } |
| 804 | 800 | ||
| 805 | static int | 801 | static int |
| 806 | io_subchannel_probe (struct device *pdev) | 802 | io_subchannel_probe (struct subchannel *sch) |
| 807 | { | 803 | { |
| 808 | struct subchannel *sch; | ||
| 809 | struct ccw_device *cdev; | 804 | struct ccw_device *cdev; |
| 810 | int rc; | 805 | int rc; |
| 811 | unsigned long flags; | 806 | unsigned long flags; |
| 812 | 807 | ||
| 813 | sch = to_subchannel(pdev); | ||
| 814 | if (sch->dev.driver_data) { | 808 | if (sch->dev.driver_data) { |
| 815 | /* | 809 | /* |
| 816 | * This subchannel already has an associated ccw_device. | 810 | * This subchannel already has an associated ccw_device. |
| @@ -846,7 +840,7 @@ io_subchannel_probe (struct device *pdev) | |||
| 846 | memset(cdev->private, 0, sizeof(struct ccw_device_private)); | 840 | memset(cdev->private, 0, sizeof(struct ccw_device_private)); |
| 847 | atomic_set(&cdev->private->onoff, 0); | 841 | atomic_set(&cdev->private->onoff, 0); |
| 848 | cdev->dev = (struct device) { | 842 | cdev->dev = (struct device) { |
| 849 | .parent = pdev, | 843 | .parent = &sch->dev, |
| 850 | .release = ccw_device_release, | 844 | .release = ccw_device_release, |
| 851 | }; | 845 | }; |
| 852 | INIT_LIST_HEAD(&cdev->private->kick_work.entry); | 846 | INIT_LIST_HEAD(&cdev->private->kick_work.entry); |
| @@ -859,7 +853,7 @@ io_subchannel_probe (struct device *pdev) | |||
| 859 | return -ENODEV; | 853 | return -ENODEV; |
| 860 | } | 854 | } |
| 861 | 855 | ||
| 862 | rc = io_subchannel_recog(cdev, to_subchannel(pdev)); | 856 | rc = io_subchannel_recog(cdev, sch); |
| 863 | if (rc) { | 857 | if (rc) { |
| 864 | spin_lock_irqsave(&sch->lock, flags); | 858 | spin_lock_irqsave(&sch->lock, flags); |
| 865 | sch->dev.driver_data = NULL; | 859 | sch->dev.driver_data = NULL; |
| @@ -883,17 +877,17 @@ ccw_device_unregister(void *data) | |||
| 883 | } | 877 | } |
| 884 | 878 | ||
| 885 | static int | 879 | static int |
| 886 | io_subchannel_remove (struct device *dev) | 880 | io_subchannel_remove (struct subchannel *sch) |
| 887 | { | 881 | { |
| 888 | struct ccw_device *cdev; | 882 | struct ccw_device *cdev; |
| 889 | unsigned long flags; | 883 | unsigned long flags; |
| 890 | 884 | ||
| 891 | if (!dev->driver_data) | 885 | if (!sch->dev.driver_data) |
| 892 | return 0; | 886 | return 0; |
| 893 | cdev = dev->driver_data; | 887 | cdev = sch->dev.driver_data; |
| 894 | /* Set ccw device to not operational and drop reference. */ | 888 | /* Set ccw device to not operational and drop reference. */ |
| 895 | spin_lock_irqsave(cdev->ccwlock, flags); | 889 | spin_lock_irqsave(cdev->ccwlock, flags); |
| 896 | dev->driver_data = NULL; | 890 | sch->dev.driver_data = NULL; |
| 897 | cdev->private->state = DEV_STATE_NOT_OPER; | 891 | cdev->private->state = DEV_STATE_NOT_OPER; |
| 898 | spin_unlock_irqrestore(cdev->ccwlock, flags); | 892 | spin_unlock_irqrestore(cdev->ccwlock, flags); |
| 899 | /* | 893 | /* |
| @@ -948,14 +942,12 @@ io_subchannel_ioterm(struct device *dev) | |||
| 948 | } | 942 | } |
| 949 | 943 | ||
| 950 | static void | 944 | static void |
| 951 | io_subchannel_shutdown(struct device *dev) | 945 | io_subchannel_shutdown(struct subchannel *sch) |
| 952 | { | 946 | { |
| 953 | struct subchannel *sch; | ||
| 954 | struct ccw_device *cdev; | 947 | struct ccw_device *cdev; |
| 955 | int ret; | 948 | int ret; |
| 956 | 949 | ||
| 957 | sch = to_subchannel(dev); | 950 | cdev = sch->dev.driver_data; |
| 958 | cdev = dev->driver_data; | ||
| 959 | 951 | ||
| 960 | if (cio_is_console(sch->schid)) | 952 | if (cio_is_console(sch->schid)) |
| 961 | return; | 953 | return; |
| @@ -1129,6 +1121,14 @@ ccw_device_remove (struct device *dev) | |||
| 1129 | return 0; | 1121 | return 0; |
| 1130 | } | 1122 | } |
| 1131 | 1123 | ||
| 1124 | struct bus_type ccw_bus_type = { | ||
| 1125 | .name = "ccw", | ||
| 1126 | .match = ccw_bus_match, | ||
| 1127 | .uevent = ccw_uevent, | ||
| 1128 | .probe = ccw_device_probe, | ||
| 1129 | .remove = ccw_device_remove, | ||
| 1130 | }; | ||
| 1131 | |||
| 1132 | int | 1132 | int |
| 1133 | ccw_driver_register (struct ccw_driver *cdriver) | 1133 | ccw_driver_register (struct ccw_driver *cdriver) |
| 1134 | { | 1134 | { |
| @@ -1136,8 +1136,6 @@ ccw_driver_register (struct ccw_driver *cdriver) | |||
| 1136 | 1136 | ||
| 1137 | drv->bus = &ccw_bus_type; | 1137 | drv->bus = &ccw_bus_type; |
| 1138 | drv->name = cdriver->name; | 1138 | drv->name = cdriver->name; |
| 1139 | drv->probe = ccw_device_probe; | ||
| 1140 | drv->remove = ccw_device_remove; | ||
| 1141 | 1139 | ||
| 1142 | return driver_register(drv); | 1140 | return driver_register(drv); |
| 1143 | } | 1141 | } |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 23d12b65e5fa..b302779e7cff 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 5 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 6 | * IBM Corporation | 6 | * IBM Corporation |
| 7 | * Author(s): Cornelia Huck(cohuck@de.ibm.com) | 7 | * Author(s): Cornelia Huck (cornelia.huck@de.ibm.com) |
| 8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c index 04ceba343db8..e60b2d8103b8 100644 --- a/drivers/s390/cio/device_id.c +++ b/drivers/s390/cio/device_id.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 4 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 5 | * IBM Corporation | 5 | * IBM Corporation |
| 6 | * Author(s): Cornelia Huck(cohuck@de.ibm.com) | 6 | * Author(s): Cornelia Huck (cornelia.huck@de.ibm.com) |
| 7 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 7 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 8 | * | 8 | * |
| 9 | * Sense ID functions. | 9 | * Sense ID functions. |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 143b6c25a4e6..8b0218949b62 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/s390/cio/device_ops.c | 2 | * drivers/s390/cio/device_ops.c |
| 3 | * | 3 | * |
| 4 | * $Revision: 1.58 $ | 4 | * $Revision: 1.61 $ |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 7 | * IBM Corporation | 7 | * IBM Corporation |
| 8 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) | 8 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 9 | * Cornelia Huck (cohuck@de.ibm.com) | 9 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
| 10 | */ | 10 | */ |
| 11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index 052832d03d38..d2a5b04d7cba 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 4 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 5 | * IBM Corporation | 5 | * IBM Corporation |
| 6 | * Author(s): Cornelia Huck(cohuck@de.ibm.com) | 6 | * Author(s): Cornelia Huck (cornelia.huck@de.ibm.com) |
| 7 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 7 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 8 | * | 8 | * |
| 9 | * Path Group ID functions. | 9 | * Path Group ID functions. |
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index db09c209098b..dad4dd9887c9 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 4 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
| 5 | * IBM Corporation | 5 | * IBM Corporation |
| 6 | * Author(s): Cornelia Huck(cohuck@de.ibm.com) | 6 | * Author(s): Cornelia Huck (cornelia.huck@de.ibm.com) |
| 7 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 7 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 8 | * | 8 | * |
| 9 | * Status accumulation and basic sense functions. | 9 | * Status accumulation and basic sense functions. |
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 30a836ffc31f..77be2c39bfe4 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * | 7 | * |
| 8 | * Copyright 2000,2002 IBM Corporation | 8 | * Copyright 2000,2002 IBM Corporation |
| 9 | * Author(s): Utz Bacher <utz.bacher@de.ibm.com> | 9 | * Author(s): Utz Bacher <utz.bacher@de.ibm.com> |
| 10 | * 2.6 cio integration by Cornelia Huck <cohuck@de.ibm.com> | 10 | * 2.6 cio integration by Cornelia Huck <cornelia.huck@de.ibm.com> |
| 11 | * | 11 | * |
| 12 | * Restriction: only 63 iqdio subchannels would have its own indicator, | 12 | * Restriction: only 63 iqdio subchannels would have its own indicator, |
| 13 | * after that, subsequent subchannels share one indicator | 13 | * after that, subsequent subchannels share one indicator |
| @@ -56,7 +56,7 @@ | |||
| 56 | #include "ioasm.h" | 56 | #include "ioasm.h" |
| 57 | #include "chsc.h" | 57 | #include "chsc.h" |
| 58 | 58 | ||
| 59 | #define VERSION_QDIO_C "$Revision: 1.114 $" | 59 | #define VERSION_QDIO_C "$Revision: 1.117 $" |
| 60 | 60 | ||
| 61 | /****************** MODULE PARAMETER VARIABLES ********************/ | 61 | /****************** MODULE PARAMETER VARIABLES ********************/ |
| 62 | MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com>"); | 62 | MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com>"); |
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 0db4f57a6a95..1901feef07d9 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * $Id: ctcmain.c,v 1.78 2005/09/07 12:18:02 pavlic Exp $ | 2 | * $Id: ctcmain.c,v 1.79 2006/01/11 11:32:18 cohuck Exp $ |
| 3 | * | 3 | * |
| 4 | * CTC / ESCON network driver | 4 | * CTC / ESCON network driver |
| 5 | * | 5 | * |
| @@ -8,7 +8,7 @@ | |||
| 8 | * Fixes by : Jochen Röhrig (roehrig@de.ibm.com) | 8 | * Fixes by : Jochen Röhrig (roehrig@de.ibm.com) |
| 9 | * Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 9 | * Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
| 10 | Peter Tiedemann (ptiedem@de.ibm.com) | 10 | Peter Tiedemann (ptiedem@de.ibm.com) |
| 11 | * Driver Model stuff by : Cornelia Huck <cohuck@de.ibm.com> | 11 | * Driver Model stuff by : Cornelia Huck <huckc@de.ibm.com> |
| 12 | * | 12 | * |
| 13 | * Documentation used: | 13 | * Documentation used: |
| 14 | * - Principles of Operation (IBM doc#: SA22-7201-06) | 14 | * - Principles of Operation (IBM doc#: SA22-7201-06) |
| @@ -37,7 +37,7 @@ | |||
| 37 | * along with this program; if not, write to the Free Software | 37 | * along with this program; if not, write to the Free Software |
| 38 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 38 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 39 | * | 39 | * |
| 40 | * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.78 $ | 40 | * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.79 $ |
| 41 | * | 41 | * |
| 42 | */ | 42 | */ |
| 43 | #undef DEBUG | 43 | #undef DEBUG |
| @@ -248,7 +248,7 @@ static void | |||
| 248 | print_banner(void) | 248 | print_banner(void) |
| 249 | { | 249 | { |
| 250 | static int printed = 0; | 250 | static int printed = 0; |
| 251 | char vbuf[] = "$Revision: 1.78 $"; | 251 | char vbuf[] = "$Revision: 1.79 $"; |
| 252 | char *version = vbuf; | 252 | char *version = vbuf; |
| 253 | 253 | ||
| 254 | if (printed) | 254 | if (printed) |
diff --git a/drivers/s390/net/cu3088.c b/drivers/s390/net/cu3088.c index 77dacb465732..2014fb7a4881 100644 --- a/drivers/s390/net/cu3088.c +++ b/drivers/s390/net/cu3088.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * $Id: cu3088.c,v 1.36 2005/10/25 14:37:17 cohuck Exp $ | 2 | * $Id: cu3088.c,v 1.38 2006/01/12 14:33:09 cohuck Exp $ |
| 3 | * | 3 | * |
| 4 | * CTC / LCS ccw_device driver | 4 | * CTC / LCS ccw_device driver |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation | 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation |
| 7 | * Author(s): Arnd Bergmann <arndb@de.ibm.com> | 7 | * Author(s): Arnd Bergmann <arndb@de.ibm.com> |
| 8 | * Cornelia Huck <cohuck@de.ibm.com> | 8 | * Cornelia Huck <cornelia.huck@de.ibm.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 69425a7a6e98..ac4c4b83fe17 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
| @@ -1,12 +1,13 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * $Id: netiucv.c,v 1.66 2005/05/11 08:10:17 holzheu Exp $ | 2 | * $Id: netiucv.c,v 1.69 2006/01/12 14:33:09 cohuck Exp $ |
| 3 | * | 3 | * |
| 4 | * IUCV network driver | 4 | * IUCV network driver |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation | 6 | * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation |
| 7 | * Author(s): Fritz Elfert (elfert@de.ibm.com, felfert@millenux.com) | 7 | * Author(s): Fritz Elfert (elfert@de.ibm.com, felfert@millenux.com) |
| 8 | * | 8 | * |
| 9 | * Driverfs integration and all bugs therein by Cornelia Huck(cohuck@de.ibm.com) | 9 | * Sysfs integration and all bugs therein by Cornelia Huck |
| 10 | * (cornelia.huck@de.ibm.com) | ||
| 10 | * | 11 | * |
| 11 | * Documentation used: | 12 | * Documentation used: |
| 12 | * the source of the original IUCV driver by: | 13 | * the source of the original IUCV driver by: |
| @@ -30,7 +31,7 @@ | |||
| 30 | * along with this program; if not, write to the Free Software | 31 | * along with this program; if not, write to the Free Software |
| 31 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 32 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 32 | * | 33 | * |
| 33 | * RELEASE-TAG: IUCV network driver $Revision: 1.66 $ | 34 | * RELEASE-TAG: IUCV network driver $Revision: 1.69 $ |
| 34 | * | 35 | * |
| 35 | */ | 36 | */ |
| 36 | 37 | ||
| @@ -2076,7 +2077,7 @@ DRIVER_ATTR(remove, 0200, NULL, remove_write); | |||
| 2076 | static void | 2077 | static void |
| 2077 | netiucv_banner(void) | 2078 | netiucv_banner(void) |
| 2078 | { | 2079 | { |
| 2079 | char vbuf[] = "$Revision: 1.66 $"; | 2080 | char vbuf[] = "$Revision: 1.69 $"; |
| 2080 | char *version = vbuf; | 2081 | char *version = vbuf; |
| 2081 | 2082 | ||
| 2082 | if ((version = strchr(version, ':'))) { | 2083 | if ((version = strchr(version, ':'))) { |
diff --git a/drivers/s390/s390_rdev.c b/drivers/s390/s390_rdev.c index 566cc3d185b6..206518c7d332 100644 --- a/drivers/s390/s390_rdev.c +++ b/drivers/s390/s390_rdev.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/s390/s390_rdev.c | 2 | * drivers/s390/s390_rdev.c |
| 3 | * s390 root device | 3 | * s390 root device |
| 4 | * $Revision: 1.2 $ | 4 | * $Revision: 1.4 $ |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2002, 2005 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 2002, 2005 IBM Deutschland Entwicklung GmbH, |
| 7 | * IBM Corporation | 7 | * IBM Corporation |
| 8 | * Author(s): Cornelia Huck (cohuck@de.ibm.com) | 8 | * Author(s): Cornelia Huck (cornelia.huck@de.ibm.com) |
| 9 | * Carsten Otte (cotte@de.ibm.com) | 9 | * Carsten Otte (cotte@de.ibm.com) |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 5e84c5aa7779..167fef39d8a7 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
| @@ -1125,6 +1125,8 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter) | |||
| 1125 | zfcp_free_low_mem_buffers(adapter); | 1125 | zfcp_free_low_mem_buffers(adapter); |
| 1126 | /* free memory of adapter data structure and queues */ | 1126 | /* free memory of adapter data structure and queues */ |
| 1127 | zfcp_qdio_free_queues(adapter); | 1127 | zfcp_qdio_free_queues(adapter); |
| 1128 | kfree(adapter->fc_stats); | ||
| 1129 | kfree(adapter->stats_reset_data); | ||
| 1128 | ZFCP_LOG_TRACE("freeing adapter structure\n"); | 1130 | ZFCP_LOG_TRACE("freeing adapter structure\n"); |
| 1129 | kfree(adapter); | 1131 | kfree(adapter); |
| 1130 | out: | 1132 | out: |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index d81b737d68cc..9bb511083a26 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
| @@ -921,7 +921,6 @@ struct zfcp_adapter { | |||
| 921 | u32 physical_s_id; /* local FC port ID */ | 921 | u32 physical_s_id; /* local FC port ID */ |
| 922 | struct ccw_device *ccw_device; /* S/390 ccw device */ | 922 | struct ccw_device *ccw_device; /* S/390 ccw device */ |
| 923 | u8 fc_service_class; | 923 | u8 fc_service_class; |
| 924 | u32 fc_topology; /* FC topology */ | ||
| 925 | u32 hydra_version; /* Hydra version */ | 924 | u32 hydra_version; /* Hydra version */ |
| 926 | u32 fsf_lic_version; | 925 | u32 fsf_lic_version; |
| 927 | u32 adapter_features; /* FCP channel features */ | 926 | u32 adapter_features; /* FCP channel features */ |
| @@ -978,6 +977,9 @@ struct zfcp_adapter { | |||
| 978 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ | 977 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ |
| 979 | struct qdio_initialize qdio_init_data; /* for qdio_establish */ | 978 | struct qdio_initialize qdio_init_data; /* for qdio_establish */ |
| 980 | struct device generic_services; /* directory for WKA ports */ | 979 | struct device generic_services; /* directory for WKA ports */ |
| 980 | struct fc_host_statistics *fc_stats; | ||
| 981 | struct fsf_qtcb_bottom_port *stats_reset_data; | ||
| 982 | unsigned long stats_reset; | ||
| 981 | }; | 983 | }; |
| 982 | 984 | ||
| 983 | /* | 985 | /* |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index ee7314d8c2da..c065cb836c97 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
| @@ -2613,7 +2613,7 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action) | |||
| 2613 | case ZFCP_ERP_STEP_UNINITIALIZED: | 2613 | case ZFCP_ERP_STEP_UNINITIALIZED: |
| 2614 | case ZFCP_ERP_STEP_PHYS_PORT_CLOSING: | 2614 | case ZFCP_ERP_STEP_PHYS_PORT_CLOSING: |
| 2615 | case ZFCP_ERP_STEP_PORT_CLOSING: | 2615 | case ZFCP_ERP_STEP_PORT_CLOSING: |
| 2616 | if (adapter->fc_topology == FSF_TOPO_P2P) { | 2616 | if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP) { |
| 2617 | if (port->wwpn != adapter->peer_wwpn) { | 2617 | if (port->wwpn != adapter->peer_wwpn) { |
| 2618 | ZFCP_LOG_NORMAL("Failed to open port 0x%016Lx " | 2618 | ZFCP_LOG_NORMAL("Failed to open port 0x%016Lx " |
| 2619 | "on adapter %s.\nPeer WWPN " | 2619 | "on adapter %s.\nPeer WWPN " |
| @@ -3403,7 +3403,7 @@ zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action) | |||
| 3403 | /** | 3403 | /** |
| 3404 | * zfcp_erp_action_cleanup | 3404 | * zfcp_erp_action_cleanup |
| 3405 | * | 3405 | * |
| 3406 | * Register unit with scsi stack if appropiate and fix reference counts. | 3406 | * Register unit with scsi stack if appropriate and fix reference counts. |
| 3407 | * Note: Temporary units are not registered with scsi stack. | 3407 | * Note: Temporary units are not registered with scsi stack. |
| 3408 | */ | 3408 | */ |
| 3409 | static void | 3409 | static void |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 59587951c847..cbfab09899c8 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
| @@ -964,6 +964,40 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
| 964 | | ZFCP_STATUS_COMMON_ERP_FAILED); | 964 | | ZFCP_STATUS_COMMON_ERP_FAILED); |
| 965 | break; | 965 | break; |
| 966 | 966 | ||
| 967 | case FSF_STATUS_READ_NOTIFICATION_LOST: | ||
| 968 | ZFCP_LOG_NORMAL("Unsolicited status notification(s) lost: " | ||
| 969 | "adapter %s%s%s%s%s%s%s%s%s\n", | ||
| 970 | zfcp_get_busid_by_adapter(adapter), | ||
| 971 | (status_buffer->status_subtype & | ||
| 972 | FSF_STATUS_READ_SUB_INCOMING_ELS) ? | ||
| 973 | ", incoming ELS" : "", | ||
| 974 | (status_buffer->status_subtype & | ||
| 975 | FSF_STATUS_READ_SUB_SENSE_DATA) ? | ||
| 976 | ", sense data" : "", | ||
| 977 | (status_buffer->status_subtype & | ||
| 978 | FSF_STATUS_READ_SUB_LINK_STATUS) ? | ||
| 979 | ", link status change" : "", | ||
| 980 | (status_buffer->status_subtype & | ||
| 981 | FSF_STATUS_READ_SUB_PORT_CLOSED) ? | ||
| 982 | ", port close" : "", | ||
| 983 | (status_buffer->status_subtype & | ||
| 984 | FSF_STATUS_READ_SUB_BIT_ERROR_THRESHOLD) ? | ||
| 985 | ", bit error exception" : "", | ||
| 986 | (status_buffer->status_subtype & | ||
| 987 | FSF_STATUS_READ_SUB_ACT_UPDATED) ? | ||
| 988 | ", ACT update" : "", | ||
| 989 | (status_buffer->status_subtype & | ||
| 990 | FSF_STATUS_READ_SUB_ACT_HARDENED) ? | ||
| 991 | ", ACT hardening" : "", | ||
| 992 | (status_buffer->status_subtype & | ||
| 993 | FSF_STATUS_READ_SUB_FEATURE_UPDATE_ALERT) ? | ||
| 994 | ", adapter feature change" : ""); | ||
| 995 | |||
| 996 | if (status_buffer->status_subtype & | ||
| 997 | FSF_STATUS_READ_SUB_ACT_UPDATED) | ||
| 998 | zfcp_erp_adapter_access_changed(adapter); | ||
| 999 | break; | ||
| 1000 | |||
| 967 | case FSF_STATUS_READ_CFDC_UPDATED: | 1001 | case FSF_STATUS_READ_CFDC_UPDATED: |
| 968 | ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n", | 1002 | ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n", |
| 969 | zfcp_get_busid_by_adapter(adapter)); | 1003 | zfcp_get_busid_by_adapter(adapter)); |
| @@ -1954,6 +1988,7 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) | |||
| 1954 | erp_action->fsf_req->qtcb->bottom.config.feature_selection = | 1988 | erp_action->fsf_req->qtcb->bottom.config.feature_selection = |
| 1955 | FSF_FEATURE_CFDC | | 1989 | FSF_FEATURE_CFDC | |
| 1956 | FSF_FEATURE_LUN_SHARING | | 1990 | FSF_FEATURE_LUN_SHARING | |
| 1991 | FSF_FEATURE_NOTIFICATION_LOST | | ||
| 1957 | FSF_FEATURE_UPDATE_ALERT; | 1992 | FSF_FEATURE_UPDATE_ALERT; |
| 1958 | 1993 | ||
| 1959 | /* start QDIO request for this FSF request */ | 1994 | /* start QDIO request for this FSF request */ |
| @@ -2008,27 +2043,30 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok) | |||
| 2008 | fc_host_port_id(shost) = bottom->s_id & ZFCP_DID_MASK; | 2043 | fc_host_port_id(shost) = bottom->s_id & ZFCP_DID_MASK; |
| 2009 | fc_host_speed(shost) = bottom->fc_link_speed; | 2044 | fc_host_speed(shost) = bottom->fc_link_speed; |
| 2010 | fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; | 2045 | fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; |
| 2011 | adapter->fc_topology = bottom->fc_topology; | ||
| 2012 | adapter->hydra_version = bottom->adapter_type; | 2046 | adapter->hydra_version = bottom->adapter_type; |
| 2013 | if (adapter->physical_wwpn == 0) | 2047 | if (fc_host_permanent_port_name(shost) == -1) |
| 2014 | adapter->physical_wwpn = fc_host_port_name(shost); | 2048 | fc_host_permanent_port_name(shost) = |
| 2015 | if (adapter->physical_s_id == 0) | 2049 | fc_host_port_name(shost); |
| 2016 | adapter->physical_s_id = fc_host_port_id(shost); | 2050 | if (bottom->fc_topology == FSF_TOPO_P2P) { |
| 2051 | adapter->peer_d_id = bottom->peer_d_id & ZFCP_DID_MASK; | ||
| 2052 | adapter->peer_wwpn = bottom->plogi_payload.wwpn; | ||
| 2053 | adapter->peer_wwnn = bottom->plogi_payload.wwnn; | ||
| 2054 | fc_host_port_type(shost) = FC_PORTTYPE_PTP; | ||
| 2055 | } else if (bottom->fc_topology == FSF_TOPO_FABRIC) | ||
| 2056 | fc_host_port_type(shost) = FC_PORTTYPE_NPORT; | ||
| 2057 | else if (bottom->fc_topology == FSF_TOPO_AL) | ||
| 2058 | fc_host_port_type(shost) = FC_PORTTYPE_NLPORT; | ||
| 2059 | else | ||
| 2060 | fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN; | ||
| 2017 | } else { | 2061 | } else { |
| 2018 | fc_host_node_name(shost) = 0; | 2062 | fc_host_node_name(shost) = 0; |
| 2019 | fc_host_port_name(shost) = 0; | 2063 | fc_host_port_name(shost) = 0; |
| 2020 | fc_host_port_id(shost) = 0; | 2064 | fc_host_port_id(shost) = 0; |
| 2021 | fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; | 2065 | fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; |
| 2022 | adapter->fc_topology = 0; | 2066 | fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN; |
| 2023 | adapter->hydra_version = 0; | 2067 | adapter->hydra_version = 0; |
| 2024 | } | 2068 | } |
| 2025 | 2069 | ||
| 2026 | if (adapter->fc_topology == FSF_TOPO_P2P) { | ||
| 2027 | adapter->peer_d_id = bottom->peer_d_id & ZFCP_DID_MASK; | ||
| 2028 | adapter->peer_wwpn = bottom->plogi_payload.wwpn; | ||
| 2029 | adapter->peer_wwnn = bottom->plogi_payload.wwnn; | ||
| 2030 | } | ||
| 2031 | |||
| 2032 | if (adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT) { | 2070 | if (adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT) { |
| 2033 | adapter->hardware_version = bottom->hardware_version; | 2071 | adapter->hardware_version = bottom->hardware_version; |
| 2034 | memcpy(fc_host_serial_number(shost), bottom->serial_number, | 2072 | memcpy(fc_host_serial_number(shost), bottom->serial_number, |
| @@ -2097,8 +2135,8 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
| 2097 | if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1)) | 2135 | if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1)) |
| 2098 | return -EIO; | 2136 | return -EIO; |
| 2099 | 2137 | ||
| 2100 | switch (adapter->fc_topology) { | 2138 | switch (fc_host_port_type(adapter->scsi_host)) { |
| 2101 | case FSF_TOPO_P2P: | 2139 | case FC_PORTTYPE_PTP: |
| 2102 | ZFCP_LOG_NORMAL("Point-to-Point fibrechannel " | 2140 | ZFCP_LOG_NORMAL("Point-to-Point fibrechannel " |
| 2103 | "configuration detected at adapter %s\n" | 2141 | "configuration detected at adapter %s\n" |
| 2104 | "Peer WWNN 0x%016llx, " | 2142 | "Peer WWNN 0x%016llx, " |
| @@ -2111,7 +2149,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
| 2111 | debug_text_event(fsf_req->adapter->erp_dbf, 0, | 2149 | debug_text_event(fsf_req->adapter->erp_dbf, 0, |
| 2112 | "top-p-to-p"); | 2150 | "top-p-to-p"); |
| 2113 | break; | 2151 | break; |
| 2114 | case FSF_TOPO_AL: | 2152 | case FC_PORTTYPE_NLPORT: |
| 2115 | ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " | 2153 | ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " |
| 2116 | "topology detected at adapter %s " | 2154 | "topology detected at adapter %s " |
| 2117 | "unsupported, shutting down adapter\n", | 2155 | "unsupported, shutting down adapter\n", |
| @@ -2120,7 +2158,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
| 2120 | "top-al"); | 2158 | "top-al"); |
| 2121 | zfcp_erp_adapter_shutdown(adapter, 0); | 2159 | zfcp_erp_adapter_shutdown(adapter, 0); |
| 2122 | return -EIO; | 2160 | return -EIO; |
| 2123 | case FSF_TOPO_FABRIC: | 2161 | case FC_PORTTYPE_NPORT: |
| 2124 | ZFCP_LOG_NORMAL("Switched fabric fibrechannel " | 2162 | ZFCP_LOG_NORMAL("Switched fabric fibrechannel " |
| 2125 | "network detected at adapter %s.\n", | 2163 | "network detected at adapter %s.\n", |
| 2126 | zfcp_get_busid_by_adapter(adapter)); | 2164 | zfcp_get_busid_by_adapter(adapter)); |
| @@ -2133,7 +2171,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
| 2133 | "of a type known to the zfcp " | 2171 | "of a type known to the zfcp " |
| 2134 | "driver, shutting down adapter\n", | 2172 | "driver, shutting down adapter\n", |
| 2135 | zfcp_get_busid_by_adapter(adapter)); | 2173 | zfcp_get_busid_by_adapter(adapter)); |
| 2136 | adapter->fc_topology = FSF_TOPO_ERROR; | ||
| 2137 | debug_text_exception(fsf_req->adapter->erp_dbf, 0, | 2174 | debug_text_exception(fsf_req->adapter->erp_dbf, 0, |
| 2138 | "unknown-topo"); | 2175 | "unknown-topo"); |
| 2139 | zfcp_erp_adapter_shutdown(adapter, 0); | 2176 | zfcp_erp_adapter_shutdown(adapter, 0); |
| @@ -2293,14 +2330,13 @@ zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req) | |||
| 2293 | data = (struct fsf_qtcb_bottom_port*) fsf_req->data; | 2330 | data = (struct fsf_qtcb_bottom_port*) fsf_req->data; |
| 2294 | if (data) | 2331 | if (data) |
| 2295 | memcpy(data, bottom, sizeof(struct fsf_qtcb_bottom_port)); | 2332 | memcpy(data, bottom, sizeof(struct fsf_qtcb_bottom_port)); |
| 2296 | if (adapter->connection_features & FSF_FEATURE_NPIV_MODE) { | 2333 | if (adapter->connection_features & FSF_FEATURE_NPIV_MODE) |
| 2297 | adapter->physical_wwpn = bottom->wwpn; | 2334 | fc_host_permanent_port_name(shost) = bottom->wwpn; |
| 2298 | adapter->physical_s_id = bottom->fc_port_id; | 2335 | else |
| 2299 | } else { | 2336 | fc_host_permanent_port_name(shost) = |
| 2300 | adapter->physical_wwpn = fc_host_port_name(shost); | 2337 | fc_host_port_name(shost); |
| 2301 | adapter->physical_s_id = fc_host_port_id(shost); | ||
| 2302 | } | ||
| 2303 | fc_host_maxframe_size(shost) = bottom->maximum_frame_size; | 2338 | fc_host_maxframe_size(shost) = bottom->maximum_frame_size; |
| 2339 | fc_host_supported_speeds(shost) = bottom->supported_speed; | ||
| 2304 | break; | 2340 | break; |
| 2305 | 2341 | ||
| 2306 | case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: | 2342 | case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: |
diff --git a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h index 48719f055952..e734415cae6d 100644 --- a/drivers/s390/scsi/zfcp_fsf.h +++ b/drivers/s390/scsi/zfcp_fsf.h | |||
| @@ -166,6 +166,7 @@ | |||
| 166 | #define FSF_STATUS_READ_BIT_ERROR_THRESHOLD 0x00000004 | 166 | #define FSF_STATUS_READ_BIT_ERROR_THRESHOLD 0x00000004 |
| 167 | #define FSF_STATUS_READ_LINK_DOWN 0x00000005 | 167 | #define FSF_STATUS_READ_LINK_DOWN 0x00000005 |
| 168 | #define FSF_STATUS_READ_LINK_UP 0x00000006 | 168 | #define FSF_STATUS_READ_LINK_UP 0x00000006 |
| 169 | #define FSF_STATUS_READ_NOTIFICATION_LOST 0x00000009 | ||
| 169 | #define FSF_STATUS_READ_CFDC_UPDATED 0x0000000A | 170 | #define FSF_STATUS_READ_CFDC_UPDATED 0x0000000A |
| 170 | #define FSF_STATUS_READ_CFDC_HARDENED 0x0000000B | 171 | #define FSF_STATUS_READ_CFDC_HARDENED 0x0000000B |
| 171 | #define FSF_STATUS_READ_FEATURE_UPDATE_ALERT 0x0000000C | 172 | #define FSF_STATUS_READ_FEATURE_UPDATE_ALERT 0x0000000C |
| @@ -179,6 +180,16 @@ | |||
| 179 | #define FSF_STATUS_READ_SUB_FDISC_FAILED 0x00000001 | 180 | #define FSF_STATUS_READ_SUB_FDISC_FAILED 0x00000001 |
| 180 | #define FSF_STATUS_READ_SUB_FIRMWARE_UPDATE 0x00000002 | 181 | #define FSF_STATUS_READ_SUB_FIRMWARE_UPDATE 0x00000002 |
| 181 | 182 | ||
| 183 | /* status subtypes for unsolicited status notification lost */ | ||
| 184 | #define FSF_STATUS_READ_SUB_INCOMING_ELS 0x00000001 | ||
| 185 | #define FSF_STATUS_READ_SUB_SENSE_DATA 0x00000002 | ||
| 186 | #define FSF_STATUS_READ_SUB_LINK_STATUS 0x00000004 | ||
| 187 | #define FSF_STATUS_READ_SUB_PORT_CLOSED 0x00000008 | ||
| 188 | #define FSF_STATUS_READ_SUB_BIT_ERROR_THRESHOLD 0x00000010 | ||
| 189 | #define FSF_STATUS_READ_SUB_ACT_UPDATED 0x00000020 | ||
| 190 | #define FSF_STATUS_READ_SUB_ACT_HARDENED 0x00000040 | ||
| 191 | #define FSF_STATUS_READ_SUB_FEATURE_UPDATE_ALERT 0x00000080 | ||
| 192 | |||
| 182 | /* status subtypes for CFDC */ | 193 | /* status subtypes for CFDC */ |
| 183 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE 0x00000002 | 194 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE 0x00000002 |
| 184 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE2 0x0000000F | 195 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE2 0x0000000F |
| @@ -188,7 +199,6 @@ | |||
| 188 | #define FSF_TOPO_P2P 0x00000001 | 199 | #define FSF_TOPO_P2P 0x00000001 |
| 189 | #define FSF_TOPO_FABRIC 0x00000002 | 200 | #define FSF_TOPO_FABRIC 0x00000002 |
| 190 | #define FSF_TOPO_AL 0x00000003 | 201 | #define FSF_TOPO_AL 0x00000003 |
| 191 | #define FSF_TOPO_FABRIC_VIRT 0x00000004 | ||
| 192 | 202 | ||
| 193 | /* data direction for FCP commands */ | 203 | /* data direction for FCP commands */ |
| 194 | #define FSF_DATADIR_WRITE 0x00000001 | 204 | #define FSF_DATADIR_WRITE 0x00000001 |
| @@ -211,6 +221,7 @@ | |||
| 211 | /* channel features */ | 221 | /* channel features */ |
| 212 | #define FSF_FEATURE_CFDC 0x00000002 | 222 | #define FSF_FEATURE_CFDC 0x00000002 |
| 213 | #define FSF_FEATURE_LUN_SHARING 0x00000004 | 223 | #define FSF_FEATURE_LUN_SHARING 0x00000004 |
| 224 | #define FSF_FEATURE_NOTIFICATION_LOST 0x00000008 | ||
| 214 | #define FSF_FEATURE_HBAAPI_MANAGEMENT 0x00000010 | 225 | #define FSF_FEATURE_HBAAPI_MANAGEMENT 0x00000010 |
| 215 | #define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020 | 226 | #define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020 |
| 216 | #define FSF_FEATURE_UPDATE_ALERT 0x00000100 | 227 | #define FSF_FEATURE_UPDATE_ALERT 0x00000100 |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 66608d13a634..3c2cbcccbf54 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
| @@ -49,8 +49,6 @@ static int zfcp_task_management_function(struct zfcp_unit *, u8, | |||
| 49 | 49 | ||
| 50 | static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int, scsi_id_t, | 50 | static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int, scsi_id_t, |
| 51 | scsi_lun_t); | 51 | scsi_lun_t); |
| 52 | static struct zfcp_port *zfcp_port_lookup(struct zfcp_adapter *, int, | ||
| 53 | scsi_id_t); | ||
| 54 | 52 | ||
| 55 | static struct device_attribute *zfcp_sysfs_sdev_attrs[]; | 53 | static struct device_attribute *zfcp_sysfs_sdev_attrs[]; |
| 56 | 54 | ||
| @@ -406,18 +404,6 @@ zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id, | |||
| 406 | return retval; | 404 | return retval; |
| 407 | } | 405 | } |
| 408 | 406 | ||
| 409 | static struct zfcp_port * | ||
| 410 | zfcp_port_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id) | ||
| 411 | { | ||
| 412 | struct zfcp_port *port; | ||
| 413 | |||
| 414 | list_for_each_entry(port, &adapter->port_list_head, list) { | ||
| 415 | if (port->rport && (id == port->rport->scsi_target_id)) | ||
| 416 | return port; | ||
| 417 | } | ||
| 418 | return (struct zfcp_port *) NULL; | ||
| 419 | } | ||
| 420 | |||
| 421 | /** | 407 | /** |
| 422 | * zfcp_scsi_eh_abort_handler - abort the specified SCSI command | 408 | * zfcp_scsi_eh_abort_handler - abort the specified SCSI command |
| 423 | * @scpnt: pointer to scsi_cmnd to be aborted | 409 | * @scpnt: pointer to scsi_cmnd to be aborted |
| @@ -731,70 +717,164 @@ zfcp_fsf_start_scsi_er_timer(struct zfcp_adapter *adapter) | |||
| 731 | /* | 717 | /* |
| 732 | * Support functions for FC transport class | 718 | * Support functions for FC transport class |
| 733 | */ | 719 | */ |
| 734 | static void | 720 | static struct fc_host_statistics* |
| 735 | zfcp_get_port_id(struct scsi_target *starget) | 721 | zfcp_init_fc_host_stats(struct zfcp_adapter *adapter) |
| 736 | { | 722 | { |
| 737 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 723 | struct fc_host_statistics *fc_stats; |
| 738 | struct zfcp_adapter *adapter = (struct zfcp_adapter *)shost->hostdata[0]; | ||
| 739 | struct zfcp_port *port; | ||
| 740 | unsigned long flags; | ||
| 741 | 724 | ||
| 742 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 725 | if (!adapter->fc_stats) { |
| 743 | port = zfcp_port_lookup(adapter, starget->channel, starget->id); | 726 | fc_stats = kmalloc(sizeof(*fc_stats), GFP_KERNEL); |
| 744 | if (port) | 727 | if (!fc_stats) |
| 745 | fc_starget_port_id(starget) = port->d_id; | 728 | return NULL; |
| 746 | else | 729 | adapter->fc_stats = fc_stats; /* freed in adater_dequeue */ |
| 747 | fc_starget_port_id(starget) = -1; | 730 | } |
| 748 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | 731 | memset(adapter->fc_stats, 0, sizeof(*adapter->fc_stats)); |
| 732 | return adapter->fc_stats; | ||
| 749 | } | 733 | } |
| 750 | 734 | ||
| 751 | static void | 735 | static void |
| 752 | zfcp_get_port_name(struct scsi_target *starget) | 736 | zfcp_adjust_fc_host_stats(struct fc_host_statistics *fc_stats, |
| 737 | struct fsf_qtcb_bottom_port *data, | ||
| 738 | struct fsf_qtcb_bottom_port *old) | ||
| 753 | { | 739 | { |
| 754 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 740 | fc_stats->seconds_since_last_reset = data->seconds_since_last_reset - |
| 755 | struct zfcp_adapter *adapter = (struct zfcp_adapter *)shost->hostdata[0]; | 741 | old->seconds_since_last_reset; |
| 756 | struct zfcp_port *port; | 742 | fc_stats->tx_frames = data->tx_frames - old->tx_frames; |
| 757 | unsigned long flags; | 743 | fc_stats->tx_words = data->tx_words - old->tx_words; |
| 744 | fc_stats->rx_frames = data->rx_frames - old->rx_frames; | ||
| 745 | fc_stats->rx_words = data->rx_words - old->rx_words; | ||
| 746 | fc_stats->lip_count = data->lip - old->lip; | ||
| 747 | fc_stats->nos_count = data->nos - old->nos; | ||
| 748 | fc_stats->error_frames = data->error_frames - old->error_frames; | ||
| 749 | fc_stats->dumped_frames = data->dumped_frames - old->dumped_frames; | ||
| 750 | fc_stats->link_failure_count = data->link_failure - old->link_failure; | ||
| 751 | fc_stats->loss_of_sync_count = data->loss_of_sync - old->loss_of_sync; | ||
| 752 | fc_stats->loss_of_signal_count = data->loss_of_signal - | ||
| 753 | old->loss_of_signal; | ||
| 754 | fc_stats->prim_seq_protocol_err_count = data->psp_error_counts - | ||
| 755 | old->psp_error_counts; | ||
| 756 | fc_stats->invalid_tx_word_count = data->invalid_tx_words - | ||
| 757 | old->invalid_tx_words; | ||
| 758 | fc_stats->invalid_crc_count = data->invalid_crcs - old->invalid_crcs; | ||
| 759 | fc_stats->fcp_input_requests = data->input_requests - | ||
| 760 | old->input_requests; | ||
| 761 | fc_stats->fcp_output_requests = data->output_requests - | ||
| 762 | old->output_requests; | ||
| 763 | fc_stats->fcp_control_requests = data->control_requests - | ||
| 764 | old->control_requests; | ||
| 765 | fc_stats->fcp_input_megabytes = data->input_mb - old->input_mb; | ||
| 766 | fc_stats->fcp_output_megabytes = data->output_mb - old->output_mb; | ||
| 767 | } | ||
| 758 | 768 | ||
| 759 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 769 | static void |
| 760 | port = zfcp_port_lookup(adapter, starget->channel, starget->id); | 770 | zfcp_set_fc_host_stats(struct fc_host_statistics *fc_stats, |
| 761 | if (port) | 771 | struct fsf_qtcb_bottom_port *data) |
| 762 | fc_starget_port_name(starget) = port->wwpn; | 772 | { |
| 763 | else | 773 | fc_stats->seconds_since_last_reset = data->seconds_since_last_reset; |
| 764 | fc_starget_port_name(starget) = -1; | 774 | fc_stats->tx_frames = data->tx_frames; |
| 765 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | 775 | fc_stats->tx_words = data->tx_words; |
| 776 | fc_stats->rx_frames = data->rx_frames; | ||
| 777 | fc_stats->rx_words = data->rx_words; | ||
| 778 | fc_stats->lip_count = data->lip; | ||
| 779 | fc_stats->nos_count = data->nos; | ||
| 780 | fc_stats->error_frames = data->error_frames; | ||
| 781 | fc_stats->dumped_frames = data->dumped_frames; | ||
| 782 | fc_stats->link_failure_count = data->link_failure; | ||
| 783 | fc_stats->loss_of_sync_count = data->loss_of_sync; | ||
| 784 | fc_stats->loss_of_signal_count = data->loss_of_signal; | ||
| 785 | fc_stats->prim_seq_protocol_err_count = data->psp_error_counts; | ||
| 786 | fc_stats->invalid_tx_word_count = data->invalid_tx_words; | ||
| 787 | fc_stats->invalid_crc_count = data->invalid_crcs; | ||
| 788 | fc_stats->fcp_input_requests = data->input_requests; | ||
| 789 | fc_stats->fcp_output_requests = data->output_requests; | ||
| 790 | fc_stats->fcp_control_requests = data->control_requests; | ||
| 791 | fc_stats->fcp_input_megabytes = data->input_mb; | ||
| 792 | fc_stats->fcp_output_megabytes = data->output_mb; | ||
| 793 | } | ||
| 794 | |||
| 795 | /** | ||
| 796 | * zfcp_get_fc_host_stats - provide fc_host_statistics for scsi_transport_fc | ||
| 797 | * | ||
| 798 | * assumption: scsi_transport_fc synchronizes calls of | ||
| 799 | * get_fc_host_stats and reset_fc_host_stats | ||
| 800 | * (XXX to be checked otherwise introduce locking) | ||
| 801 | */ | ||
| 802 | static struct fc_host_statistics * | ||
| 803 | zfcp_get_fc_host_stats(struct Scsi_Host *shost) | ||
| 804 | { | ||
| 805 | struct zfcp_adapter *adapter; | ||
| 806 | struct fc_host_statistics *fc_stats; | ||
| 807 | struct fsf_qtcb_bottom_port *data; | ||
| 808 | int ret; | ||
| 809 | |||
| 810 | adapter = (struct zfcp_adapter *)shost->hostdata[0]; | ||
| 811 | fc_stats = zfcp_init_fc_host_stats(adapter); | ||
| 812 | if (!fc_stats) | ||
| 813 | return NULL; | ||
| 814 | |||
| 815 | data = kmalloc(sizeof(*data), GFP_KERNEL); | ||
| 816 | if (!data) | ||
| 817 | return NULL; | ||
| 818 | memset(data, 0, sizeof(*data)); | ||
| 819 | |||
| 820 | ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); | ||
| 821 | if (ret) { | ||
| 822 | kfree(data); | ||
| 823 | return NULL; /* XXX return zeroed fc_stats? */ | ||
| 824 | } | ||
| 825 | |||
| 826 | if (adapter->stats_reset && | ||
| 827 | ((jiffies/HZ - adapter->stats_reset) < | ||
| 828 | data->seconds_since_last_reset)) { | ||
| 829 | zfcp_adjust_fc_host_stats(fc_stats, data, | ||
| 830 | adapter->stats_reset_data); | ||
| 831 | } else | ||
| 832 | zfcp_set_fc_host_stats(fc_stats, data); | ||
| 833 | |||
| 834 | kfree(data); | ||
| 835 | return fc_stats; | ||
| 766 | } | 836 | } |
| 767 | 837 | ||
| 768 | static void | 838 | static void |
| 769 | zfcp_get_node_name(struct scsi_target *starget) | 839 | zfcp_reset_fc_host_stats(struct Scsi_Host *shost) |
| 770 | { | 840 | { |
| 771 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 841 | struct zfcp_adapter *adapter; |
| 772 | struct zfcp_adapter *adapter = (struct zfcp_adapter *)shost->hostdata[0]; | 842 | struct fsf_qtcb_bottom_port *data, *old_data; |
| 773 | struct zfcp_port *port; | 843 | int ret; |
| 774 | unsigned long flags; | ||
| 775 | 844 | ||
| 776 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 845 | adapter = (struct zfcp_adapter *)shost->hostdata[0]; |
| 777 | port = zfcp_port_lookup(adapter, starget->channel, starget->id); | 846 | data = kmalloc(sizeof(*data), GFP_KERNEL); |
| 778 | if (port) | 847 | if (!data) |
| 779 | fc_starget_node_name(starget) = port->wwnn; | 848 | return; |
| 780 | else | 849 | memset(data, 0, sizeof(*data)); |
| 781 | fc_starget_node_name(starget) = -1; | 850 | |
| 782 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | 851 | ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); |
| 852 | if (ret == 0) { | ||
| 853 | adapter->stats_reset = jiffies/HZ; | ||
| 854 | old_data = adapter->stats_reset_data; | ||
| 855 | adapter->stats_reset_data = data; /* finally freed in | ||
| 856 | adater_dequeue */ | ||
| 857 | kfree(old_data); | ||
| 858 | } | ||
| 783 | } | 859 | } |
| 784 | 860 | ||
| 785 | struct fc_function_template zfcp_transport_functions = { | 861 | struct fc_function_template zfcp_transport_functions = { |
| 786 | .get_starget_port_id = zfcp_get_port_id, | ||
| 787 | .get_starget_port_name = zfcp_get_port_name, | ||
| 788 | .get_starget_node_name = zfcp_get_node_name, | ||
| 789 | .show_starget_port_id = 1, | 862 | .show_starget_port_id = 1, |
| 790 | .show_starget_port_name = 1, | 863 | .show_starget_port_name = 1, |
| 791 | .show_starget_node_name = 1, | 864 | .show_starget_node_name = 1, |
| 792 | .show_rport_supported_classes = 1, | 865 | .show_rport_supported_classes = 1, |
| 793 | .show_host_node_name = 1, | 866 | .show_host_node_name = 1, |
| 794 | .show_host_port_name = 1, | 867 | .show_host_port_name = 1, |
| 868 | .show_host_permanent_port_name = 1, | ||
| 795 | .show_host_supported_classes = 1, | 869 | .show_host_supported_classes = 1, |
| 870 | .show_host_supported_speeds = 1, | ||
| 796 | .show_host_maxframe_size = 1, | 871 | .show_host_maxframe_size = 1, |
| 797 | .show_host_serial_number = 1, | 872 | .show_host_serial_number = 1, |
| 873 | .get_fc_host_stats = zfcp_get_fc_host_stats, | ||
| 874 | .reset_fc_host_stats = zfcp_reset_fc_host_stats, | ||
| 875 | /* no functions registered for following dynamic attributes but | ||
| 876 | directly set by LLDD */ | ||
| 877 | .show_host_port_type = 1, | ||
| 798 | .show_host_speed = 1, | 878 | .show_host_speed = 1, |
| 799 | .show_host_port_id = 1, | 879 | .show_host_port_id = 1, |
| 800 | }; | 880 | }; |
diff --git a/drivers/s390/scsi/zfcp_sysfs_adapter.c b/drivers/s390/scsi/zfcp_sysfs_adapter.c index 0cd435280e7d..9f262250043a 100644 --- a/drivers/s390/scsi/zfcp_sysfs_adapter.c +++ b/drivers/s390/scsi/zfcp_sysfs_adapter.c | |||
| @@ -33,14 +33,6 @@ | |||
| 33 | 33 | ||
| 34 | #define ZFCP_LOG_AREA ZFCP_LOG_AREA_CONFIG | 34 | #define ZFCP_LOG_AREA ZFCP_LOG_AREA_CONFIG |
| 35 | 35 | ||
| 36 | static const char fc_topologies[5][25] = { | ||
| 37 | "<error>", | ||
| 38 | "point-to-point", | ||
| 39 | "fabric", | ||
| 40 | "arbitrated loop", | ||
| 41 | "fabric (virt. adapter)" | ||
| 42 | }; | ||
| 43 | |||
| 44 | /** | 36 | /** |
| 45 | * ZFCP_DEFINE_ADAPTER_ATTR | 37 | * ZFCP_DEFINE_ADAPTER_ATTR |
| 46 | * @_name: name of show attribute | 38 | * @_name: name of show attribute |
| @@ -69,12 +61,8 @@ ZFCP_DEFINE_ADAPTER_ATTR(physical_wwpn, "0x%016llx\n", adapter->physical_wwpn); | |||
| 69 | ZFCP_DEFINE_ADAPTER_ATTR(physical_s_id, "0x%06x\n", adapter->physical_s_id); | 61 | ZFCP_DEFINE_ADAPTER_ATTR(physical_s_id, "0x%06x\n", adapter->physical_s_id); |
| 70 | ZFCP_DEFINE_ADAPTER_ATTR(card_version, "0x%04x\n", adapter->hydra_version); | 62 | ZFCP_DEFINE_ADAPTER_ATTR(card_version, "0x%04x\n", adapter->hydra_version); |
| 71 | ZFCP_DEFINE_ADAPTER_ATTR(lic_version, "0x%08x\n", adapter->fsf_lic_version); | 63 | ZFCP_DEFINE_ADAPTER_ATTR(lic_version, "0x%08x\n", adapter->fsf_lic_version); |
| 72 | ZFCP_DEFINE_ADAPTER_ATTR(fc_service_class, "%d\n", adapter->fc_service_class); | ||
| 73 | ZFCP_DEFINE_ADAPTER_ATTR(fc_topology, "%s\n", | ||
| 74 | fc_topologies[adapter->fc_topology]); | ||
| 75 | ZFCP_DEFINE_ADAPTER_ATTR(hardware_version, "0x%08x\n", | 64 | ZFCP_DEFINE_ADAPTER_ATTR(hardware_version, "0x%08x\n", |
| 76 | adapter->hardware_version); | 65 | adapter->hardware_version); |
| 77 | ZFCP_DEFINE_ADAPTER_ATTR(scsi_host_no, "0x%x\n", adapter->scsi_host_no); | ||
| 78 | ZFCP_DEFINE_ADAPTER_ATTR(in_recovery, "%d\n", atomic_test_mask | 66 | ZFCP_DEFINE_ADAPTER_ATTR(in_recovery, "%d\n", atomic_test_mask |
| 79 | (ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status)); | 67 | (ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status)); |
| 80 | 68 | ||
| @@ -259,9 +247,6 @@ static struct attribute *zfcp_adapter_attrs[] = { | |||
| 259 | &dev_attr_physical_s_id.attr, | 247 | &dev_attr_physical_s_id.attr, |
| 260 | &dev_attr_card_version.attr, | 248 | &dev_attr_card_version.attr, |
| 261 | &dev_attr_lic_version.attr, | 249 | &dev_attr_lic_version.attr, |
| 262 | &dev_attr_fc_service_class.attr, | ||
| 263 | &dev_attr_fc_topology.attr, | ||
| 264 | &dev_attr_scsi_host_no.attr, | ||
| 265 | &dev_attr_status.attr, | 250 | &dev_attr_status.attr, |
| 266 | &dev_attr_hardware_version.attr, | 251 | &dev_attr_hardware_version.attr, |
| 267 | NULL | 252 | NULL |
diff --git a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c index c55e82d91deb..3924eb38805c 100644 --- a/drivers/s390/scsi/zfcp_sysfs_port.c +++ b/drivers/s390/scsi/zfcp_sysfs_port.c | |||
| @@ -65,8 +65,6 @@ static ssize_t zfcp_sysfs_port_##_name##_show(struct device *dev, struct device_ | |||
| 65 | static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_port_##_name##_show, NULL); | 65 | static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_port_##_name##_show, NULL); |
| 66 | 66 | ||
| 67 | ZFCP_DEFINE_PORT_ATTR(status, "0x%08x\n", atomic_read(&port->status)); | 67 | ZFCP_DEFINE_PORT_ATTR(status, "0x%08x\n", atomic_read(&port->status)); |
| 68 | ZFCP_DEFINE_PORT_ATTR(wwnn, "0x%016llx\n", port->wwnn); | ||
| 69 | ZFCP_DEFINE_PORT_ATTR(d_id, "0x%06x\n", port->d_id); | ||
| 70 | ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask | 68 | ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask |
| 71 | (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)); | 69 | (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)); |
| 72 | ZFCP_DEFINE_PORT_ATTR(access_denied, "%d\n", atomic_test_mask | 70 | ZFCP_DEFINE_PORT_ATTR(access_denied, "%d\n", atomic_test_mask |
| @@ -245,8 +243,6 @@ static struct attribute *zfcp_port_common_attrs[] = { | |||
| 245 | &dev_attr_failed.attr, | 243 | &dev_attr_failed.attr, |
| 246 | &dev_attr_in_recovery.attr, | 244 | &dev_attr_in_recovery.attr, |
| 247 | &dev_attr_status.attr, | 245 | &dev_attr_status.attr, |
| 248 | &dev_attr_wwnn.attr, | ||
| 249 | &dev_attr_d_id.attr, | ||
| 250 | &dev_attr_access_denied.attr, | 246 | &dev_attr_access_denied.attr, |
| 251 | NULL | 247 | NULL |
| 252 | }; | 248 | }; |
diff --git a/drivers/s390/scsi/zfcp_sysfs_unit.c b/drivers/s390/scsi/zfcp_sysfs_unit.c index 0556642c9e1d..2f50815f65c7 100644 --- a/drivers/s390/scsi/zfcp_sysfs_unit.c +++ b/drivers/s390/scsi/zfcp_sysfs_unit.c | |||
| @@ -65,7 +65,6 @@ static ssize_t zfcp_sysfs_unit_##_name##_show(struct device *dev, struct device_ | |||
| 65 | static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_unit_##_name##_show, NULL); | 65 | static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_unit_##_name##_show, NULL); |
| 66 | 66 | ||
| 67 | ZFCP_DEFINE_UNIT_ATTR(status, "0x%08x\n", atomic_read(&unit->status)); | 67 | ZFCP_DEFINE_UNIT_ATTR(status, "0x%08x\n", atomic_read(&unit->status)); |
| 68 | ZFCP_DEFINE_UNIT_ATTR(scsi_lun, "0x%x\n", unit->scsi_lun); | ||
| 69 | ZFCP_DEFINE_UNIT_ATTR(in_recovery, "%d\n", atomic_test_mask | 68 | ZFCP_DEFINE_UNIT_ATTR(in_recovery, "%d\n", atomic_test_mask |
| 70 | (ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)); | 69 | (ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)); |
| 71 | ZFCP_DEFINE_UNIT_ATTR(access_denied, "%d\n", atomic_test_mask | 70 | ZFCP_DEFINE_UNIT_ATTR(access_denied, "%d\n", atomic_test_mask |
| @@ -138,7 +137,6 @@ static DEVICE_ATTR(failed, S_IWUSR | S_IRUGO, zfcp_sysfs_unit_failed_show, | |||
| 138 | zfcp_sysfs_unit_failed_store); | 137 | zfcp_sysfs_unit_failed_store); |
| 139 | 138 | ||
| 140 | static struct attribute *zfcp_unit_attrs[] = { | 139 | static struct attribute *zfcp_unit_attrs[] = { |
| 141 | &dev_attr_scsi_lun.attr, | ||
| 142 | &dev_attr_failed.attr, | 140 | &dev_attr_failed.attr, |
| 143 | &dev_attr_in_recovery.attr, | 141 | &dev_attr_in_recovery.attr, |
| 144 | &dev_attr_status.attr, | 142 | &dev_attr_status.attr, |
