aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2006-12-04 09:41:01 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-04 09:41:01 -0500
commit24cb5b4846ebae5543869b5c596c2650f380df53 (patch)
treefd45cf7fab0a065c7529c5811e3258a66e877095 /drivers/s390/cio/chsc.c
parent9163bb2e556f6c7879961df94540f0879db4717b (diff)
[S390] cio: Use path verification for last path gone after vary off.
If the last path to a device is gone after a chpid has been varied off, putting it on the slow queue doesn't prevent a device driver from still attempting to use it (it may stay on the slow queue for a long time). Instead, trigger a verify event which will prevent I/O attempts from the device driver immediately. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r--drivers/s390/cio/chsc.c22
1 files changed, 12 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);