linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-scsi@vger.kernel.org
Cc: Marcin Tomczak <marcin.tomczak@intel.com>
Subject: [PATCH v2 10/15] isci: Fix IO fails when pull cable from phy in x4 wideport in MPC mode.
Date: Wed, 04 Jan 2012 01:33:15 -0800	[thread overview]
Message-ID: <20120104093315.9147.18799.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20120104093015.9147.24234.stgit@localhost6.localdomain6>

From: Marcin Tomczak <marcin.tomczak@intel.com>

Failure seen pulling a cable from a x4 port configured in manual port
configuration (MPC) mode (MPC mode is set by the the OEM paramaters
provided by the platform or isci_firmware.bin).  While IO running to
devices behind and expander, plugging out the cable from phy is causing
IO failures and IO drops on disks and never recover.

It happens because during link up/down the phy were being taken out of
the port.

Fix: during link down the phy is kept in the same logical port.

Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/scsi/isci/port.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index ac7f277..4cb071d 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -674,9 +674,13 @@ void sci_port_deactivate_phy(struct isci_port *iport, struct isci_phy *iphy,
 
 	iphy->max_negotiated_speed = SAS_LINK_RATE_UNKNOWN;
 
-	/* Re-assign the phy back to the LP as if it were a narrow port */
-	writel(iphy->phy_index,
-		&iport->port_pe_configuration_register[iphy->phy_index]);
+	/* Re-assign the phy back to the LP as if it were a narrow port for APC
+	 * mode. For MPC mode, the phy will remain in the port.
+	 */
+	if (iport->owning_controller->oem_parameters.controller.mode_type ==
+		SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE)
+		writel(iphy->phy_index,
+			&iport->port_pe_configuration_register[iphy->phy_index]);
 
 	if (do_notify_user == true)
 		isci_port_link_down(ihost, iphy, iport);


  parent reply	other threads:[~2012-01-04  9:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04  9:32 [GIT PATCH v2 00/15] isci update for 3.3 (part1) Dan Williams
2012-01-04  9:32 ` [PATCH v2 01/15] isci, firmware: Remove isci fallback parameter blob and generator Dan Williams
2012-01-04  9:32 ` [PATCH v2 02/15] isci: cleanup oem parameter and recipe handling Dan Williams
2012-01-04  9:32 ` [PATCH v2 03/15] isci: update afe (analog-front-end) recipe for C1 Dan Williams
2012-01-04  9:32 ` [PATCH v2 04/15] isci: oem parameter format v1.1 (ssc select) Dan Williams
2012-01-04  9:32 ` [PATCH v2 05/15] isci: oem parameter format v1.3 (cable select) Dan Williams
2012-01-04  9:32 ` [PATCH v2 06/15] isci: performance-fix, shorten default "no outbound task" timeout Dan Williams
2012-01-04  9:33 ` [PATCH v2 07/15] isci: link speeds default to gen 2 Dan Williams
2012-01-04  9:33 ` [PATCH v2 08/15] isci: remove unused 'isci_tmf->device' field Dan Williams
2012-01-04  9:33 ` [PATCH v2 09/15] isci: update version to 1.1 Dan Williams
2012-01-04  9:33 ` Dan Williams [this message]
2012-01-04  9:33 ` [PATCH v2 11/15] isci: enable wide port targets Dan Williams
2012-01-04  9:33 ` [PATCH v2 12/15] isci: allow more time for " Dan Williams
2012-01-04  9:33 ` [PATCH v2 13/15] isci: fix io failures while wide port links are coming up Dan Williams
2012-01-04  9:33 ` [PATCH v2 14/15] isci: fix start OOB Dan Williams
2012-01-04  9:33 ` [PATCH v2 15/15] isci: fix, prevent port from getting stuck in the 'configuring' state Dan Williams
2012-01-06  1:54 ` [GIT PATCH v2 00/15] isci update for 3.3 (part1) Dan Williams

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=20120104093315.9147.18799.stgit@localhost6.localdomain6 \
    --to=dan.j.williams@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=marcin.tomczak@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).