diff options
author | James Smart <james.smart@emulex.com> | 2010-06-07 15:24:45 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:34 -0400 |
commit | 2a9bf3d011303d8da64cd5e0e7fdd95f0c143984 (patch) | |
tree | fbec390538ff91adb0bee7116b3627524134db01 /drivers/scsi/lpfc/lpfc_attr.c | |
parent | 98fc5dd952ecfd3abff7c06e7a55a5eab4dd95b7 (diff) |
[SCSI] lpfc 8.3.13: Add TX Queue Support for SLI4 ELS commands.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index b17fe5149e38..39b0760c438d 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -1949,6 +1949,59 @@ static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL); | |||
1949 | LPFC_ATTR_R(suppress_link_up, LPFC_INITIALIZE_LINK, LPFC_INITIALIZE_LINK, | 1949 | LPFC_ATTR_R(suppress_link_up, LPFC_INITIALIZE_LINK, LPFC_INITIALIZE_LINK, |
1950 | LPFC_DELAY_INIT_LINK_INDEFINITELY, | 1950 | LPFC_DELAY_INIT_LINK_INDEFINITELY, |
1951 | "Suppress Link Up at initialization"); | 1951 | "Suppress Link Up at initialization"); |
1952 | /* | ||
1953 | # lpfc_cnt: Number of IOCBs allocated for ELS, CT, and ABTS | ||
1954 | # 1 - (1024) | ||
1955 | # 2 - (2048) | ||
1956 | # 3 - (3072) | ||
1957 | # 4 - (4096) | ||
1958 | # 5 - (5120) | ||
1959 | */ | ||
1960 | static ssize_t | ||
1961 | lpfc_iocb_hw_show(struct device *dev, struct device_attribute *attr, char *buf) | ||
1962 | { | ||
1963 | struct Scsi_Host *shost = class_to_shost(dev); | ||
1964 | struct lpfc_hba *phba = ((struct lpfc_vport *) shost->hostdata)->phba; | ||
1965 | |||
1966 | return snprintf(buf, PAGE_SIZE, "%d\n", phba->iocb_max); | ||
1967 | } | ||
1968 | |||
1969 | static DEVICE_ATTR(iocb_hw, S_IRUGO, | ||
1970 | lpfc_iocb_hw_show, NULL); | ||
1971 | static ssize_t | ||
1972 | lpfc_txq_hw_show(struct device *dev, struct device_attribute *attr, char *buf) | ||
1973 | { | ||
1974 | struct Scsi_Host *shost = class_to_shost(dev); | ||
1975 | struct lpfc_hba *phba = ((struct lpfc_vport *) shost->hostdata)->phba; | ||
1976 | |||
1977 | return snprintf(buf, PAGE_SIZE, "%d\n", | ||
1978 | phba->sli.ring[LPFC_ELS_RING].txq_max); | ||
1979 | } | ||
1980 | |||
1981 | static DEVICE_ATTR(txq_hw, S_IRUGO, | ||
1982 | lpfc_txq_hw_show, NULL); | ||
1983 | static ssize_t | ||
1984 | lpfc_txcmplq_hw_show(struct device *dev, struct device_attribute *attr, | ||
1985 | char *buf) | ||
1986 | { | ||
1987 | struct Scsi_Host *shost = class_to_shost(dev); | ||
1988 | struct lpfc_hba *phba = ((struct lpfc_vport *) shost->hostdata)->phba; | ||
1989 | |||
1990 | return snprintf(buf, PAGE_SIZE, "%d\n", | ||
1991 | phba->sli.ring[LPFC_ELS_RING].txcmplq_max); | ||
1992 | } | ||
1993 | |||
1994 | static DEVICE_ATTR(txcmplq_hw, S_IRUGO, | ||
1995 | lpfc_txcmplq_hw_show, NULL); | ||
1996 | |||
1997 | int lpfc_iocb_cnt = 2; | ||
1998 | module_param(lpfc_iocb_cnt, int, 1); | ||
1999 | MODULE_PARM_DESC(lpfc_iocb_cnt, | ||
2000 | "Number of IOCBs alloc for ELS, CT, and ABTS: 1k to 5k IOCBs"); | ||
2001 | lpfc_param_show(iocb_cnt); | ||
2002 | lpfc_param_init(iocb_cnt, 2, 1, 5); | ||
2003 | static DEVICE_ATTR(lpfc_iocb_cnt, S_IRUGO, | ||
2004 | lpfc_iocb_cnt_show, NULL); | ||
1952 | 2005 | ||
1953 | /* | 2006 | /* |
1954 | # lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear | 2007 | # lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear |
@@ -3334,6 +3387,10 @@ struct device_attribute *lpfc_hba_attrs[] = { | |||
3334 | &dev_attr_lpfc_aer_support, | 3387 | &dev_attr_lpfc_aer_support, |
3335 | &dev_attr_lpfc_aer_state_cleanup, | 3388 | &dev_attr_lpfc_aer_state_cleanup, |
3336 | &dev_attr_lpfc_suppress_link_up, | 3389 | &dev_attr_lpfc_suppress_link_up, |
3390 | &dev_attr_lpfc_iocb_cnt, | ||
3391 | &dev_attr_iocb_hw, | ||
3392 | &dev_attr_txq_hw, | ||
3393 | &dev_attr_txcmplq_hw, | ||
3337 | NULL, | 3394 | NULL, |
3338 | }; | 3395 | }; |
3339 | 3396 | ||
@@ -4521,6 +4578,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba) | |||
4521 | lpfc_hba_log_verbose_init(phba, lpfc_log_verbose); | 4578 | lpfc_hba_log_verbose_init(phba, lpfc_log_verbose); |
4522 | lpfc_aer_support_init(phba, lpfc_aer_support); | 4579 | lpfc_aer_support_init(phba, lpfc_aer_support); |
4523 | lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up); | 4580 | lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up); |
4581 | lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt); | ||
4524 | return; | 4582 | return; |
4525 | } | 4583 | } |
4526 | 4584 | ||