]> Pileus Git - ~andy/linux/commitdiff
[SCSI] isci: Fix IO fails when pull cable from phy in x4 wideport in MPC mode.
authorMarcin Tomczak <marcin.tomczak@intel.com>
Wed, 4 Jan 2012 09:33:15 +0000 (01:33 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 16 Jan 2012 07:45:19 +0000 (11:45 +0400)
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>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/isci/port.c

index ac7f27749f975761a1beefc7f1b1741a5c02e0bc..4cb071d825bb1746a401c978298787268765725d 100644 (file)
@@ -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);