From: Raghava Aditya Renukunta Date: Thu, 16 Feb 2017 20:51:13 +0000 (-0800) Subject: scsi: aacraid: Prevent E3 lockup when deleting units X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0c6143e95c5b9e1f2d83e005e4e86ed3dc6096f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git scsi: aacraid: Prevent E3 lockup when deleting units Arrconf management utility at times sends fibs with AdapterProcessed set in its fibs. This causes the controller to panic and lockup. Fixed by failing the commands that have AdapterProcessed set in its flag. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index a8dd4b51b086..e221321d97d2 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -527,6 +527,10 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned))) return -EBUSY; + + if (hw_fib->header.XferState & cpu_to_le32(AdapterProcessed)) + return -EINVAL; + /* * There are 5 cases with the wait and response requested flags. * The only invalid cases are if the caller requests to wait and