From dceab655d9f7d99881c2033c8ff4e1c7b444e104 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Fri, 15 May 2009 13:18:18 +0200 Subject: [SCSI] zfcp: Add comments to switch/case fallthroughs Add comments where there is a deliberate fall through in switch/case statements. This makes some code checkers happy and makes it clear that there is no missing break statement. Reviewed-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_erp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/s390/scsi/zfcp_erp.c') diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index fdc9b4352a6..3f64aded6ca 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -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; -- cgit v1.2.3 From ea460a81919f2b3410e7fb30183c0256d068d87a Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Fri, 15 May 2009 13:18:20 +0200 Subject: [SCSI] zfcp: Changed D_ID left port disabled If the destination ID (D_ID) of a remote storage port changed, e.g. re-plugged cable on the switch in a different switch port, the port was never (re-)attached within Linux. This patch fixes the broken mapping between the WWPN and the D_ID. Signed-off-by: Swen Schillig Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_erp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/s390/scsi/zfcp_erp.c') diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 3f64aded6ca..e50ea465bc2 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -895,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; } -- cgit v1.2.3