aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2009-12-07 06:51:29 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:31 -0500
commit4257aaecffab77bad43e12057f56a5590b360f9f (patch)
treea49d05ed96cd98218338cbddcc937d6658a2aa62 /drivers/s390
parent350e91207bc9c6a464c22b9e0e30d21dfc07efe3 (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')
-rw-r--r--drivers/s390/cio/device.c58
-rw-r--r--drivers/s390/cio/device.h1
-rw-r--r--drivers/s390/cio/device_fsm.c27
-rw-r--r--drivers/s390/cio/device_ops.c3
-rw-r--r--drivers/s390/cio/device_status.c3
-rw-r--r--drivers/s390/cio/io_sch.h1
6 files changed, 18 insertions, 75 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
1071static 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
1080static 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
1101static void io_subchannel_terminate_path(struct subchannel *sch, u8 mask) 1071static 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;
1089out:
1090 /* Trigger path verification. */
1091 dev_fsm_event(cdev, DEV_EVENT_VERIFY);
1092 return;
1119 1093
1094err:
1095 dev_fsm_event(cdev, DEV_EVENT_NOTOPER);
1120} 1096}
1121 1097
1122static int io_subchannel_chp_event(struct subchannel *sch, 1098static int io_subchannel_chp_event(struct subchannel *sch,
diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h
index ac6f55b4b74c..4e1775cf9739 100644
--- a/drivers/s390/cio/device.h
+++ b/drivers/s390/cio/device.h
@@ -21,7 +21,6 @@ enum dev_state {
21 DEV_STATE_DISBAND_PGID, 21 DEV_STATE_DISBAND_PGID,
22 DEV_STATE_BOXED, 22 DEV_STATE_BOXED,
23 /* states to wait for i/o completion before doing something */ 23 /* states to wait for i/o completion before doing something */
24 DEV_STATE_CLEAR_VERIFY,
25 DEV_STATE_TIMEOUT_KILL, 24 DEV_STATE_TIMEOUT_KILL,
26 DEV_STATE_QUIESCE, 25 DEV_STATE_QUIESCE,
27 /* special states for devices gone not operational */ 26 /* special states for devices gone not operational */
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index c7439f5500f8..349d8c52c0d0 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -771,12 +771,6 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event)
771 */ 771 */
772 if (scsw_fctl(&irb->scsw) & 772 if (scsw_fctl(&irb->scsw) &
773 (SCSW_FCTL_CLEAR_FUNC | SCSW_FCTL_HALT_FUNC)) { 773 (SCSW_FCTL_CLEAR_FUNC | SCSW_FCTL_HALT_FUNC)) {
774 /* Retry Basic Sense if requested. */
775 if (cdev->private->flags.intretry) {
776 cdev->private->flags.intretry = 0;
777 ccw_device_do_sense(cdev, irb);
778 return;
779 }
780 cdev->private->flags.dosense = 0; 774 cdev->private->flags.dosense = 0;
781 memset(&cdev->private->irb, 0, sizeof(struct irb)); 775 memset(&cdev->private->irb, 0, sizeof(struct irb));
782 ccw_device_accumulate_irb(cdev, irb); 776 ccw_device_accumulate_irb(cdev, irb);
@@ -800,21 +794,6 @@ call_handler:
800} 794}
801 795
802static void 796static void
803ccw_device_clear_verify(struct ccw_device *cdev, enum dev_event dev_event)
804{
805 struct irb *irb;
806
807 irb = (struct irb *) __LC_IRB;
808 /* Accumulate status. We don't do basic sense. */
809 ccw_device_accumulate_irb(cdev, irb);
810 /* Remember to clear irb to avoid residuals. */
811 memset(&cdev->private->irb, 0, sizeof(struct irb));
812 /* Try to start delayed device verification. */
813 ccw_device_online_verify(cdev, 0);
814 /* Note: Don't call handler for cio initiated clear! */
815}
816
817static void
818ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event) 797ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event)
819{ 798{
820 struct subchannel *sch; 799 struct subchannel *sch;
@@ -1069,12 +1048,6 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = {
1069 [DEV_EVENT_VERIFY] = ccw_device_nop, 1048 [DEV_EVENT_VERIFY] = ccw_device_nop,
1070 }, 1049 },
1071 /* states to wait for i/o completion before doing something */ 1050 /* states to wait for i/o completion before doing something */
1072 [DEV_STATE_CLEAR_VERIFY] = {
1073 [DEV_EVENT_NOTOPER] = ccw_device_generic_notoper,
1074 [DEV_EVENT_INTERRUPT] = ccw_device_clear_verify,
1075 [DEV_EVENT_TIMEOUT] = ccw_device_nop,
1076 [DEV_EVENT_VERIFY] = ccw_device_nop,
1077 },
1078 [DEV_STATE_TIMEOUT_KILL] = { 1051 [DEV_STATE_TIMEOUT_KILL] = {
1079 [DEV_EVENT_NOTOPER] = ccw_device_generic_notoper, 1052 [DEV_EVENT_NOTOPER] = ccw_device_generic_notoper,
1080 [DEV_EVENT_INTERRUPT] = ccw_device_killing_irq, 1053 [DEV_EVENT_INTERRUPT] = ccw_device_killing_irq,
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c
index 2d0efee8a290..5ab90ec42318 100644
--- a/drivers/s390/cio/device_ops.c
+++ b/drivers/s390/cio/device_ops.c
@@ -167,8 +167,7 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
167 return -EINVAL; 167 return -EINVAL;
168 if (cdev->private->state == DEV_STATE_NOT_OPER) 168 if (cdev->private->state == DEV_STATE_NOT_OPER)
169 return -ENODEV; 169 return -ENODEV;
170 if (cdev->private->state == DEV_STATE_VERIFY || 170 if (cdev->private->state == DEV_STATE_VERIFY) {
171 cdev->private->state == DEV_STATE_CLEAR_VERIFY) {
172 /* Remember to fake irb when finished. */ 171 /* Remember to fake irb when finished. */
173 if (!cdev->private->flags.fake_irb) { 172 if (!cdev->private->flags.fake_irb) {
174 cdev->private->flags.fake_irb = 1; 173 cdev->private->flags.fake_irb = 1;
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c
index 5814dbee2410..66d8066ef22a 100644
--- a/drivers/s390/cio/device_status.c
+++ b/drivers/s390/cio/device_status.c
@@ -336,9 +336,6 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb)
336 sense_ccw->count = SENSE_MAX_COUNT; 336 sense_ccw->count = SENSE_MAX_COUNT;
337 sense_ccw->flags = CCW_FLAG_SLI; 337 sense_ccw->flags = CCW_FLAG_SLI;
338 338
339 /* Reset internal retry indication. */
340 cdev->private->flags.intretry = 0;
341
342 rc = cio_start(sch, sense_ccw, 0xff); 339 rc = cio_start(sch, sense_ccw, 0xff);
343 if (rc == -ENODEV || rc == -EACCES) 340 if (rc == -ENODEV || rc == -EACCES)
344 dev_fsm_event(cdev, DEV_EVENT_VERIFY); 341 dev_fsm_event(cdev, DEV_EVENT_VERIFY);
diff --git a/drivers/s390/cio/io_sch.h b/drivers/s390/cio/io_sch.h
index 78b5ad980cf3..8942dc092d0a 100644
--- a/drivers/s390/cio/io_sch.h
+++ b/drivers/s390/cio/io_sch.h
@@ -165,7 +165,6 @@ struct ccw_device_private {
165 unsigned int donotify:1; /* call notify function */ 165 unsigned int donotify:1; /* call notify function */
166 unsigned int recog_done:1; /* dev. recog. complete */ 166 unsigned int recog_done:1; /* dev. recog. complete */
167 unsigned int fake_irb:1; /* deliver faked irb */ 167 unsigned int fake_irb:1; /* deliver faked irb */
168 unsigned int intretry:1; /* retry internal operation */
169 unsigned int resuming:1; /* recognition while resume */ 168 unsigned int resuming:1; /* recognition while resume */
170 unsigned int pgid_rdy:1; /* pgids are ready */ 169 unsigned int pgid_rdy:1; /* pgids are ready */
171 } __attribute__((packed)) flags; 170 } __attribute__((packed)) flags;