scsi: pm80xx: Fix double completion for SATA devices
authorAjish Koshy <Ajish.Koshy@microchip.com>
Mon, 24 Jan 2022 08:22:55 +0000 (13:52 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 31 Jan 2022 17:14:49 +0000 (12:14 -0500)
commitc26b85ea16365079be8d206b20556a60a0c69ad4
tree82eaac4ada83a7d7081c22bb12249a4785a3a1d9
parent4db09593af0b0b4d7d4805ebb3273df51d7cc30d
scsi: pm80xx: Fix double completion for SATA devices

Current code handles completions for SATA devices in mpi_sata_completion()
and mpi_sata_event().

However, at the time when any SATA event happens, for almost all the event
types, the command is still in the target. It is therefore incorrect to
complete the task in sata_event().

There are some events for which we get sata_completions, some need recovery
procedure and others abort. All the tasks must be completed via
sata_completion() path.

Removed the task done related code from sata_events().  For tasks where we
don't get completions, let top layer call abort() to abort the command post
timeout.

Link: https://lore.kernel.org/r/20220124082255.86223-1-Ajish.Koshy@microchip.com
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Co-developed-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Ajish Koshy <Ajish.Koshy@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_hwi.c
drivers/scsi/pm8001/pm80xx_hwi.c