scsi: aacraid: Fix 2T+ drives on SmartIOC-2000
authorDave Carroll <david.carroll@microsemi.com>
Fri, 15 Sep 2017 17:04:28 +0000 (11:04 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Sep 2017 19:49:43 +0000 (15:49 -0400)
The logic for supporting large drives was previously tied to 4Kn support
for SmartIOC-2000. As SmartIOC-2000 does not support volumes using 4Kn
drives, use the intended option flag AAC_OPT_NEW_COMM_64 to determine
support for volumes greater than 2T.

Cc: <stable@vger.kernel.org>
Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/aacraid.h

index a64285ab0728f14c870db3d72b19190d516d44f3..af3e4d3f9735fdc3430eea0ea05cc1a78e2fa306 100644 (file)
@@ -699,13 +699,13 @@ static void _aac_probe_container1(void * context, struct fib * fibptr)
        int status;
 
        dresp = (struct aac_mount *) fib_data(fibptr);
-       if (!(fibptr->dev->supplement_adapter_info.supported_options2 &
-           AAC_OPTION_VARIABLE_BLOCK_SIZE))
+       if (!aac_supports_2T(fibptr->dev)) {
                dresp->mnt[0].capacityhigh = 0;
-       if ((le32_to_cpu(dresp->status) != ST_OK) ||
-           (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
-               _aac_probe_container2(context, fibptr);
-               return;
+               if ((le32_to_cpu(dresp->status) == ST_OK) &&
+                       (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
+                       _aac_probe_container2(context, fibptr);
+                       return;
+               }
        }
        scsicmd = (struct scsi_cmnd *) context;
 
index 92fabf2b0c24c4c24f79ae8626d80ef09853816d..403a639574e5ea10c5c8500141204ebc513bd7c1 100644 (file)
@@ -2701,6 +2701,11 @@ static inline int aac_is_src(struct aac_dev *dev)
        return 0;
 }
 
+static inline int aac_supports_2T(struct aac_dev *dev)
+{
+       return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64);
+}
+
 char * get_container_type(unsigned type);
 extern int numacb;
 extern char aac_driver_version[];