]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] lpfc 8.1.2: Add module parameter to limit number of outstanding commands per...
authorJamie Wellnitz <Jamie.Wellnitz@emulex.com>
Wed, 1 Mar 2006 00:25:21 +0000 (19:25 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Wed, 1 Mar 2006 00:56:23 +0000 (18:56 -0600)
Add module parameter to limit number of outstanding commands per lpfc HBA

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/lpfc/lpfc_attr.c

index 5625a8c2a8fde79eaf3620d0ef1857fe2511f5f1..b897e522a9668e683b518f7f1364b53b473ecb54 100644 (file)
@@ -519,6 +519,16 @@ LPFC_ATTR_HEX_RW(log_verbose, 0x0, 0x0, 0xffff, "Verbose logging bit-mask");
 LPFC_ATTR_R(lun_queue_depth, 30, 1, 128,
            "Max number of FCP commands we can queue to a specific LUN");
 
+/*
+# hba_queue_depth:  This parameter is used to limit the number of outstanding
+# commands per lpfc HBA. Value range is [32,8192]. If this parameter
+# value is greater than the maximum number of exchanges supported by the HBA,
+# then maximum number of exchanges supported by the HBA is used to determine
+# the hba_queue_depth.
+*/
+LPFC_ATTR_R(hba_queue_depth, 8192, 32, 8192,
+           "Max number of FCP commands we can queue to a lpfc HBA");
+
 /*
 # Some disk devices have a "select ID" or "select Target" capability.
 # From a protocol standpoint "select ID" usually means select the
@@ -649,6 +659,7 @@ struct class_device_attribute *lpfc_host_attrs[] = {
        &class_device_attr_lpfc_drvr_version,
        &class_device_attr_lpfc_log_verbose,
        &class_device_attr_lpfc_lun_queue_depth,
+       &class_device_attr_lpfc_hba_queue_depth,
        &class_device_attr_lpfc_nodev_tmo,
        &class_device_attr_lpfc_fcp_class,
        &class_device_attr_lpfc_use_adisc,
@@ -1411,5 +1422,9 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
        default:
                phba->cfg_hba_queue_depth = LPFC_DFT_HBA_Q_DEPTH;
        }
+
+       if (phba->cfg_hba_queue_depth > lpfc_hba_queue_depth)
+               lpfc_hba_queue_depth_init(phba, lpfc_hba_queue_depth);
+
        return;
 }