aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c123
1 files changed, 93 insertions, 30 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 3512abb8a587..e7c020df12fa 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1,7 +1,7 @@
1/******************************************************************* 1/*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for * 2 * This file is part of the Emulex Linux Device Driver for *
3 * Fibre Channel Host Bus Adapters. * 3 * Fibre Channel Host Bus Adapters. *
4 * Copyright (C) 2004-2009 Emulex. All rights reserved. * 4 * Copyright (C) 2004-2011 Emulex. All rights reserved. *
5 * EMULEX and SLI are trademarks of Emulex. * 5 * EMULEX and SLI are trademarks of Emulex. *
6 * www.emulex.com * 6 * www.emulex.com *
7 * Portions Copyright (C) 2004-2005 Christoph Hellwig * 7 * Portions Copyright (C) 2004-2005 Christoph Hellwig *
@@ -623,10 +623,14 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type)
623 int status = 0; 623 int status = 0;
624 int cnt = 0; 624 int cnt = 0;
625 int i; 625 int i;
626 int rc;
626 627
627 init_completion(&online_compl); 628 init_completion(&online_compl);
628 lpfc_workq_post_event(phba, &status, &online_compl, 629 rc = lpfc_workq_post_event(phba, &status, &online_compl,
629 LPFC_EVT_OFFLINE_PREP); 630 LPFC_EVT_OFFLINE_PREP);
631 if (rc == 0)
632 return -ENOMEM;
633
630 wait_for_completion(&online_compl); 634 wait_for_completion(&online_compl);
631 635
632 if (status != 0) 636 if (status != 0)
@@ -652,7 +656,10 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type)
652 } 656 }
653 657
654 init_completion(&online_compl); 658 init_completion(&online_compl);
655 lpfc_workq_post_event(phba, &status, &online_compl, type); 659 rc = lpfc_workq_post_event(phba, &status, &online_compl, type);
660 if (rc == 0)
661 return -ENOMEM;
662
656 wait_for_completion(&online_compl); 663 wait_for_completion(&online_compl);
657 664
658 if (status != 0) 665 if (status != 0)
@@ -671,6 +678,7 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type)
671 * 678 *
672 * Notes: 679 * Notes:
673 * Assumes any error from lpfc_do_offline() will be negative. 680 * Assumes any error from lpfc_do_offline() will be negative.
681 * Do not make this function static.
674 * 682 *
675 * Returns: 683 * Returns:
676 * lpfc_do_offline() return code if not zero 684 * lpfc_do_offline() return code if not zero
@@ -682,6 +690,7 @@ lpfc_selective_reset(struct lpfc_hba *phba)
682{ 690{
683 struct completion online_compl; 691 struct completion online_compl;
684 int status = 0; 692 int status = 0;
693 int rc;
685 694
686 if (!phba->cfg_enable_hba_reset) 695 if (!phba->cfg_enable_hba_reset)
687 return -EIO; 696 return -EIO;
@@ -692,8 +701,11 @@ lpfc_selective_reset(struct lpfc_hba *phba)
692 return status; 701 return status;
693 702
694 init_completion(&online_compl); 703 init_completion(&online_compl);
695 lpfc_workq_post_event(phba, &status, &online_compl, 704 rc = lpfc_workq_post_event(phba, &status, &online_compl,
696 LPFC_EVT_ONLINE); 705 LPFC_EVT_ONLINE);
706 if (rc == 0)
707 return -ENOMEM;
708
697 wait_for_completion(&online_compl); 709 wait_for_completion(&online_compl);
698 710
699 if (status != 0) 711 if (status != 0)
@@ -812,14 +824,17 @@ lpfc_board_mode_store(struct device *dev, struct device_attribute *attr,
812 struct lpfc_hba *phba = vport->phba; 824 struct lpfc_hba *phba = vport->phba;
813 struct completion online_compl; 825 struct completion online_compl;
814 int status=0; 826 int status=0;
827 int rc;
815 828
816 if (!phba->cfg_enable_hba_reset) 829 if (!phba->cfg_enable_hba_reset)
817 return -EACCES; 830 return -EACCES;
818 init_completion(&online_compl); 831 init_completion(&online_compl);
819 832
820 if(strncmp(buf, "online", sizeof("online") - 1) == 0) { 833 if(strncmp(buf, "online", sizeof("online") - 1) == 0) {
821 lpfc_workq_post_event(phba, &status, &online_compl, 834 rc = lpfc_workq_post_event(phba, &status, &online_compl,
822 LPFC_EVT_ONLINE); 835 LPFC_EVT_ONLINE);
836 if (rc == 0)
837 return -ENOMEM;
823 wait_for_completion(&online_compl); 838 wait_for_completion(&online_compl);
824 } else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) 839 } else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0)
825 status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); 840 status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
@@ -1279,6 +1294,28 @@ lpfc_fips_rev_show(struct device *dev, struct device_attribute *attr,
1279} 1294}
1280 1295
1281/** 1296/**
1297 * lpfc_dss_show - Return the current state of dss and the configured state
1298 * @dev: class converted to a Scsi_host structure.
1299 * @attr: device attribute, not used.
1300 * @buf: on return contains the formatted text.
1301 *
1302 * Returns: size of formatted string.
1303 **/
1304static ssize_t
1305lpfc_dss_show(struct device *dev, struct device_attribute *attr,
1306 char *buf)
1307{
1308 struct Scsi_Host *shost = class_to_shost(dev);
1309 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
1310 struct lpfc_hba *phba = vport->phba;
1311
1312 return snprintf(buf, PAGE_SIZE, "%s - %sOperational\n",
1313 (phba->cfg_enable_dss) ? "Enabled" : "Disabled",
1314 (phba->sli3_options & LPFC_SLI3_DSS_ENABLED) ?
1315 "" : "Not ");
1316}
1317
1318/**
1282 * lpfc_param_show - Return a cfg attribute value in decimal 1319 * lpfc_param_show - Return a cfg attribute value in decimal
1283 * 1320 *
1284 * Description: 1321 * Description:
@@ -1597,13 +1634,13 @@ lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
1597 1634
1598#define LPFC_ATTR(name, defval, minval, maxval, desc) \ 1635#define LPFC_ATTR(name, defval, minval, maxval, desc) \
1599static uint lpfc_##name = defval;\ 1636static uint lpfc_##name = defval;\
1600module_param(lpfc_##name, uint, 0);\ 1637module_param(lpfc_##name, uint, S_IRUGO);\
1601MODULE_PARM_DESC(lpfc_##name, desc);\ 1638MODULE_PARM_DESC(lpfc_##name, desc);\
1602lpfc_param_init(name, defval, minval, maxval) 1639lpfc_param_init(name, defval, minval, maxval)
1603 1640
1604#define LPFC_ATTR_R(name, defval, minval, maxval, desc) \ 1641#define LPFC_ATTR_R(name, defval, minval, maxval, desc) \
1605static uint lpfc_##name = defval;\ 1642static uint lpfc_##name = defval;\
1606module_param(lpfc_##name, uint, 0);\ 1643module_param(lpfc_##name, uint, S_IRUGO);\
1607MODULE_PARM_DESC(lpfc_##name, desc);\ 1644MODULE_PARM_DESC(lpfc_##name, desc);\
1608lpfc_param_show(name)\ 1645lpfc_param_show(name)\
1609lpfc_param_init(name, defval, minval, maxval)\ 1646lpfc_param_init(name, defval, minval, maxval)\
@@ -1611,7 +1648,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1611 1648
1612#define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \ 1649#define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \
1613static uint lpfc_##name = defval;\ 1650static uint lpfc_##name = defval;\
1614module_param(lpfc_##name, uint, 0);\ 1651module_param(lpfc_##name, uint, S_IRUGO);\
1615MODULE_PARM_DESC(lpfc_##name, desc);\ 1652MODULE_PARM_DESC(lpfc_##name, desc);\
1616lpfc_param_show(name)\ 1653lpfc_param_show(name)\
1617lpfc_param_init(name, defval, minval, maxval)\ 1654lpfc_param_init(name, defval, minval, maxval)\
@@ -1622,7 +1659,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
1622 1659
1623#define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \ 1660#define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \
1624static uint lpfc_##name = defval;\ 1661static uint lpfc_##name = defval;\
1625module_param(lpfc_##name, uint, 0);\ 1662module_param(lpfc_##name, uint, S_IRUGO);\
1626MODULE_PARM_DESC(lpfc_##name, desc);\ 1663MODULE_PARM_DESC(lpfc_##name, desc);\
1627lpfc_param_hex_show(name)\ 1664lpfc_param_hex_show(name)\
1628lpfc_param_init(name, defval, minval, maxval)\ 1665lpfc_param_init(name, defval, minval, maxval)\
@@ -1630,7 +1667,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1630 1667
1631#define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ 1668#define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
1632static uint lpfc_##name = defval;\ 1669static uint lpfc_##name = defval;\
1633module_param(lpfc_##name, uint, 0);\ 1670module_param(lpfc_##name, uint, S_IRUGO);\
1634MODULE_PARM_DESC(lpfc_##name, desc);\ 1671MODULE_PARM_DESC(lpfc_##name, desc);\
1635lpfc_param_hex_show(name)\ 1672lpfc_param_hex_show(name)\
1636lpfc_param_init(name, defval, minval, maxval)\ 1673lpfc_param_init(name, defval, minval, maxval)\
@@ -1641,13 +1678,13 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
1641 1678
1642#define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \ 1679#define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \
1643static uint lpfc_##name = defval;\ 1680static uint lpfc_##name = defval;\
1644module_param(lpfc_##name, uint, 0);\ 1681module_param(lpfc_##name, uint, S_IRUGO);\
1645MODULE_PARM_DESC(lpfc_##name, desc);\ 1682MODULE_PARM_DESC(lpfc_##name, desc);\
1646lpfc_vport_param_init(name, defval, minval, maxval) 1683lpfc_vport_param_init(name, defval, minval, maxval)
1647 1684
1648#define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \ 1685#define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \
1649static uint lpfc_##name = defval;\ 1686static uint lpfc_##name = defval;\
1650module_param(lpfc_##name, uint, 0);\ 1687module_param(lpfc_##name, uint, S_IRUGO);\
1651MODULE_PARM_DESC(lpfc_##name, desc);\ 1688MODULE_PARM_DESC(lpfc_##name, desc);\
1652lpfc_vport_param_show(name)\ 1689lpfc_vport_param_show(name)\
1653lpfc_vport_param_init(name, defval, minval, maxval)\ 1690lpfc_vport_param_init(name, defval, minval, maxval)\
@@ -1655,7 +1692,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1655 1692
1656#define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \ 1693#define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \
1657static uint lpfc_##name = defval;\ 1694static uint lpfc_##name = defval;\
1658module_param(lpfc_##name, uint, 0);\ 1695module_param(lpfc_##name, uint, S_IRUGO);\
1659MODULE_PARM_DESC(lpfc_##name, desc);\ 1696MODULE_PARM_DESC(lpfc_##name, desc);\
1660lpfc_vport_param_show(name)\ 1697lpfc_vport_param_show(name)\
1661lpfc_vport_param_init(name, defval, minval, maxval)\ 1698lpfc_vport_param_init(name, defval, minval, maxval)\
@@ -1666,7 +1703,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
1666 1703
1667#define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \ 1704#define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \
1668static uint lpfc_##name = defval;\ 1705static uint lpfc_##name = defval;\
1669module_param(lpfc_##name, uint, 0);\ 1706module_param(lpfc_##name, uint, S_IRUGO);\
1670MODULE_PARM_DESC(lpfc_##name, desc);\ 1707MODULE_PARM_DESC(lpfc_##name, desc);\
1671lpfc_vport_param_hex_show(name)\ 1708lpfc_vport_param_hex_show(name)\
1672lpfc_vport_param_init(name, defval, minval, maxval)\ 1709lpfc_vport_param_init(name, defval, minval, maxval)\
@@ -1674,7 +1711,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
1674 1711
1675#define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ 1712#define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
1676static uint lpfc_##name = defval;\ 1713static uint lpfc_##name = defval;\
1677module_param(lpfc_##name, uint, 0);\ 1714module_param(lpfc_##name, uint, S_IRUGO);\
1678MODULE_PARM_DESC(lpfc_##name, desc);\ 1715MODULE_PARM_DESC(lpfc_##name, desc);\
1679lpfc_vport_param_hex_show(name)\ 1716lpfc_vport_param_hex_show(name)\
1680lpfc_vport_param_init(name, defval, minval, maxval)\ 1717lpfc_vport_param_init(name, defval, minval, maxval)\
@@ -1718,7 +1755,7 @@ static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
1718static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL); 1755static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL);
1719static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL); 1756static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL);
1720static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL); 1757static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL);
1721 1758static DEVICE_ATTR(lpfc_dss, S_IRUGO, lpfc_dss_show, NULL);
1722 1759
1723static char *lpfc_soft_wwn_key = "C99G71SL8032A"; 1760static char *lpfc_soft_wwn_key = "C99G71SL8032A";
1724 1761
@@ -1813,6 +1850,7 @@ lpfc_soft_wwpn_store(struct device *dev, struct device_attribute *attr,
1813 int stat1=0, stat2=0; 1850 int stat1=0, stat2=0;
1814 unsigned int i, j, cnt=count; 1851 unsigned int i, j, cnt=count;
1815 u8 wwpn[8]; 1852 u8 wwpn[8];
1853 int rc;
1816 1854
1817 if (!phba->cfg_enable_hba_reset) 1855 if (!phba->cfg_enable_hba_reset)
1818 return -EACCES; 1856 return -EACCES;
@@ -1863,7 +1901,11 @@ lpfc_soft_wwpn_store(struct device *dev, struct device_attribute *attr,
1863 "0463 lpfc_soft_wwpn attribute set failed to " 1901 "0463 lpfc_soft_wwpn attribute set failed to "
1864 "reinit adapter - %d\n", stat1); 1902 "reinit adapter - %d\n", stat1);
1865 init_completion(&online_compl); 1903 init_completion(&online_compl);
1866 lpfc_workq_post_event(phba, &stat2, &online_compl, LPFC_EVT_ONLINE); 1904 rc = lpfc_workq_post_event(phba, &stat2, &online_compl,
1905 LPFC_EVT_ONLINE);
1906 if (rc == 0)
1907 return -ENOMEM;
1908
1867 wait_for_completion(&online_compl); 1909 wait_for_completion(&online_compl);
1868 if (stat2) 1910 if (stat2)
1869 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 1911 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
@@ -1954,7 +1996,7 @@ static DEVICE_ATTR(lpfc_soft_wwnn, S_IRUGO | S_IWUSR,\
1954 1996
1955 1997
1956static int lpfc_poll = 0; 1998static int lpfc_poll = 0;
1957module_param(lpfc_poll, int, 0); 1999module_param(lpfc_poll, int, S_IRUGO);
1958MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:" 2000MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:"
1959 " 0 - none," 2001 " 0 - none,"
1960 " 1 - poll with interrupts enabled" 2002 " 1 - poll with interrupts enabled"
@@ -1964,21 +2006,21 @@ static DEVICE_ATTR(lpfc_poll, S_IRUGO | S_IWUSR,
1964 lpfc_poll_show, lpfc_poll_store); 2006 lpfc_poll_show, lpfc_poll_store);
1965 2007
1966int lpfc_sli_mode = 0; 2008int lpfc_sli_mode = 0;
1967module_param(lpfc_sli_mode, int, 0); 2009module_param(lpfc_sli_mode, int, S_IRUGO);
1968MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" 2010MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:"
1969 " 0 - auto (SLI-3 if supported)," 2011 " 0 - auto (SLI-3 if supported),"
1970 " 2 - select SLI-2 even on SLI-3 capable HBAs," 2012 " 2 - select SLI-2 even on SLI-3 capable HBAs,"
1971 " 3 - select SLI-3"); 2013 " 3 - select SLI-3");
1972 2014
1973int lpfc_enable_npiv = 1; 2015int lpfc_enable_npiv = 1;
1974module_param(lpfc_enable_npiv, int, 0); 2016module_param(lpfc_enable_npiv, int, S_IRUGO);
1975MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); 2017MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality");
1976lpfc_param_show(enable_npiv); 2018lpfc_param_show(enable_npiv);
1977lpfc_param_init(enable_npiv, 1, 0, 1); 2019lpfc_param_init(enable_npiv, 1, 0, 1);
1978static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL); 2020static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL);
1979 2021
1980int lpfc_enable_rrq; 2022int lpfc_enable_rrq;
1981module_param(lpfc_enable_rrq, int, 0); 2023module_param(lpfc_enable_rrq, int, S_IRUGO);
1982MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality"); 2024MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality");
1983lpfc_param_show(enable_rrq); 2025lpfc_param_show(enable_rrq);
1984lpfc_param_init(enable_rrq, 0, 0, 1); 2026lpfc_param_init(enable_rrq, 0, 0, 1);
@@ -2040,7 +2082,7 @@ static DEVICE_ATTR(txcmplq_hw, S_IRUGO,
2040 lpfc_txcmplq_hw_show, NULL); 2082 lpfc_txcmplq_hw_show, NULL);
2041 2083
2042int lpfc_iocb_cnt = 2; 2084int lpfc_iocb_cnt = 2;
2043module_param(lpfc_iocb_cnt, int, 1); 2085module_param(lpfc_iocb_cnt, int, S_IRUGO);
2044MODULE_PARM_DESC(lpfc_iocb_cnt, 2086MODULE_PARM_DESC(lpfc_iocb_cnt,
2045 "Number of IOCBs alloc for ELS, CT, and ABTS: 1k to 5k IOCBs"); 2087 "Number of IOCBs alloc for ELS, CT, and ABTS: 1k to 5k IOCBs");
2046lpfc_param_show(iocb_cnt); 2088lpfc_param_show(iocb_cnt);
@@ -2192,7 +2234,7 @@ static DEVICE_ATTR(lpfc_nodev_tmo, S_IRUGO | S_IWUSR,
2192# disappear until the timer expires. Value range is [0,255]. Default 2234# disappear until the timer expires. Value range is [0,255]. Default
2193# value is 30. 2235# value is 30.
2194*/ 2236*/
2195module_param(lpfc_devloss_tmo, int, 0); 2237module_param(lpfc_devloss_tmo, int, S_IRUGO);
2196MODULE_PARM_DESC(lpfc_devloss_tmo, 2238MODULE_PARM_DESC(lpfc_devloss_tmo,
2197 "Seconds driver will hold I/O waiting " 2239 "Seconds driver will hold I/O waiting "
2198 "for a device to come back"); 2240 "for a device to come back");
@@ -2302,7 +2344,7 @@ LPFC_VPORT_ATTR_R(peer_port_login, 0, 0, 1,
2302# Default value of this parameter is 1. 2344# Default value of this parameter is 1.
2303*/ 2345*/
2304static int lpfc_restrict_login = 1; 2346static int lpfc_restrict_login = 1;
2305module_param(lpfc_restrict_login, int, 0); 2347module_param(lpfc_restrict_login, int, S_IRUGO);
2306MODULE_PARM_DESC(lpfc_restrict_login, 2348MODULE_PARM_DESC(lpfc_restrict_login,
2307 "Restrict virtual ports login to remote initiators."); 2349 "Restrict virtual ports login to remote initiators.");
2308lpfc_vport_param_show(restrict_login); 2350lpfc_vport_param_show(restrict_login);
@@ -2473,7 +2515,7 @@ lpfc_topology_store(struct device *dev, struct device_attribute *attr,
2473 return -EINVAL; 2515 return -EINVAL;
2474} 2516}
2475static int lpfc_topology = 0; 2517static int lpfc_topology = 0;
2476module_param(lpfc_topology, int, 0); 2518module_param(lpfc_topology, int, S_IRUGO);
2477MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology"); 2519MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology");
2478lpfc_param_show(topology) 2520lpfc_param_show(topology)
2479lpfc_param_init(topology, 0, 0, 6) 2521lpfc_param_init(topology, 0, 0, 6)
@@ -2915,7 +2957,7 @@ lpfc_link_speed_store(struct device *dev, struct device_attribute *attr,
2915} 2957}
2916 2958
2917static int lpfc_link_speed = 0; 2959static int lpfc_link_speed = 0;
2918module_param(lpfc_link_speed, int, 0); 2960module_param(lpfc_link_speed, int, S_IRUGO);
2919MODULE_PARM_DESC(lpfc_link_speed, "Select link speed"); 2961MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
2920lpfc_param_show(link_speed) 2962lpfc_param_show(link_speed)
2921 2963
@@ -3043,7 +3085,7 @@ lpfc_aer_support_store(struct device *dev, struct device_attribute *attr,
3043} 3085}
3044 3086
3045static int lpfc_aer_support = 1; 3087static int lpfc_aer_support = 1;
3046module_param(lpfc_aer_support, int, 1); 3088module_param(lpfc_aer_support, int, S_IRUGO);
3047MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support"); 3089MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support");
3048lpfc_param_show(aer_support) 3090lpfc_param_show(aer_support)
3049 3091
@@ -3155,7 +3197,7 @@ LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
3155# The value is set in milliseconds. 3197# The value is set in milliseconds.
3156*/ 3198*/
3157static int lpfc_max_scsicmpl_time; 3199static int lpfc_max_scsicmpl_time;
3158module_param(lpfc_max_scsicmpl_time, int, 0); 3200module_param(lpfc_max_scsicmpl_time, int, S_IRUGO);
3159MODULE_PARM_DESC(lpfc_max_scsicmpl_time, 3201MODULE_PARM_DESC(lpfc_max_scsicmpl_time,
3160 "Use command completion time to control queue depth"); 3202 "Use command completion time to control queue depth");
3161lpfc_vport_param_show(max_scsicmpl_time); 3203lpfc_vport_param_show(max_scsicmpl_time);
@@ -3331,7 +3373,7 @@ LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support");
3331*/ 3373*/
3332unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION; 3374unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION;
3333 3375
3334module_param(lpfc_prot_mask, uint, 0); 3376module_param(lpfc_prot_mask, uint, S_IRUGO);
3335MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); 3377MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask");
3336 3378
3337/* 3379/*
@@ -3343,9 +3385,28 @@ MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask");
3343# 3385#
3344*/ 3386*/
3345unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP; 3387unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP;
3346module_param(lpfc_prot_guard, byte, 0); 3388module_param(lpfc_prot_guard, byte, S_IRUGO);
3347MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type"); 3389MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type");
3348 3390
3391/*
3392 * Delay initial NPort discovery when Clean Address bit is cleared in
3393 * FLOGI/FDISC accept and FCID/Fabric name/Fabric portname is changed.
3394 * This parameter can have value 0 or 1.
3395 * When this parameter is set to 0, no delay is added to the initial
3396 * discovery.
3397 * When this parameter is set to non-zero value, initial Nport discovery is
3398 * delayed by ra_tov seconds when Clean Address bit is cleared in FLOGI/FDISC
3399 * accept and FCID/Fabric name/Fabric portname is changed.
3400 * Driver always delay Nport discovery for subsequent FLOGI/FDISC completion
3401 * when Clean Address bit is cleared in FLOGI/FDISC
3402 * accept and FCID/Fabric name/Fabric portname is changed.
3403 * Default value is 0.
3404 */
3405int lpfc_delay_discovery;
3406module_param(lpfc_delay_discovery, int, S_IRUGO);
3407MODULE_PARM_DESC(lpfc_delay_discovery,
3408 "Delay NPort discovery when Clean Address bit is cleared. "
3409 "Allowed values: 0,1.");
3349 3410
3350/* 3411/*
3351 * lpfc_sg_seg_cnt - Initial Maximum DMA Segment Count 3412 * lpfc_sg_seg_cnt - Initial Maximum DMA Segment Count
@@ -3437,6 +3498,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
3437 &dev_attr_txcmplq_hw, 3498 &dev_attr_txcmplq_hw,
3438 &dev_attr_lpfc_fips_level, 3499 &dev_attr_lpfc_fips_level,
3439 &dev_attr_lpfc_fips_rev, 3500 &dev_attr_lpfc_fips_rev,
3501 &dev_attr_lpfc_dss,
3440 NULL, 3502 NULL,
3441}; 3503};
3442 3504
@@ -4639,6 +4701,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
4639 lpfc_aer_support_init(phba, lpfc_aer_support); 4701 lpfc_aer_support_init(phba, lpfc_aer_support);
4640 lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up); 4702 lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up);
4641 lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt); 4703 lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt);
4704 phba->cfg_enable_dss = 1;
4642 return; 4705 return;
4643} 4706}
4644 4707