|
@@ -472,6 +472,7 @@ EXPORT_SYMBOL_GPL(cio_enable_subchannel);
|
|
int cio_disable_subchannel(struct subchannel *sch)
|
|
int cio_disable_subchannel(struct subchannel *sch)
|
|
{
|
|
{
|
|
char dbf_txt[15];
|
|
char dbf_txt[15];
|
|
|
|
+ int retry;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
CIO_TRACE_EVENT (2, "dissch");
|
|
CIO_TRACE_EVENT (2, "dissch");
|
|
@@ -482,16 +483,17 @@ int cio_disable_subchannel(struct subchannel *sch)
|
|
if (cio_update_schib(sch))
|
|
if (cio_update_schib(sch))
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
- if (scsw_actl(&sch->schib.scsw) != 0)
|
|
|
|
- /*
|
|
|
|
- * the disable function must not be called while there are
|
|
|
|
- * requests pending for completion !
|
|
|
|
- */
|
|
|
|
- return -EBUSY;
|
|
|
|
-
|
|
|
|
sch->config.ena = 0;
|
|
sch->config.ena = 0;
|
|
- ret = cio_commit_config(sch);
|
|
|
|
|
|
|
|
|
|
+ for (retry = 0; retry < 3; retry++) {
|
|
|
|
+ ret = cio_commit_config(sch);
|
|
|
|
+ if (ret == -EBUSY) {
|
|
|
|
+ struct irb irb;
|
|
|
|
+ if (tsch(sch->schid, &irb) != 0)
|
|
|
|
+ break;
|
|
|
|
+ } else
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
sprintf (dbf_txt, "ret:%d", ret);
|
|
sprintf (dbf_txt, "ret:%d", ret);
|
|
CIO_TRACE_EVENT (2, dbf_txt);
|
|
CIO_TRACE_EVENT (2, dbf_txt);
|
|
return ret;
|
|
return ret;
|