[PATCH] isci: fix reset timeout handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove an erroneous BUG_ON() in the case of a hard reset timeout.  If a
SATA device is unable to restore the link in time we expect the port to
go back to the "awaiting link-up" state.  Since the timeout path
notified libsas that the port is down, we want to notify libsas when it
returns and expect that the port may not be in the "resetting" state.

Also, once we have notified that the port is down, in-progress resets should
abort immediately.  Return -ENODEV from ->lldd_I_T_nexus_reset() to indicate
that libata error handling should end.

Cc: <stable@xxxxxxxxxxxxxxx>
Reported-by: Xun Ni <xun.ni@xxxxxxxxx>
Tested-by: Xun Ni <xun.ni@xxxxxxxxx>
Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
---
 drivers/scsi/isci/port_config.c |    5 -----
 drivers/scsi/isci/task.c        |    2 +-
 2 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/isci/port_config.c b/drivers/scsi/isci/port_config.c
index 85c77f6b802b..4b84d204db01 100644
--- a/drivers/scsi/isci/port_config.c
+++ b/drivers/scsi/isci/port_config.c
@@ -617,11 +617,6 @@ static void sci_apc_agent_link_up(struct isci_host *ihost,
 		/* the phy is already the part of the port */
 		u32 port_state = iport->sm.current_state_id;
 
-		/* if the PORT'S state is resetting then the link up is from
-		 * port hard reset in this case, we need to tell the port
-		 * that link up is recieved
-		 */
-		BUG_ON(port_state != SCI_PORT_RESETTING);
 		port_agent->phy_ready_mask |= 1 << phy_index;
 		sci_port_link_up(iport, iphy);
 	}
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 0d30ca849e8f..5d6fda72d659 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -801,7 +801,7 @@ int isci_task_I_T_nexus_reset(struct domain_device *dev)
 		/* XXX: need to cleanup any ireqs targeting this
 		 * domain_device
 		 */
-		ret = TMF_RESP_FUNC_COMPLETE;
+		ret = -ENODEV;
 		goto out;
 	}
 

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]