diff options
author | Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | 2009-12-07 06:51:29 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 06:51:31 -0500 |
commit | 4257aaecffab77bad43e12057f56a5590b360f9f (patch) | |
tree | a49d05ed96cd98218338cbddcc937d6658a2aa62 /drivers/s390/cio/device.c | |
parent | 350e91207bc9c6a464c22b9e0e30d21dfc07efe3 (diff) |
[S390] cio: remove intretry flag
After changing all internal I/O functions to use the newly introduced
ccw request infrastructure, retries are handled automatically after a
clear operation. Therefore remove the internal retry flag and
associated code.
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 58 |
1 files changed, 17 insertions, 41 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 9af864f615b0..e24b9b1d1022 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -1068,36 +1068,6 @@ static void io_subchannel_verify(struct subchannel *sch) | |||
1068 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | 1068 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); |
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | static int check_for_io_on_path(struct subchannel *sch, int mask) | ||
1072 | { | ||
1073 | if (cio_update_schib(sch)) | ||
1074 | return 0; | ||
1075 | if (scsw_actl(&sch->schib.scsw) && sch->schib.pmcw.lpum == mask) | ||
1076 | return 1; | ||
1077 | return 0; | ||
1078 | } | ||
1079 | |||
1080 | static void terminate_internal_io(struct subchannel *sch, | ||
1081 | struct ccw_device *cdev) | ||
1082 | { | ||
1083 | if (cio_clear(sch)) { | ||
1084 | /* Recheck device in case clear failed. */ | ||
1085 | sch->lpm = 0; | ||
1086 | if (cdev->online) | ||
1087 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | ||
1088 | else | ||
1089 | css_schedule_eval(sch->schid); | ||
1090 | return; | ||
1091 | } | ||
1092 | cdev->private->state = DEV_STATE_CLEAR_VERIFY; | ||
1093 | /* Request retry of internal operation. */ | ||
1094 | cdev->private->flags.intretry = 1; | ||
1095 | /* Call handler. */ | ||
1096 | if (cdev->handler) | ||
1097 | cdev->handler(cdev, cdev->private->intparm, | ||
1098 | ERR_PTR(-EIO)); | ||
1099 | } | ||
1100 | |||
1101 | static void io_subchannel_terminate_path(struct subchannel *sch, u8 mask) | 1071 | static void io_subchannel_terminate_path(struct subchannel *sch, u8 mask) |
1102 | { | 1072 | { |
1103 | struct ccw_device *cdev; | 1073 | struct ccw_device *cdev; |
@@ -1105,18 +1075,24 @@ static void io_subchannel_terminate_path(struct subchannel *sch, u8 mask) | |||
1105 | cdev = sch_get_cdev(sch); | 1075 | cdev = sch_get_cdev(sch); |
1106 | if (!cdev) | 1076 | if (!cdev) |
1107 | return; | 1077 | return; |
1108 | if (check_for_io_on_path(sch, mask)) { | 1078 | if (cio_update_schib(sch)) |
1109 | if (cdev->private->state == DEV_STATE_ONLINE) | 1079 | goto err; |
1110 | ccw_device_kill_io(cdev); | 1080 | /* Check for I/O on path. */ |
1111 | else { | 1081 | if (scsw_actl(&sch->schib.scsw) == 0 || sch->schib.pmcw.lpum != mask) |
1112 | terminate_internal_io(sch, cdev); | 1082 | goto out; |
1113 | /* Re-start path verification. */ | 1083 | if (cdev->private->state == DEV_STATE_ONLINE) { |
1114 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | 1084 | ccw_device_kill_io(cdev); |
1115 | } | 1085 | goto out; |
1116 | } else | 1086 | } |
1117 | /* trigger path verification. */ | 1087 | if (cio_clear(sch)) |
1118 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | 1088 | goto err; |
1089 | out: | ||
1090 | /* Trigger path verification. */ | ||
1091 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | ||
1092 | return; | ||
1119 | 1093 | ||
1094 | err: | ||
1095 | dev_fsm_event(cdev, DEV_EVENT_NOTOPER); | ||
1120 | } | 1096 | } |
1121 | 1097 | ||
1122 | static int io_subchannel_chp_event(struct subchannel *sch, | 1098 | static int io_subchannel_chp_event(struct subchannel *sch, |