All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	Swen Schillig <swen@vnet.ibm.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 7/9] zfcp: Changed D_ID left port disabled
Date: Fri, 15 May 2009 13:18:20 +0200	[thread overview]
Message-ID: <20090515112222.172819000@de.ibm.com> (raw)
In-Reply-To: 20090515111813.314177000@de.ibm.com

[-- Attachment #1: 706-zfcp-changed-D_ID.diff --]
[-- Type: text/plain, Size: 1791 bytes --]

From: Swen Schillig <swen@vnet.ibm.com>

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 <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---

 drivers/s390/scsi/zfcp_erp.c |    7 ++++++-
 drivers/s390/scsi/zfcp_fc.c  |    7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

--- a/drivers/s390/scsi/zfcp_erp.c	2009-05-15 12:56:17.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_erp.c	2009-05-15 12:56:21.000000000 +0200
@@ -895,8 +895,13 @@ static int zfcp_erp_port_strategy_open_c
 				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;
 }
--- a/drivers/s390/scsi/zfcp_fc.c	2009-05-15 12:56:02.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_fc.c	2009-05-15 12:56:21.000000000 +0200
@@ -160,9 +160,14 @@ static void _zfcp_fc_incoming_rscn(struc
 	struct zfcp_port *port;
 
 	read_lock_irqsave(&zfcp_data.config_lock, flags);
-	list_for_each_entry(port, &fsf_req->adapter->port_list_head, list)
+	list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) {
 		if ((port->d_id & range) == (elem->nport_did & range))
 			zfcp_test_link(port);
+		if (!port->d_id)
+			zfcp_erp_port_reopen(port,
+					     ZFCP_STATUS_COMMON_ERP_FAILED,
+					     "fcrscn1", NULL);
+	}
 
 	read_unlock_irqrestore(&zfcp_data.config_lock, flags);
 }

  parent reply	other threads:[~2009-05-15 11:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 11:18 [patch 0/9] zfcp updates for 2.6.31 Christof Schmitt
2009-05-15 11:18 ` [patch 1/9] zfcp: Use correct req_id for traces Christof Schmitt
2009-05-15 11:18 ` [patch 2/9] zfcp: Update message and add description Christof Schmitt
2009-05-15 11:18 ` [patch 3/9] zfcp: Make queue_depth adjustable Christof Schmitt
2009-05-15 11:18 ` [patch 4/9] zfcp: Remove unnecessary default case and assignments Christof Schmitt
2009-05-15 11:18 ` [patch 5/9] zfcp: Add comments to switch/case fallthroughs Christof Schmitt
2009-05-15 11:18 ` [patch 6/9] zfcp: Increase ref counter for port open requests Christof Schmitt
2009-05-15 11:18 ` Christof Schmitt [this message]
2009-05-15 11:18 ` [patch 8/9] zfcp: Keep ccw device and model id in zfcp_ccw.c Christof Schmitt
2009-05-15 11:18 ` [patch 9/9] zfcp: Update FC pass-through support Christof Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090515112222.172819000@de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=swen@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.