scsi: aacraid: Prevent E3 lockup when deleting units
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Thu, 16 Feb 2017 20:51:13 +0000 (12:51 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Feb 2017 23:41:41 +0000 (18:41 -0500)
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 <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/commsup.c

index a8dd4b51b086c99181cb7256aa5ccade25cd46db..e221321d97d265ffb005ac46c226e359ac53e433 100644 (file)
@@ -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