mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
[SCSI] isci: fix reset timeout handling
Remove an erroneous BUG_ON() in the case of a hard reset timeout. The reset timeout handler puts the port into the "awaiting link-up" state. The timeout causes the device to be disconnected and we need to be in the awaiting link-up state to re-connect the port. The BUG_ON() made the incorrect assumption that resets never timeout and we always complete the reset in the "resetting" state. Testing this patch also uncovered that libata continues to attempt to reset the port long after the driver has torn down the context. Once the driver has committed to abandoning the link it must indicate to libata that recovery ends by returning -ENODEV from ->lldd_I_T_nexus_reset(). Cc: <stable@vger.kernel.org> Acked-by: Lukasz Dorau <lukasz.dorau@intel.com> Reported-by: David Milburn <dmilburn@redhat.com> Reported-by: Xun Ni <xun.ni@intel.com> Tested-by: Xun Ni <xun.ni@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
126e964a44
commit
ddfadd7736
@ -615,13 +615,6 @@ static void sci_apc_agent_link_up(struct isci_host *ihost,
|
||||
SCIC_SDS_APC_WAIT_LINK_UP_NOTIFICATION);
|
||||
} else {
|
||||
/* 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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user