diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 123 |
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 | **/ | ||
1304 | static ssize_t | ||
1305 | lpfc_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) \ |
1599 | static uint lpfc_##name = defval;\ | 1636 | static uint lpfc_##name = defval;\ |
1600 | module_param(lpfc_##name, uint, 0);\ | 1637 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1601 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1638 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1602 | lpfc_param_init(name, defval, minval, maxval) | 1639 | lpfc_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) \ |
1605 | static uint lpfc_##name = defval;\ | 1642 | static uint lpfc_##name = defval;\ |
1606 | module_param(lpfc_##name, uint, 0);\ | 1643 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1607 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1644 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1608 | lpfc_param_show(name)\ | 1645 | lpfc_param_show(name)\ |
1609 | lpfc_param_init(name, defval, minval, maxval)\ | 1646 | lpfc_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) \ |
1613 | static uint lpfc_##name = defval;\ | 1650 | static uint lpfc_##name = defval;\ |
1614 | module_param(lpfc_##name, uint, 0);\ | 1651 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1615 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1652 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1616 | lpfc_param_show(name)\ | 1653 | lpfc_param_show(name)\ |
1617 | lpfc_param_init(name, defval, minval, maxval)\ | 1654 | lpfc_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) \ |
1624 | static uint lpfc_##name = defval;\ | 1661 | static uint lpfc_##name = defval;\ |
1625 | module_param(lpfc_##name, uint, 0);\ | 1662 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1626 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1663 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1627 | lpfc_param_hex_show(name)\ | 1664 | lpfc_param_hex_show(name)\ |
1628 | lpfc_param_init(name, defval, minval, maxval)\ | 1665 | lpfc_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) \ |
1632 | static uint lpfc_##name = defval;\ | 1669 | static uint lpfc_##name = defval;\ |
1633 | module_param(lpfc_##name, uint, 0);\ | 1670 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1634 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1671 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1635 | lpfc_param_hex_show(name)\ | 1672 | lpfc_param_hex_show(name)\ |
1636 | lpfc_param_init(name, defval, minval, maxval)\ | 1673 | lpfc_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) \ |
1643 | static uint lpfc_##name = defval;\ | 1680 | static uint lpfc_##name = defval;\ |
1644 | module_param(lpfc_##name, uint, 0);\ | 1681 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1645 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1682 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1646 | lpfc_vport_param_init(name, defval, minval, maxval) | 1683 | lpfc_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) \ |
1649 | static uint lpfc_##name = defval;\ | 1686 | static uint lpfc_##name = defval;\ |
1650 | module_param(lpfc_##name, uint, 0);\ | 1687 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1651 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1688 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1652 | lpfc_vport_param_show(name)\ | 1689 | lpfc_vport_param_show(name)\ |
1653 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1690 | lpfc_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) \ |
1657 | static uint lpfc_##name = defval;\ | 1694 | static uint lpfc_##name = defval;\ |
1658 | module_param(lpfc_##name, uint, 0);\ | 1695 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1659 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1696 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1660 | lpfc_vport_param_show(name)\ | 1697 | lpfc_vport_param_show(name)\ |
1661 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1698 | lpfc_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) \ |
1668 | static uint lpfc_##name = defval;\ | 1705 | static uint lpfc_##name = defval;\ |
1669 | module_param(lpfc_##name, uint, 0);\ | 1706 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1670 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1707 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1671 | lpfc_vport_param_hex_show(name)\ | 1708 | lpfc_vport_param_hex_show(name)\ |
1672 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1709 | lpfc_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) \ |
1676 | static uint lpfc_##name = defval;\ | 1713 | static uint lpfc_##name = defval;\ |
1677 | module_param(lpfc_##name, uint, 0);\ | 1714 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1678 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1715 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1679 | lpfc_vport_param_hex_show(name)\ | 1716 | lpfc_vport_param_hex_show(name)\ |
1680 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1717 | lpfc_vport_param_init(name, defval, minval, maxval)\ |
@@ -1718,7 +1755,7 @@ static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL); | |||
1718 | static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL); | 1755 | static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL); |
1719 | static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL); | 1756 | static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL); |
1720 | static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL); | 1757 | static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL); |
1721 | 1758 | static DEVICE_ATTR(lpfc_dss, S_IRUGO, lpfc_dss_show, NULL); | |
1722 | 1759 | ||
1723 | static char *lpfc_soft_wwn_key = "C99G71SL8032A"; | 1760 | static 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 | ||
1956 | static int lpfc_poll = 0; | 1998 | static int lpfc_poll = 0; |
1957 | module_param(lpfc_poll, int, 0); | 1999 | module_param(lpfc_poll, int, S_IRUGO); |
1958 | MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:" | 2000 | MODULE_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 | ||
1966 | int lpfc_sli_mode = 0; | 2008 | int lpfc_sli_mode = 0; |
1967 | module_param(lpfc_sli_mode, int, 0); | 2009 | module_param(lpfc_sli_mode, int, S_IRUGO); |
1968 | MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" | 2010 | MODULE_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 | ||
1973 | int lpfc_enable_npiv = 1; | 2015 | int lpfc_enable_npiv = 1; |
1974 | module_param(lpfc_enable_npiv, int, 0); | 2016 | module_param(lpfc_enable_npiv, int, S_IRUGO); |
1975 | MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); | 2017 | MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); |
1976 | lpfc_param_show(enable_npiv); | 2018 | lpfc_param_show(enable_npiv); |
1977 | lpfc_param_init(enable_npiv, 1, 0, 1); | 2019 | lpfc_param_init(enable_npiv, 1, 0, 1); |
1978 | static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL); | 2020 | static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL); |
1979 | 2021 | ||
1980 | int lpfc_enable_rrq; | 2022 | int lpfc_enable_rrq; |
1981 | module_param(lpfc_enable_rrq, int, 0); | 2023 | module_param(lpfc_enable_rrq, int, S_IRUGO); |
1982 | MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality"); | 2024 | MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality"); |
1983 | lpfc_param_show(enable_rrq); | 2025 | lpfc_param_show(enable_rrq); |
1984 | lpfc_param_init(enable_rrq, 0, 0, 1); | 2026 | lpfc_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 | ||
2042 | int lpfc_iocb_cnt = 2; | 2084 | int lpfc_iocb_cnt = 2; |
2043 | module_param(lpfc_iocb_cnt, int, 1); | 2085 | module_param(lpfc_iocb_cnt, int, S_IRUGO); |
2044 | MODULE_PARM_DESC(lpfc_iocb_cnt, | 2086 | MODULE_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"); |
2046 | lpfc_param_show(iocb_cnt); | 2088 | lpfc_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 | */ |
2195 | module_param(lpfc_devloss_tmo, int, 0); | 2237 | module_param(lpfc_devloss_tmo, int, S_IRUGO); |
2196 | MODULE_PARM_DESC(lpfc_devloss_tmo, | 2238 | MODULE_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 | */ |
2304 | static int lpfc_restrict_login = 1; | 2346 | static int lpfc_restrict_login = 1; |
2305 | module_param(lpfc_restrict_login, int, 0); | 2347 | module_param(lpfc_restrict_login, int, S_IRUGO); |
2306 | MODULE_PARM_DESC(lpfc_restrict_login, | 2348 | MODULE_PARM_DESC(lpfc_restrict_login, |
2307 | "Restrict virtual ports login to remote initiators."); | 2349 | "Restrict virtual ports login to remote initiators."); |
2308 | lpfc_vport_param_show(restrict_login); | 2350 | lpfc_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 | } |
2475 | static int lpfc_topology = 0; | 2517 | static int lpfc_topology = 0; |
2476 | module_param(lpfc_topology, int, 0); | 2518 | module_param(lpfc_topology, int, S_IRUGO); |
2477 | MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology"); | 2519 | MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology"); |
2478 | lpfc_param_show(topology) | 2520 | lpfc_param_show(topology) |
2479 | lpfc_param_init(topology, 0, 0, 6) | 2521 | lpfc_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 | ||
2917 | static int lpfc_link_speed = 0; | 2959 | static int lpfc_link_speed = 0; |
2918 | module_param(lpfc_link_speed, int, 0); | 2960 | module_param(lpfc_link_speed, int, S_IRUGO); |
2919 | MODULE_PARM_DESC(lpfc_link_speed, "Select link speed"); | 2961 | MODULE_PARM_DESC(lpfc_link_speed, "Select link speed"); |
2920 | lpfc_param_show(link_speed) | 2962 | lpfc_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 | ||
3045 | static int lpfc_aer_support = 1; | 3087 | static int lpfc_aer_support = 1; |
3046 | module_param(lpfc_aer_support, int, 1); | 3088 | module_param(lpfc_aer_support, int, S_IRUGO); |
3047 | MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support"); | 3089 | MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support"); |
3048 | lpfc_param_show(aer_support) | 3090 | lpfc_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 | */ |
3157 | static int lpfc_max_scsicmpl_time; | 3199 | static int lpfc_max_scsicmpl_time; |
3158 | module_param(lpfc_max_scsicmpl_time, int, 0); | 3200 | module_param(lpfc_max_scsicmpl_time, int, S_IRUGO); |
3159 | MODULE_PARM_DESC(lpfc_max_scsicmpl_time, | 3201 | MODULE_PARM_DESC(lpfc_max_scsicmpl_time, |
3160 | "Use command completion time to control queue depth"); | 3202 | "Use command completion time to control queue depth"); |
3161 | lpfc_vport_param_show(max_scsicmpl_time); | 3203 | lpfc_vport_param_show(max_scsicmpl_time); |
@@ -3331,7 +3373,7 @@ LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support"); | |||
3331 | */ | 3373 | */ |
3332 | unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION; | 3374 | unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION; |
3333 | 3375 | ||
3334 | module_param(lpfc_prot_mask, uint, 0); | 3376 | module_param(lpfc_prot_mask, uint, S_IRUGO); |
3335 | MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); | 3377 | MODULE_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 | */ |
3345 | unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP; | 3387 | unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP; |
3346 | module_param(lpfc_prot_guard, byte, 0); | 3388 | module_param(lpfc_prot_guard, byte, S_IRUGO); |
3347 | MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type"); | 3389 | MODULE_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 | */ | ||
3405 | int lpfc_delay_discovery; | ||
3406 | module_param(lpfc_delay_discovery, int, S_IRUGO); | ||
3407 | MODULE_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 | ||