Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
[firefly-linux-kernel-4.4.55.git] / drivers / s390 / scsi / zfcp_erp.c
index fdc9b4352a6493e888ffb9ac4535619c2b379bc9..e50ea465bc2b993b44829a7d1554259e475fa2da 100644 (file)
@@ -880,6 +880,7 @@ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act)
                                zfcp_port_put(port);
                        return ZFCP_ERP_CONTINUES;
                }
+               /* fall through */
        case ZFCP_ERP_STEP_NAMESERVER_LOOKUP:
                if (!port->d_id)
                        return ZFCP_ERP_FAILED;
@@ -894,8 +895,13 @@ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act)
                                act->step = ZFCP_ERP_STEP_PORT_CLOSING;
                                return ZFCP_ERP_CONTINUES;
                        }
-               /* fall through otherwise */
                }
+               if (port->d_id && !(p_status & ZFCP_STATUS_COMMON_NOESC)) {
+                       port->d_id = 0;
+                       _zfcp_erp_port_reopen(port, 0, "erpsoc1", NULL);
+                       return ZFCP_ERP_EXIT;
+               }
+               /* fall through otherwise */
        }
        return ZFCP_ERP_FAILED;
 }