aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/cio/chsc.c22
-rw-r--r--drivers/s390/cio/css.h1
-rw-r--r--drivers/s390/cio/device_fsm.c11
3 files changed, 24 insertions, 10 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 9d92540bd99e..11900de94cb3 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -744,20 +744,22 @@ __s390_subchannel_vary_chpid(struct subchannel *sch, __u8 chpid, int on)
744 device_trigger_reprobe(sch); 744 device_trigger_reprobe(sch);
745 else if (sch->driver && sch->driver->verify) 745 else if (sch->driver && sch->driver->verify)
746 sch->driver->verify(&sch->dev); 746 sch->driver->verify(&sch->dev);
747 } else { 747 break;
748 sch->opm &= ~(0x80 >> chp); 748 }
749 sch->lpm &= ~(0x80 >> chp); 749 sch->opm &= ~(0x80 >> chp);
750 if (check_for_io_on_path(sch, chp)) 750 sch->lpm &= ~(0x80 >> chp);
751 /* Path verification is done after killing. */ 751 if (check_for_io_on_path(sch, chp))
752 device_kill_io(sch); 752 /* Path verification is done after killing. */
753 else if (!sch->lpm) { 753 device_kill_io(sch);
754 else if (!sch->lpm) {
755 if (device_trigger_verify(sch) != 0) {
754 if (css_enqueue_subchannel_slow(sch->schid)) { 756 if (css_enqueue_subchannel_slow(sch->schid)) {
755 css_clear_subchannel_slow_list(); 757 css_clear_subchannel_slow_list();
756 need_rescan = 1; 758 need_rescan = 1;
757 } 759 }
758 } else if (sch->driver && sch->driver->verify) 760 }
759 sch->driver->verify(&sch->dev); 761 } else if (sch->driver && sch->driver->verify)
760 } 762 sch->driver->verify(&sch->dev);
761 break; 763 break;
762 } 764 }
763 spin_unlock_irqrestore(&sch->lock, flags); 765 spin_unlock_irqrestore(&sch->lock, flags);
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h
index 4c2ff8336288..da73453fa54b 100644
--- a/drivers/s390/cio/css.h
+++ b/drivers/s390/cio/css.h
@@ -171,6 +171,7 @@ void device_trigger_reprobe(struct subchannel *);
171/* Helper functions for vary on/off. */ 171/* Helper functions for vary on/off. */
172int device_is_online(struct subchannel *); 172int device_is_online(struct subchannel *);
173void device_kill_io(struct subchannel *); 173void device_kill_io(struct subchannel *);
174int device_trigger_verify(struct subchannel *sch);
174 175
175/* Machine check helper function. */ 176/* Machine check helper function. */
176void device_kill_pending_timer(struct subchannel *); 177void device_kill_pending_timer(struct subchannel *);
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index de3d0857db9f..7665000e8dfe 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -59,6 +59,17 @@ device_set_disconnected(struct subchannel *sch)
59 cdev->private->state = DEV_STATE_DISCONNECTED; 59 cdev->private->state = DEV_STATE_DISCONNECTED;
60} 60}
61 61
62int device_trigger_verify(struct subchannel *sch)
63{
64 struct ccw_device *cdev;
65
66 cdev = sch->dev.driver_data;
67 if (!cdev || !cdev->online)
68 return -EINVAL;
69 dev_fsm_event(cdev, DEV_EVENT_VERIFY);
70 return 0;
71}
72
62/* 73/*
63 * Timeout function. It just triggers a DEV_EVENT_TIMEOUT. 74 * Timeout function. It just triggers a DEV_EVENT_TIMEOUT.
64 */ 75 */