]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbeedf20a5b793a3b3f7945423986a26cec30188d
tree82eaac4ada83a7d7081c22bb12249a4785a3a1d9
parent186148ed0d470177accf49229978c1a133253acd
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