[SCSI] qla4xxx: Use correct value for max flash node entries
authorAdheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Fri, 5 Apr 2013 11:06:08 +0000 (07:06 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 11 Apr 2013 23:51:19 +0000 (16:51 -0700)
Use correct value for max flash node entries supported
based on adapter type.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_os.c

index f82efcb..a47f999 100644 (file)
@@ -5587,7 +5587,7 @@ static int qla4xxx_sysfs_ddb_add(struct Scsi_Host *shost, const char *buf,
                goto exit_ddb_add;
        }
 
-       max_ddbs =  is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX :
+       max_ddbs =  is_qla40XX(ha) ? MAX_PRST_DEV_DB_ENTRIES :
                                     MAX_DEV_DB_ENTRIES;
 
        fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry),
@@ -6707,7 +6707,7 @@ static int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha)
                return -ENOMEM;
        }
 
-       max_ddbs =  is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX :
+       max_ddbs =  is_qla40XX(ha) ? MAX_PRST_DEV_DB_ENTRIES :
                                     MAX_DEV_DB_ENTRIES;
 
        for (idx = 0; idx < max_ddbs; idx++) {