aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2006-10-11 09:31:41 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-10-11 09:31:41 -0400
commite7769b48a0216d7262fe2ba59b1b3697be462cbb (patch)
treea46d8a60d428c24183309ec5de08676ffc504191 /drivers/s390/cio/chsc.c
parent789642680518b28e7dc13f96061460a8238ec622 (diff)
[S390] cio: Remove grace period for vary off chpid.
The grace period handling introduced needless complexity. It didn't help the dasd driver (which can handle terminated I/O just well), and it doesn't help for long running channel programs (which won't complete during the grace period anyway). Terminating I/O using a path that just disappeared immediately is much more consistent with what the user expects. 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.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 07c7f19339d2..eabe018d348f 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -707,8 +707,7 @@ chp_process_crw(int chpid, int on)
707 return chp_add(chpid); 707 return chp_add(chpid);
708} 708}
709 709
710static inline int 710static inline int check_for_io_on_path(struct subchannel *sch, int index)
711__check_for_io_and_kill(struct subchannel *sch, int index)
712{ 711{
713 int cc; 712 int cc;
714 713
@@ -718,10 +717,8 @@ __check_for_io_and_kill(struct subchannel *sch, int index)
718 cc = stsch(sch->schid, &sch->schib); 717 cc = stsch(sch->schid, &sch->schib);
719 if (cc) 718 if (cc)
720 return 0; 719 return 0;
721 if (sch->schib.scsw.actl && sch->schib.pmcw.lpum == (0x80 >> index)) { 720 if (sch->schib.scsw.actl && sch->schib.pmcw.lpum == (0x80 >> index))
722 device_set_waiting(sch);
723 return 1; 721 return 1;
724 }
725 return 0; 722 return 0;
726} 723}
727 724
@@ -750,12 +747,10 @@ __s390_subchannel_vary_chpid(struct subchannel *sch, __u8 chpid, int on)
750 } else { 747 } else {
751 sch->opm &= ~(0x80 >> chp); 748 sch->opm &= ~(0x80 >> chp);
752 sch->lpm &= ~(0x80 >> chp); 749 sch->lpm &= ~(0x80 >> chp);
753 /* 750 if (check_for_io_on_path(sch, chp))
754 * Give running I/O a grace period in which it 751 /* Path verification is done after killing. */
755 * can successfully terminate, even using the 752 device_kill_io(sch);
756 * just varied off path. Then kill it. 753 else if (!sch->lpm) {
757 */
758 if (!__check_for_io_and_kill(sch, chp) && !sch->lpm) {
759 if (css_enqueue_subchannel_slow(sch->schid)) { 754 if (css_enqueue_subchannel_slow(sch->schid)) {
760 css_clear_subchannel_slow_list(); 755 css_clear_subchannel_slow_list();
761 need_rescan = 1; 756 need_rescan = 1;