scsi: pm80xx: Port reset timeout error handling correction
authorAjish Koshy <Ajish.Koshy@microchip.com>
Tue, 28 Dec 2021 11:17:53 +0000 (16:47 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 5 Jan 2022 05:52:48 +0000 (00:52 -0500)
commitee05cb71f9f7eb0c257f6b80b70edb4659151b26
treec9b627bce66880c8c369e1bfb6d287b06f10a915
parent3bb3c24e268ab64305eec670be253eef2238b013
scsi: pm80xx: Port reset timeout error handling correction

Error handling steps were not in sequence as per the programmers
manual. Expected sequence:

 - PHY_DOWN (PORT_IN_RESET)

 - PORT_RESET_TIMER_TMO

 - Host aborts pending I/Os

 - Host deregister the device

 - Host sends HW_EVENT_PHY_DOWN ACK

Previously we were sending HW_EVENT_PHY_DOWN ACK first and then deregister
the device. Fix this to use the expected sequence.

Link: https://lore.kernel.org/r/20211228111753.10802-1-Ajish.Koshy@microchip.com
Signed-off-by: Ajish Koshy <Ajish.Koshy@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_sas.c
drivers/scsi/pm8001/pm8001_sas.h
drivers/scsi/pm8001/pm80xx_hwi.c