scsi: mpt3sas: Fix secure erase premature termination
authorAndrey Grodzovsky <andrey2805@gmail.com>
Thu, 10 Nov 2016 14:35:27 +0000 (09:35 -0500)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:14:45 +0000 (13:14 +0000)
commit16e7cb53bfc5984b3c97c51cc7180e93092c219d
tree8736cdfcca5ccb6a3396e0127930ce36a2ace0b5
parentfed5dd9f03325743b83102872c984b18aa7e4d8d
scsi: mpt3sas: Fix secure erase premature termination

commit 18f6084a989ba1b38702f9af37a2e4049a924be6 upstream.

This is a work around for a bug with LSI Fusion MPT SAS2 when perfoming
secure erase. Due to the very long time the operation takes, commands
issued during the erase will time out and will trigger execution of the
abort hook. Even though the abort hook is called for the specific
command which timed out, this leads to entire device halt
(scsi_state terminated) and premature termination of the secure erase.

Set device state to busy while ATA passthrough commands are in progress.

[mkp: hand applied to 4.9/scsi-fixes, tweaked patch description]

Signed-off-by: Andrey Grodzovsky <andrey2805@gmail.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Cc: <linux-scsi@vger.kernel.org>
Cc: Sathya Prakash <sathya.prakash@broadcom.com>
Cc: Chaitra P B <chaitra.basappa@broadcom.com>
Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
Cc: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/scsi/mpt3sas/mpt3sas_scsih.c