22 #include <linux/ctype.h>
24 #include <linux/pci.h>
26 #include <linux/module.h>
29 #include <linux/kernel.h>
31 #include <scsi/scsi.h>
52 #define LPFC_DEF_DEVLOSS_TMO 30
53 #define LPFC_MIN_DEVLOSS_TMO 1
54 #define LPFC_MAX_DEVLOSS_TMO 255
60 #define LPFC_REG_WRITE_KEY_SIZE 4
61 #define LPFC_REG_WRITE_KEY "EMLX"
79 lpfc_jedec_to_ascii(
int incr,
char hdw[])
82 for (i = 0; i < 8; i++) {
85 hdw[7 -
i] = 0x30 +
j;
87 hdw[7 -
i] = 0x61 + j - 10;
144 "BlockGuard Not Supported\n");
147 "BlockGuard Disabled\n");
159 (
unsigned long long)
phba->bg_guard_err_cnt);
171 (
unsigned long long)
phba->bg_apptag_err_cnt);
183 (
unsigned long long)
phba->bg_reftag_err_cnt);
360 if_type =
phba->sli4_hba.pc_sli4_params.if_type;
361 sli_family =
phba->sli4_hba.pc_sli4_params.sli_family;
365 fwrev,
phba->sli_rev);
368 fwrev,
phba->sli_rev, if_type, sli_family);
390 lpfc_jedec_to_ascii(vp->rev.biuRev, hdw);
433 switch (
phba->link_state) {
442 "Link Down - User disabled\n");
455 "Configuring Link\n");
482 " Menlo Maint Mode\n");
545 const char *buf,
size_t count)
553 if ((
strncmp(buf,
"up",
sizeof(
"up") - 1) == 0) &&
556 else if ((
strncmp(buf,
"down",
sizeof(
"down") - 1) == 0) &&
579 lpfc_num_discovered_ports_show(
struct device *dev,
627 (pmboxq->u.mb.mbxStatus == 0 ||
631 phba->cfg_link_speed);
637 "2859 SLI authentication is required "
638 "for INIT_LINK but has not done yet\n");
641 lpfc_set_loopback_flag(
phba);
677 init_completion(&online_compl);
694 pring = &psli->
ring[
i];
700 "0466 Outstanding IO when "
701 "bringing Adapter offline\n");
707 init_completion(&online_compl);
752 init_completion(&online_compl);
789 const char *buf,
size_t count)
799 if (
strncmp(buf,
"selective",
sizeof(
"selective") - 1) == 0)
831 lpfc_readl(phba->
sli4_hba.u.if_type2.STATUSregaddr,
832 &portstat_reg.
word0);
835 if (!
bf_get(lpfc_sliport_status_rn, &portstat_reg) &&
836 !
bf_get(lpfc_sliport_status_err, &portstat_reg))
842 lpfc_readl(phba->
sli4_hba.u.if_type2.STATUSregaddr,
843 &portstat_reg.
word0);
844 if (!
bf_get(lpfc_sliport_status_err, &portstat_reg))
846 if (!
bf_get(lpfc_sliport_status_rn, &portstat_reg))
848 if (!
bf_get(lpfc_sliport_status_rdy, &portstat_reg))
853 if (i < LPFC_FW_RESET_MAXIMUM_WAIT_10MS_CNT)
878 int status = 0, rc = 0;
879 int job_posted = 1, sriov_err;
890 before_fc_flag = phba->
pport->fc_flag;
927 "3150 No privilage to perform the requested "
928 "access: x%x\n", reg_val);
929 }
else if (rc == -
EIO) {
932 "3153 Fail to perform the requested "
933 "access: x%x\n", reg_val);
941 init_completion(&online_compl);
951 if (sriov_nr_virtfn) {
1007 state =
"warm start";
1031 const char *buf,
size_t count)
1037 char *board_mode_str =
NULL;
1043 goto board_mode_out;
1047 "3050 lpfc_board_mode set to %s\n", buf);
1049 init_completion(&online_compl);
1051 if(
strncmp(buf,
"online",
sizeof(
"online") - 1) == 0) {
1056 goto board_mode_out;
1059 }
else if (
strncmp(buf,
"offline",
sizeof(
"offline") - 1) == 0)
1061 else if (
strncmp(buf,
"warm",
sizeof(
"warm") - 1) == 0)
1066 else if (
strncmp(buf,
"error",
sizeof(
"error") - 1) == 0)
1071 else if (
strncmp(buf,
"dump",
sizeof(
"dump") - 1) == 0)
1072 status = lpfc_sli4_pdev_reg_request(phba,
LPFC_FW_DUMP);
1073 else if (
strncmp(buf,
"fw_reset",
sizeof(
"fw_reset") - 1) == 0)
1075 else if (
strncmp(buf,
"dv_reset",
sizeof(
"dv_reset") - 1) == 0)
1084 board_mode_str =
strchr(buf,
'\n');
1086 *board_mode_str =
'\0';
1088 "3097 Failed \"%s\", status(%d), "
1090 buf, status, phba->
pport->fc_flag);
1114 lpfc_get_hba_info(
struct lpfc_hba *phba,
1142 pmb = &pmboxq->
u.
mb;
1147 if (phba->
pport->fc_flag & FC_OFFLINE_MODE)
1159 rd_config = &pmboxq->
u.
mqe.un.rd_config;
1161 *mrpi =
bf_get(lpfc_mbx_rd_conf_rpi_count, rd_config);
1163 *arpi =
bf_get(lpfc_mbx_rd_conf_rpi_count, rd_config) -
1164 phba->
sli4_hba.max_cfg_param.rpi_used;
1166 *mxri =
bf_get(lpfc_mbx_rd_conf_xri_count, rd_config);
1168 *axri =
bf_get(lpfc_mbx_rd_conf_xri_count, rd_config) -
1169 phba->
sli4_hba.max_cfg_param.xri_used;
1174 max_vpi = (
bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config) > 0) ?
1175 (
bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config) - 1) : 0;
1180 *avpi = max_vpi - phba->
sli4_hba.max_cfg_param.vpi_used;
1434 const char *buf,
size_t count)
1456 "3051 lpfc_poll changed from %d to %d\n",
1459 spin_lock_irq(&phba->
hbalock);
1465 !(old_val & DISABLE_FCP_RING_INT)) {
1466 if (lpfc_readl(phba->
HCregaddr, &creg_val)) {
1467 spin_unlock_irq(&phba->
hbalock);
1476 }
else if (
val != 0x0) {
1477 spin_unlock_irq(&phba->
hbalock);
1481 if (!(
val & DISABLE_FCP_RING_INT) &&
1482 (old_val & DISABLE_FCP_RING_INT))
1484 spin_unlock_irq(&phba->
hbalock);
1486 spin_lock_irq(&phba->
hbalock);
1487 if (lpfc_readl(phba->
HCregaddr, &creg_val)) {
1488 spin_unlock_irq(&phba->
hbalock);
1498 spin_unlock_irq(&phba->
hbalock);
1576 lpfc_sriov_hw_max_virtfn_show(
struct device *dev,
1603 #define lpfc_param_show(attr) \
1605 lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1608 struct Scsi_Host *shost = class_to_shost(dev);\
1609 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1610 struct lpfc_hba *phba = vport->phba;\
1612 val = phba->cfg_##attr;\
1613 return snprintf(buf, PAGE_SIZE, "%d\n",\
1631 #define lpfc_param_hex_show(attr) \
1633 lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1636 struct Scsi_Host *shost = class_to_shost(dev);\
1637 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1638 struct lpfc_hba *phba = vport->phba;\
1640 val = phba->cfg_##attr;\
1641 return snprintf(buf, PAGE_SIZE, "%#x\n",\
1664 #define lpfc_param_init(attr, default, minval, maxval) \
1666 lpfc_##attr##_init(struct lpfc_hba *phba, uint val) \
1668 if (val >= minval && val <= maxval) {\
1669 phba->cfg_##attr = val;\
1672 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, \
1673 "0449 lpfc_"#attr" attribute cannot be set to %d, "\
1674 "allowed range is ["#minval", "#maxval"]\n", val); \
1675 phba->cfg_##attr = default;\
1699 #define lpfc_param_set(attr, default, minval, maxval) \
1701 lpfc_##attr##_set(struct lpfc_hba *phba, uint val) \
1703 if (val >= minval && val <= maxval) {\
1704 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, \
1705 "3052 lpfc_" #attr " changed from %d to %d\n", \
1706 phba->cfg_##attr, val); \
1707 phba->cfg_##attr = val;\
1710 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, \
1711 "0450 lpfc_"#attr" attribute cannot be set to %d, "\
1712 "allowed range is ["#minval", "#maxval"]\n", val); \
1737 #define lpfc_param_store(attr) \
1739 lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
1740 const char *buf, size_t count) \
1742 struct Scsi_Host *shost = class_to_shost(dev);\
1743 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1744 struct lpfc_hba *phba = vport->phba;\
1746 if (!isdigit(buf[0]))\
1748 if (sscanf(buf, "%i", &val) != 1)\
1750 if (lpfc_##attr##_set(phba, val) == 0) \
1751 return strlen(buf);\
1770 #define lpfc_vport_param_show(attr) \
1772 lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1775 struct Scsi_Host *shost = class_to_shost(dev);\
1776 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1778 val = vport->cfg_##attr;\
1779 return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_##attr);\
1797 #define lpfc_vport_param_hex_show(attr) \
1799 lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1802 struct Scsi_Host *shost = class_to_shost(dev);\
1803 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1805 val = vport->cfg_##attr;\
1806 return snprintf(buf, PAGE_SIZE, "%#x\n", vport->cfg_##attr);\
1827 #define lpfc_vport_param_init(attr, default, minval, maxval) \
1829 lpfc_##attr##_init(struct lpfc_vport *vport, uint val) \
1831 if (val >= minval && val <= maxval) {\
1832 vport->cfg_##attr = val;\
1835 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
1836 "0423 lpfc_"#attr" attribute cannot be set to %d, "\
1837 "allowed range is ["#minval", "#maxval"]\n", val); \
1838 vport->cfg_##attr = default;\
1859 #define lpfc_vport_param_set(attr, default, minval, maxval) \
1861 lpfc_##attr##_set(struct lpfc_vport *vport, uint val) \
1863 if (val >= minval && val <= maxval) {\
1864 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
1865 "3053 lpfc_" #attr " changed from %d to %d\n", \
1866 vport->cfg_##attr, val); \
1867 vport->cfg_##attr = val;\
1870 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
1871 "0424 lpfc_"#attr" attribute cannot be set to %d, "\
1872 "allowed range is ["#minval", "#maxval"]\n", val); \
1893 #define lpfc_vport_param_store(attr) \
1895 lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
1896 const char *buf, size_t count) \
1898 struct Scsi_Host *shost = class_to_shost(dev);\
1899 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
1901 if (!isdigit(buf[0]))\
1903 if (sscanf(buf, "%i", &val) != 1)\
1905 if (lpfc_##attr##_set(vport, val) == 0) \
1906 return strlen(buf);\
1912 #define LPFC_ATTR(name, defval, minval, maxval, desc) \
1913 static uint lpfc_##name = defval;\
1914 module_param(lpfc_##name, uint, S_IRUGO);\
1915 MODULE_PARM_DESC(lpfc_##name, desc);\
1916 lpfc_param_init(name, defval, minval, maxval)
1918 #define LPFC_ATTR_R(name, defval, minval, maxval, desc) \
1919 static uint lpfc_##name = defval;\
1920 module_param(lpfc_##name, uint, S_IRUGO);\
1921 MODULE_PARM_DESC(lpfc_##name, desc);\
1922 lpfc_param_show(name)\
1923 lpfc_param_init(name, defval, minval, maxval)\
1924 static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1926 #define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \
1927 static uint lpfc_##name = defval;\
1928 module_param(lpfc_##name, uint, S_IRUGO);\
1929 MODULE_PARM_DESC(lpfc_##name, desc);\
1930 lpfc_param_show(name)\
1931 lpfc_param_init(name, defval, minval, maxval)\
1932 lpfc_param_set(name, defval, minval, maxval)\
1933 lpfc_param_store(name)\
1934 static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
1935 lpfc_##name##_show, lpfc_##name##_store)
1937 #define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \
1938 static uint lpfc_##name = defval;\
1939 module_param(lpfc_##name, uint, S_IRUGO);\
1940 MODULE_PARM_DESC(lpfc_##name, desc);\
1941 lpfc_param_hex_show(name)\
1942 lpfc_param_init(name, defval, minval, maxval)\
1943 static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1945 #define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
1946 static uint lpfc_##name = defval;\
1947 module_param(lpfc_##name, uint, S_IRUGO);\
1948 MODULE_PARM_DESC(lpfc_##name, desc);\
1949 lpfc_param_hex_show(name)\
1950 lpfc_param_init(name, defval, minval, maxval)\
1951 lpfc_param_set(name, defval, minval, maxval)\
1952 lpfc_param_store(name)\
1953 static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
1954 lpfc_##name##_show, lpfc_##name##_store)
1956 #define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \
1957 static uint lpfc_##name = defval;\
1958 module_param(lpfc_##name, uint, S_IRUGO);\
1959 MODULE_PARM_DESC(lpfc_##name, desc);\
1960 lpfc_vport_param_init(name, defval, minval, maxval)
1962 #define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \
1963 static uint lpfc_##name = defval;\
1964 module_param(lpfc_##name, uint, S_IRUGO);\
1965 MODULE_PARM_DESC(lpfc_##name, desc);\
1966 lpfc_vport_param_show(name)\
1967 lpfc_vport_param_init(name, defval, minval, maxval)\
1968 static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1970 #define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \
1971 static uint lpfc_##name = defval;\
1972 module_param(lpfc_##name, uint, S_IRUGO);\
1973 MODULE_PARM_DESC(lpfc_##name, desc);\
1974 lpfc_vport_param_show(name)\
1975 lpfc_vport_param_init(name, defval, minval, maxval)\
1976 lpfc_vport_param_set(name, defval, minval, maxval)\
1977 lpfc_vport_param_store(name)\
1978 static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
1979 lpfc_##name##_show, lpfc_##name##_store)
1981 #define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \
1982 static uint lpfc_##name = defval;\
1983 module_param(lpfc_##name, uint, S_IRUGO);\
1984 MODULE_PARM_DESC(lpfc_##name, desc);\
1985 lpfc_vport_param_hex_show(name)\
1986 lpfc_vport_param_init(name, defval, minval, maxval)\
1987 static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1989 #define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
1990 static uint lpfc_##name = defval;\
1991 module_param(lpfc_##name, uint, S_IRUGO);\
1992 MODULE_PARM_DESC(lpfc_##name, desc);\
1993 lpfc_vport_param_hex_show(name)\
1994 lpfc_vport_param_init(name, defval, minval, maxval)\
1995 lpfc_vport_param_set(name, defval, minval, maxval)\
1996 lpfc_vport_param_store(name)\
1997 static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
1998 lpfc_##name##_show, lpfc_##name##_store)
2013 lpfc_link_state_store);
2015 lpfc_option_rom_version_show,
NULL);
2017 lpfc_num_discovered_ports_show,
NULL);
2023 lpfc_board_mode_show, lpfc_board_mode_store);
2037 lpfc_sriov_hw_max_virtfn_show,
NULL);
2040 static char *lpfc_soft_wwn_key =
"C99G71SL8032A";
2055 const char *buf,
size_t count)
2060 unsigned int cnt = count;
2076 if (buf[cnt-1] ==
'\n')
2079 if ((cnt !=
strlen(lpfc_soft_wwn_key)) ||
2080 (
strncmp(buf, lpfc_soft_wwn_key,
strlen(lpfc_soft_wwn_key)) != 0))
2087 lpfc_soft_wwn_enable_store);
2124 const char *buf,
size_t count)
2130 int stat1=0, stat2=0;
2131 unsigned int i,
j, cnt=count;
2137 spin_lock_irq(&phba->
hbalock);
2139 spin_unlock_irq(&phba->
hbalock);
2142 spin_unlock_irq(&phba->
hbalock);
2144 if (buf[cnt-1] ==
'\n')
2148 ((cnt == 17) && (*buf++ !=
'x')) ||
2149 ((cnt == 18) && ((*buf++ !=
'0') || (*buf++ !=
'x'))))
2157 for (i=0,
j=0; i < 16; i++) {
2162 j = (
j << 4) | value;
2166 wwpn[i/2] =
j & 0xff;
2176 "lpfc%d: Reinitializing to use soft_wwpn\n", phba->
brd_no);
2181 "0463 lpfc_soft_wwpn attribute set failed to "
2182 "reinit adapter - %d\n", stat1);
2183 init_completion(&online_compl);
2192 "0464 lpfc_soft_wwpn attribute set failed to "
2193 "reinit adapter - %d\n", stat2);
2194 return (stat1 || stat2) ? -
EIO :
count;
2197 lpfc_soft_wwpn_show, lpfc_soft_wwpn_store);
2229 const char *buf,
size_t count)
2237 if (buf[cnt-1] ==
'\n')
2241 ((cnt == 17) && (*buf++ !=
'x')) ||
2242 ((cnt == 18) && ((*buf++ !=
'0') || (*buf++ !=
'x'))))
2250 memset(wwnn, 0,
sizeof(wwnn));
2253 for (i=0, j=0; i < 16; i++) {
2258 j = (j << 4) | value;
2262 wwnn[i/2] = j & 0xff;
2269 "lpfc%d: soft_wwnn set. Value will take effect upon "
2270 "setting of the soft_wwpn\n", phba->
brd_no);
2275 lpfc_soft_wwnn_show, lpfc_soft_wwnn_store);
2278 static int lpfc_poll = 0;
2282 " 1 - poll with interrupts enabled"
2283 " 3 - poll and disable FCP ring interrupts");
2286 lpfc_poll_show, lpfc_poll_store);
2291 " 0 - auto (SLI-3 if supported),"
2292 " 2 - select SLI-2 even on SLI-3 capable HBAs,"
2293 " 3 - select SLI-3");
2303 "FCF Fast failover=1 Priority failover=2");
2321 "Suppress Link Up at initialization");
2340 lpfc_iocb_hw_show,
NULL);
2352 lpfc_txq_hw_show,
NULL);
2365 lpfc_txcmplq_hw_show,
NULL);
2370 "Number of IOCBs alloc for ELS, CT, and ABTS: 1k to 5k IOCBs");
2374 lpfc_iocb_cnt_show,
NULL);
2384 "Seconds driver will hold I/O waiting "
2385 "for a device to come back");
2427 "0407 Ignoring nodev_tmo module "
2428 "parameter because devloss_tmo is "
2439 "0400 lpfc_nodev_tmo attribute cannot be set to"
2440 " %d, allowed range is [%d, %d]\n",
2454 lpfc_update_rport_devloss_tmo(
struct lpfc_vport *vport)
2459 shost = lpfc_shost_from_vport(vport);
2464 spin_unlock_irq(shost->host_lock);
2485 if (vport->dev_loss_tmo_changed ||
2488 "0401 Ignoring change to nodev_tmo "
2489 "because devloss_tmo is set.\n");
2493 vport->cfg_nodev_tmo =
val;
2494 vport->cfg_devloss_tmo =
val;
2500 lpfc_update_rport_devloss_tmo(vport);
2504 "0403 lpfc_nodev_tmo attribute cannot be set to"
2505 "%d, allowed range is [%d, %d]\n",
2513 lpfc_nodev_tmo_show, lpfc_nodev_tmo_store);
2522 "Seconds
driver will hold
I/O waiting "
2546 vport->cfg_nodev_tmo =
val;
2547 vport->cfg_devloss_tmo =
val;
2548 vport->dev_loss_tmo_changed = 1;
2550 lpfc_update_rport_devloss_tmo(vport);
2555 "0404 lpfc_devloss_tmo attribute cannot be set to"
2556 " %d, allowed range is [%d, %d]\n",
2563 lpfc_devloss_tmo_show, lpfc_devloss_tmo_store);
2579 "Deregister nameserver objects before
LOGO");
2615 "Allow peer ports on
the same physical port to
login to each "
2629 static
int lpfc_restrict_login = 1;
2632 "Restrict virtual ports
login to remote initiators.");
2653 if (val < 0 || val > 1) {
2655 "0422 lpfc_restrict_login attribute cannot "
2656 "be set to %d, allowed range is [0, 1]\n",
2658 vport->cfg_restrict_login = 1;
2662 vport->cfg_restrict_login = 0;
2665 vport->cfg_restrict_login =
val;
2686 lpfc_restrict_login_set(
struct lpfc_vport *vport,
int val)
2688 if (val < 0 || val > 1) {
2690 "0425 lpfc_restrict_login attribute cannot "
2691 "be set to %d, allowed range is [0, 1]\n",
2698 "0468 lpfc_restrict_login must be 0 for "
2699 "Physical ports.\n");
2708 lpfc_restrict_login_show, lpfc_restrict_login_store);
2728 "Start scanning for devices from highest ALPA to lowest");
2760 const char *buf,
size_t count)
2767 const char *val_buf = buf;
2773 val_buf = &buf[
strlen(
"nolip ")];
2778 if (
sscanf(val_buf,
"%i", &val) != 1)
2781 if (val >= 0 && val <= 6) {
2787 "3113 Loop mode not supported at speed %d\n",
2796 "3054 lpfc_topology changed from %d to %d\n",
2798 err = lpfc_issue_lip(lpfc_shost_from_vport(phba->
pport));
2806 "%d:0467 lpfc_topology attribute cannot be set to %d, "
2807 "allowed range is [0, 6]\n",
2811 static int lpfc_topology = 0;
2817 lpfc_topology_show, lpfc_topology_store);
2848 lpfc_static_vport_show,
NULL);
2871 const char *buf,
size_t count)
2876 #define LPFC_MAX_DATA_CTRL_LEN 1024
2877 static char bucket_data[LPFC_MAX_DATA_CTRL_LEN];
2879 char *str_ptr, *
token;
2882 char *bucket_type_str, *base_str, *step_str;
2883 unsigned long base,
step, bucket_type;
2889 strcpy(bucket_data, buf);
2890 str_ptr = &bucket_data[0];
2896 bucket_type_str =
strsep(&str_ptr,
"\t ");
2897 if (!bucket_type_str)
2902 else if (!
strncmp(bucket_type_str,
"power2",
strlen(
"power2")))
2907 base_str =
strsep(&str_ptr,
"\t ");
2912 step_str =
strsep(&str_ptr,
"\t ");
2925 v_shost = lpfc_shost_from_vport(vports[i]);
2926 spin_lock_irq(v_shost->host_lock);
2928 vports[
i]->stat_data_blocked = 1;
2931 spin_unlock_irq(v_shost->host_lock);
2940 v_shost = lpfc_shost_from_vport(vports[i]);
2943 spin_lock_irq(v_shost->host_lock);
2944 vports[
i]->stat_data_blocked = 0;
2945 spin_unlock_irq(v_shost->host_lock);
2951 if (!
strncmp(buf,
"destroybucket",
strlen(
"destroybucket"))) {
2957 v_shost = lpfc_shost_from_vport(vports[i]);
2959 vports[
i]->stat_data_blocked = 1;
2962 vports[
i]->stat_data_blocked = 0;
3033 unsigned long bucket_value;
3037 bucket_type =
"linear";
3040 bucket_type =
"power2";
3043 bucket_type =
"No Bucket";
3048 "blocked :%d, Bucket type :%s, Bucket base :%d,"
3049 " Bucket step :%d\nLatency Ranges :",
3076 lpfc_stat_data_ctrl_show, lpfc_stat_data_ctrl_store);
3086 #define STAT_DATA_SIZE_PER_TARGET(NUM_BUCKETS) ((NUM_BUCKETS) * 11 + 18)
3087 #define MAX_STAT_DATA_SIZE_PER_TARGET \
3088 STAT_DATA_SIZE_PER_TARGET(LPFC_MAX_BUCKET_COUNT)
3105 sysfs_drvr_stat_data_read(
struct file *filp,
struct kobject *kobj,
3107 char *buf, loff_t off,
size_t count)
3114 int i = 0,
index = 0;
3115 unsigned long nport_index;
3117 nport_index = (
unsigned long)off /
3129 if (nport_index > 0) {
3142 sprintf(&buf[
index],
"%02x%02x%02x%02x%02x%02x%02x%02x:",
3155 sprintf(&buf[index],
"%010u,",
3168 .name =
"lpfc_drvr_stat_data",
3172 .read = sysfs_drvr_stat_data_read,
3200 const char *buf,
size_t count)
3207 const char *val_buf = buf;
3213 val_buf = &buf[
strlen(
"nolip ")];
3218 if (
sscanf(val_buf,
"%i", &val) != 1)
3222 "3055 lpfc_link_speed changed from %d to %d %s\n",
3232 "2879 lpfc_link_speed attribute cannot be set "
3233 "to %d. Speed is not supported by this port.\n",
3240 "3112 lpfc_link_speed attribute cannot be set "
3241 "to %d. Speed is not supported in loop mode.\n",
3252 err = lpfc_issue_lip(lpfc_shost_from_vport(phba->
pport));
3260 "0469 lpfc_link_speed attribute cannot be set to %d, "
3265 static int lpfc_link_speed = 0;
3291 "3111 lpfc_link_speed of %d cannot "
3292 "support loop mode, setting topology to default.\n",
3294 phba->cfg_topology = 0;
3298 phba->cfg_link_speed =
val;
3302 "0405 lpfc_link_speed attribute cannot "
3303 "be set to %d, allowed values are "
3310 lpfc_link_speed_show, lpfc_link_speed_store);
3348 const char *buf,
size_t count)
3353 int val = 0, rc = -
EINVAL;
3357 if (
sscanf(buf,
"%i", &val) != 1)
3365 spin_lock_irq(&phba->
hbalock);
3367 spin_unlock_irq(&phba->
hbalock);
3381 spin_lock_irq(&phba->
hbalock);
3383 spin_unlock_irq(&phba->
hbalock);
3400 static int lpfc_aer_support = 1;
3427 if (val == 0 || val == 1) {
3428 phba->cfg_aer_support =
val;
3432 "2712 lpfc_aer_support attribute value %d out "
3433 "of range, allowed values are 0|1, setting it "
3434 "to default value of 1\n", val);
3436 phba->cfg_aer_support = 1;
3441 lpfc_aer_support_show, lpfc_aer_support_store);
3464 const char *buf,
size_t count)
3473 if (
sscanf(buf,
"%i", &val) != 1)
3488 lpfc_aer_cleanup_state);
3531 const char *buf,
size_t count)
3537 int val = 0, rc = -
EINVAL;
3542 if (
sscanf(buf,
"%i", &val) != 1)
3559 "3018 There are %d virtual functions "
3560 "enabled on physical function.\n",
3569 "3019 Enabling %d virtual functions is not "
3586 MODULE_PARM_DESC(lpfc_sriov_nr_virtfn,
"Enable PCIe device SR-IOV virtual fn");
3608 phba->cfg_sriov_nr_virtfn =
val;
3613 "3017 Enabling %d virtual functions is not "
3618 lpfc_sriov_nr_virtfn_show, lpfc_sriov_nr_virtfn_store);
3639 const char *buf,
size_t count)
3653 if (
sscanf(buf,
"%i", &val) != 1)
3679 "Set the maximum number of FCP interrupts per second per HBA");
3699 phba->cfg_fcp_imax = 0;
3704 phba->cfg_fcp_imax =
val;
3709 "3016 fcp_imax: %d out of range, using default\n", val);
3716 lpfc_fcp_imax_show, lpfc_fcp_imax_store);
3723 "Select Fibre Channel class of service for FCP sequences");
3730 "Use ADISC on rediscovery to authenticate FCP devices");
3740 static int lpfc_max_scsicmpl_time;
3743 "Use command completion time to control queue depth");
3747 lpfc_max_scsicmpl_time_set(
struct lpfc_vport *vport,
int val)
3749 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
3754 if ((val < 0) || (val > 60000))
3771 lpfc_max_scsicmpl_time_show,
3772 lpfc_max_scsicmpl_time_store);
3778 LPFC_ATTR_R(ack0, 0, 0, 1,
"Enable ACK0 support");
3787 LPFC_ATTR_RW(fcp_io_sched, 0, 0, 1,
"Determine scheduling algrithmn for "
3788 "issuing commands [0] - Round Robin, [1] - Current CPU");
3797 LPFC_ATTR_RW(cr_delay, 0, 0, 63,
"A count of milliseconds after which an "
3798 "interrupt response is generated");
3800 LPFC_ATTR_RW(cr_count, 1, 1, 255,
"A count of I/O completions after which an "
3801 "interrupt response is generated");
3808 LPFC_ATTR_R(multi_ring_support, 1, 1, 2,
"Determines number of primary "
3809 "SLI rings to spread IOCB entries across");
3817 255,
"Identifies RCTL for additional ring configuration");
3825 255,
"Identifies TYPE for additional ring configuration");
3840 LPFC_VPORT_ATTR(discovery_threads, 32, 1, 64,
"Maximum number of ELS commands "
3841 "during discovery");
3855 "Milliseconds driver will wait between polling FCP ring");
3865 LPFC_ATTR_R(use_msi, 2, 0, 2,
"Use Message Signaled Interrupts (1) or "
3866 "MSI-X (2), if possible");
3876 "Set the number of fast-path FCP work queues, if possible");
3885 "Set the number of fast-path FCP event queues, if possible");
3894 "Set the number of FCP I/O channels");
3902 LPFC_ATTR_R(enable_hba_reset, 1, 0, 1,
"Enable HBA resets from the driver.");
3910 LPFC_ATTR_R(enable_hba_heartbeat, 0, 0, 1,
"Enable HBA Heartbeat.");
3918 LPFC_ATTR_R(enable_bg, 0, 0, 1,
"Enable BlockGuard Support");
3982 "Delay NPort discovery when Clean Address bit is cleared. "
3983 "Allowed values: 0,1.");
3996 "Max Protection Scatter Gather Segment Count");
4000 &dev_attr_bg_guard_err,
4001 &dev_attr_bg_apptag_err,
4002 &dev_attr_bg_reftag_err,
4004 &dev_attr_serialnum,
4005 &dev_attr_modeldesc,
4006 &dev_attr_modelname,
4007 &dev_attr_programtype,
4011 &dev_attr_option_rom_version,
4012 &dev_attr_link_state,
4013 &dev_attr_num_discovered_ports,
4014 &dev_attr_menlo_mgmt_mode,
4015 &dev_attr_lpfc_drvr_version,
4016 &dev_attr_lpfc_enable_fip,
4017 &dev_attr_lpfc_temp_sensor,
4018 &dev_attr_lpfc_log_verbose,
4019 &dev_attr_lpfc_lun_queue_depth,
4020 &dev_attr_lpfc_tgt_queue_depth,
4021 &dev_attr_lpfc_hba_queue_depth,
4022 &dev_attr_lpfc_peer_port_login,
4023 &dev_attr_lpfc_nodev_tmo,
4024 &dev_attr_lpfc_devloss_tmo,
4025 &dev_attr_lpfc_fcp_class,
4026 &dev_attr_lpfc_use_adisc,
4027 &dev_attr_lpfc_ack0,
4028 &dev_attr_lpfc_topology,
4029 &dev_attr_lpfc_scan_down,
4030 &dev_attr_lpfc_link_speed,
4031 &dev_attr_lpfc_fcp_io_sched,
4032 &dev_attr_lpfc_cr_delay,
4033 &dev_attr_lpfc_cr_count,
4034 &dev_attr_lpfc_multi_ring_support,
4035 &dev_attr_lpfc_multi_ring_rctl,
4036 &dev_attr_lpfc_multi_ring_type,
4037 &dev_attr_lpfc_fdmi_on,
4038 &dev_attr_lpfc_max_luns,
4039 &dev_attr_lpfc_enable_npiv,
4040 &dev_attr_lpfc_fcf_failover_policy,
4041 &dev_attr_lpfc_enable_rrq,
4042 &dev_attr_nport_evt_cnt,
4043 &dev_attr_board_mode,
4050 &dev_attr_npiv_info,
4051 &dev_attr_issue_reset,
4052 &dev_attr_lpfc_poll,
4053 &dev_attr_lpfc_poll_tmo,
4054 &dev_attr_lpfc_use_msi,
4055 &dev_attr_lpfc_fcp_imax,
4056 &dev_attr_lpfc_fcp_wq_count,
4057 &dev_attr_lpfc_fcp_eq_count,
4058 &dev_attr_lpfc_fcp_io_channel,
4059 &dev_attr_lpfc_enable_bg,
4060 &dev_attr_lpfc_soft_wwnn,
4061 &dev_attr_lpfc_soft_wwpn,
4062 &dev_attr_lpfc_soft_wwn_enable,
4063 &dev_attr_lpfc_enable_hba_reset,
4064 &dev_attr_lpfc_enable_hba_heartbeat,
4065 &dev_attr_lpfc_sg_seg_cnt,
4066 &dev_attr_lpfc_max_scsicmpl_time,
4067 &dev_attr_lpfc_stat_data_ctrl,
4068 &dev_attr_lpfc_prot_sg_seg_cnt,
4069 &dev_attr_lpfc_aer_support,
4070 &dev_attr_lpfc_aer_state_cleanup,
4071 &dev_attr_lpfc_sriov_nr_virtfn,
4072 &dev_attr_lpfc_suppress_link_up,
4073 &dev_attr_lpfc_iocb_cnt,
4076 &dev_attr_txcmplq_hw,
4077 &dev_attr_lpfc_fips_level,
4078 &dev_attr_lpfc_fips_rev,
4080 &dev_attr_lpfc_sriov_hw_max_virtfn,
4087 &dev_attr_link_state,
4088 &dev_attr_num_discovered_ports,
4089 &dev_attr_lpfc_drvr_version,
4090 &dev_attr_lpfc_log_verbose,
4091 &dev_attr_lpfc_lun_queue_depth,
4092 &dev_attr_lpfc_tgt_queue_depth,
4093 &dev_attr_lpfc_nodev_tmo,
4094 &dev_attr_lpfc_devloss_tmo,
4095 &dev_attr_lpfc_hba_queue_depth,
4096 &dev_attr_lpfc_peer_port_login,
4097 &dev_attr_lpfc_restrict_login,
4098 &dev_attr_lpfc_fcp_class,
4099 &dev_attr_lpfc_use_adisc,
4100 &dev_attr_lpfc_fdmi_on,
4101 &dev_attr_lpfc_max_luns,
4102 &dev_attr_nport_evt_cnt,
4103 &dev_attr_npiv_info,
4104 &dev_attr_lpfc_enable_da_id,
4105 &dev_attr_lpfc_max_scsicmpl_time,
4106 &dev_attr_lpfc_stat_data_ctrl,
4107 &dev_attr_lpfc_static_vport,
4108 &dev_attr_lpfc_fips_level,
4109 &dev_attr_lpfc_fips_rev,
4133 sysfs_ctlreg_write(
struct file *filp,
struct kobject *kobj,
4135 char *buf, loff_t off,
size_t count)
4152 if (off % 4 || count % 4 || (
unsigned long)buf % 4)
4159 if (!(vport->
fc_flag & FC_OFFLINE_MODE))
4162 spin_lock_irq(&phba->
hbalock);
4168 spin_unlock_irq(&phba->
hbalock);
4192 sysfs_ctlreg_read(
struct file *filp,
struct kobject *kobj,
4194 char *buf, loff_t off,
size_t count)
4212 if (count == 0)
return 0;
4214 if (off % 4 || count % 4 || (
unsigned long)buf % 4)
4217 spin_lock_irq(&phba->
hbalock);
4219 for (buf_off = 0; buf_off <
count; buf_off +=
sizeof(
uint32_t)) {
4220 tmp_ptr = (
uint32_t *)(buf + buf_off);
4224 spin_unlock_irq(&phba->
hbalock);
4235 .read = sysfs_ctlreg_read,
4236 .write = sysfs_ctlreg_write,
4256 sysfs_mbox_write(
struct file *filp,
struct kobject *kobj,
4258 char *buf, loff_t off,
size_t count)
4280 sysfs_mbox_read(
struct file *filp,
struct kobject *kobj,
4282 char *buf, loff_t off,
size_t count)
4293 .read = sysfs_mbox_read,
4294 .write = sysfs_mbox_write,
4308 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
4312 &sysfs_drvr_stat_data_attr);
4319 &sysfs_ctlreg_attr);
4321 goto out_remove_stat_attr;
4326 goto out_remove_ctlreg_attr;
4329 out_remove_ctlreg_attr:
4331 out_remove_stat_attr:
4333 &sysfs_drvr_stat_data_attr);
4345 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
4347 &sysfs_drvr_stat_data_attr);
4365 lpfc_get_host_port_id(
struct Scsi_Host *shost)
4378 lpfc_get_host_port_type(
struct Scsi_Host *shost)
4387 }
else if (lpfc_is_link_up(phba)) {
4410 lpfc_get_host_port_state(
struct Scsi_Host *shost)
4417 if (vport->
fc_flag & FC_OFFLINE_MODE)
4453 lpfc_get_host_speed(
struct Scsi_Host *shost)
4460 if (lpfc_is_link_up(phba)) {
4495 lpfc_get_host_fabric_name (
struct Scsi_Host *shost)
4559 pmb = &pmboxq->
u.
mb;
4563 pmboxq->
vport = vport;
4565 if (vport->
fc_flag & FC_OFFLINE_MODE)
4595 pmboxq->
vport = vport;
4597 if (vport->
fc_flag & FC_OFFLINE_MODE)
4616 hs->link_failure_count -= lso->link_failure_count;
4617 hs->loss_of_sync_count -= lso->loss_of_sync_count;
4618 hs->loss_of_signal_count -= lso->loss_of_signal_count;
4619 hs->prim_seq_protocol_err_count -= lso->prim_seq_protocol_err_count;
4620 hs->invalid_tx_word_count -= lso->invalid_tx_word_count;
4621 hs->invalid_crc_count -= lso->invalid_crc_count;
4622 hs->error_frames -= lso->error_frames;
4627 hs->nos_count -= lso->link_events;
4630 hs->lip_count -= lso->link_events;
4635 hs->nos_count -= lso->link_events;
4638 hs->dumped_frames = -1;
4641 if (seconds < psli->stats_start)
4642 hs->seconds_since_last_reset =
seconds +
4657 lpfc_reset_stats(
struct Scsi_Host *shost)
4675 pmb = &pmboxq->
u.
mb;
4680 pmboxq->
vport = vport;
4682 if ((vport->
fc_flag & FC_OFFLINE_MODE) ||
4698 pmboxq->
vport = vport;
4700 if ((vport->
fc_flag & FC_OFFLINE_MODE) ||
4745 lpfc_get_node_by_target(
struct scsi_target *starget)
4747 struct Scsi_Host *shost = dev_to_shost(starget->
dev.parent);
4770 lpfc_get_starget_port_id(
struct scsi_target *starget)
4772 struct lpfc_nodelist *ndlp = lpfc_get_node_by_target(starget);
4784 lpfc_get_starget_node_name(
struct scsi_target *starget)
4786 struct lpfc_nodelist *ndlp = lpfc_get_node_by_target(starget);
4799 lpfc_get_starget_port_name(
struct scsi_target *starget)
4801 struct lpfc_nodelist *ndlp = lpfc_get_node_by_target(starget);
4837 #define lpfc_rport_show_function(field, format_string, sz, cast) \
4839 lpfc_show_rport_##field (struct device *dev, \
4840 struct device_attribute *attr, \
4843 struct fc_rport *rport = transport_class_to_rport(dev); \
4844 struct lpfc_rport_data *rdata = rport->hostdata; \
4845 return snprintf(buf, sz, format_string, \
4846 (rdata->target) ? cast rdata->target->field : 0); \
4849 #define lpfc_rport_rd_attr(field, format_string, sz) \
4850 lpfc_rport_show_function(field, format_string, sz, ) \
4851 static FC_RPORT_ATTR(field, S_IRUGO, lpfc_show_rport_##field, NULL)
4888 .show_host_node_name = 1,
4889 .show_host_port_name = 1,
4890 .show_host_supported_classes = 1,
4891 .show_host_supported_fc4s = 1,
4892 .show_host_supported_speeds = 1,
4893 .show_host_maxframe_size = 1,
4894 .show_host_symbolic_name = 1,
4897 .get_host_port_id = lpfc_get_host_port_id,
4898 .show_host_port_id = 1,
4900 .get_host_port_type = lpfc_get_host_port_type,
4901 .show_host_port_type = 1,
4903 .get_host_port_state = lpfc_get_host_port_state,
4904 .show_host_port_state = 1,
4907 .show_host_active_fc4s = 1,
4909 .get_host_speed = lpfc_get_host_speed,
4910 .show_host_speed = 1,
4912 .get_host_fabric_name = lpfc_get_host_fabric_name,
4913 .show_host_fabric_name = 1,
4920 .get_fc_host_stats = lpfc_get_stats,
4921 .reset_fc_host_stats = lpfc_reset_stats,
4924 .show_rport_maxframe_size = 1,
4925 .show_rport_supported_classes = 1,
4927 .set_rport_dev_loss_tmo = lpfc_set_rport_loss_tmo,
4928 .show_rport_dev_loss_tmo = 1,
4930 .get_starget_port_id = lpfc_get_starget_port_id,
4931 .show_starget_port_id = 1,
4933 .get_starget_node_name = lpfc_get_starget_node_name,
4934 .show_starget_node_name = 1,
4936 .get_starget_port_name = lpfc_get_starget_port_name,
4937 .show_starget_port_name = 1,
4939 .issue_fc_host_lip = lpfc_issue_lip,
4943 .dd_fcvport_size =
sizeof(
struct lpfc_vport *),
4947 .set_vport_symbolic_name = lpfc_set_vport_symbolic_name,
4955 .show_host_node_name = 1,
4956 .show_host_port_name = 1,
4957 .show_host_supported_classes = 1,
4958 .show_host_supported_fc4s = 1,
4959 .show_host_supported_speeds = 1,
4960 .show_host_maxframe_size = 1,
4961 .show_host_symbolic_name = 1,
4964 .get_host_port_id = lpfc_get_host_port_id,
4965 .show_host_port_id = 1,
4967 .get_host_port_type = lpfc_get_host_port_type,
4968 .show_host_port_type = 1,
4970 .get_host_port_state = lpfc_get_host_port_state,
4971 .show_host_port_state = 1,
4974 .show_host_active_fc4s = 1,
4976 .get_host_speed = lpfc_get_host_speed,
4977 .show_host_speed = 1,
4979 .get_host_fabric_name = lpfc_get_host_fabric_name,
4980 .show_host_fabric_name = 1,
4987 .get_fc_host_stats = lpfc_get_stats,
4988 .reset_fc_host_stats = lpfc_reset_stats,
4991 .show_rport_maxframe_size = 1,
4992 .show_rport_supported_classes = 1,
4994 .set_rport_dev_loss_tmo = lpfc_set_rport_loss_tmo,
4995 .show_rport_dev_loss_tmo = 1,
4997 .get_starget_port_id = lpfc_get_starget_port_id,
4998 .show_starget_port_id = 1,
5000 .get_starget_node_name = lpfc_get_starget_node_name,
5001 .show_starget_node_name = 1,
5003 .get_starget_port_name = lpfc_get_starget_port_name,
5004 .show_starget_port_name = 1,
5011 .set_vport_symbolic_name = lpfc_set_vport_symbolic_name,
5021 lpfc_fcp_io_sched_init(phba, lpfc_fcp_io_sched);
5022 lpfc_cr_delay_init(phba, lpfc_cr_delay);
5023 lpfc_cr_count_init(phba, lpfc_cr_count);
5024 lpfc_multi_ring_support_init(phba, lpfc_multi_ring_support);
5025 lpfc_multi_ring_rctl_init(phba, lpfc_multi_ring_rctl);
5026 lpfc_multi_ring_type_init(phba, lpfc_multi_ring_type);
5027 lpfc_ack0_init(phba, lpfc_ack0);
5028 lpfc_topology_init(phba, lpfc_topology);
5029 lpfc_link_speed_init(phba, lpfc_link_speed);
5030 lpfc_poll_tmo_init(phba, lpfc_poll_tmo);
5031 lpfc_enable_npiv_init(phba, lpfc_enable_npiv);
5032 lpfc_fcf_failover_policy_init(phba, lpfc_fcf_failover_policy);
5033 lpfc_enable_rrq_init(phba, lpfc_enable_rrq);
5034 lpfc_use_msi_init(phba, lpfc_use_msi);
5035 lpfc_fcp_imax_init(phba, lpfc_fcp_imax);
5036 lpfc_fcp_wq_count_init(phba, lpfc_fcp_wq_count);
5037 lpfc_fcp_eq_count_init(phba, lpfc_fcp_eq_count);
5038 lpfc_fcp_io_channel_init(phba, lpfc_fcp_io_channel);
5039 lpfc_enable_hba_reset_init(phba, lpfc_enable_hba_reset);
5040 lpfc_enable_hba_heartbeat_init(phba, lpfc_enable_hba_heartbeat);
5041 lpfc_enable_bg_init(phba, lpfc_enable_bg);
5048 lpfc_sg_seg_cnt_init(phba, lpfc_sg_seg_cnt);
5049 lpfc_prot_sg_seg_cnt_init(phba, lpfc_prot_sg_seg_cnt);
5050 lpfc_hba_queue_depth_init(phba, lpfc_hba_queue_depth);
5051 lpfc_hba_log_verbose_init(phba, lpfc_log_verbose);
5052 lpfc_aer_support_init(phba, lpfc_aer_support);
5053 lpfc_sriov_nr_virtfn_init(phba, lpfc_sriov_nr_virtfn);
5054 lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up);
5055 lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt);
5067 lpfc_log_verbose_init(vport, lpfc_log_verbose);
5068 lpfc_lun_queue_depth_init(vport, lpfc_lun_queue_depth);
5069 lpfc_tgt_queue_depth_init(vport, lpfc_tgt_queue_depth);
5070 lpfc_devloss_tmo_init(vport, lpfc_devloss_tmo);
5071 lpfc_nodev_tmo_init(vport, lpfc_nodev_tmo);
5072 lpfc_peer_port_login_init(vport, lpfc_peer_port_login);
5073 lpfc_restrict_login_init(vport, lpfc_restrict_login);
5074 lpfc_fcp_class_init(vport, lpfc_fcp_class);
5075 lpfc_use_adisc_init(vport, lpfc_use_adisc);
5076 lpfc_max_scsicmpl_time_init(vport, lpfc_max_scsicmpl_time);
5077 lpfc_fdmi_on_init(vport, lpfc_fdmi_on);
5078 lpfc_discovery_threads_init(vport, lpfc_discovery_threads);
5079 lpfc_max_luns_init(vport, lpfc_max_luns);
5080 lpfc_scan_down_init(vport, lpfc_scan_down);
5081 lpfc_enable_da_id_init(vport, lpfc_enable_da_id);