diff options
author | James Smart <james.smart@emulex.com> | 2011-02-16 12:39:57 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-18 16:35:52 -0500 |
commit | ab56dc2e1d32556971e0729b3a6c37e0ff3104a6 (patch) | |
tree | 181e6ec72607f191b88aa7f0a56a4c00211c9aee /drivers/scsi/lpfc | |
parent | 924941444b481fc862b2de5e1dd7692ca85274d7 (diff) |
[SCSI] lpfc 8.3.21: Initialization and user interface changes
- Make link speed not supported by port message an error message.
- Add support for new SLI failure codes add sysfs parameter to reflect the
security setting and current state.
- Add all lpfc module parameters to the /sys/modules/lpfc/parameters directory.
[jejb: fix up compile failure]
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')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 75 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.c | 8 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 5 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 14 |
7 files changed, 72 insertions, 37 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index e2a763426a7c..f41722e8652a 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -662,7 +662,7 @@ struct lpfc_hba { | |||
662 | #define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */ | 662 | #define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */ |
663 | #define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */ | 663 | #define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */ |
664 | #define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */ | 664 | #define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */ |
665 | 665 | uint32_t cfg_enable_dss; | |
666 | lpfc_vpd_t vpd; /* vital product data */ | 666 | lpfc_vpd_t vpd; /* vital product data */ |
667 | 667 | ||
668 | struct pci_dev *pcidev; | 668 | struct pci_dev *pcidev; |
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index a57f6c0cbbba..e7c020df12fa 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -678,6 +678,7 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type) | |||
678 | * | 678 | * |
679 | * Notes: | 679 | * Notes: |
680 | * 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. | ||
681 | * | 682 | * |
682 | * Returns: | 683 | * Returns: |
683 | * lpfc_do_offline() return code if not zero | 684 | * lpfc_do_offline() return code if not zero |
@@ -1293,6 +1294,28 @@ lpfc_fips_rev_show(struct device *dev, struct device_attribute *attr, | |||
1293 | } | 1294 | } |
1294 | 1295 | ||
1295 | /** | 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 | /** | ||
1296 | * lpfc_param_show - Return a cfg attribute value in decimal | 1319 | * lpfc_param_show - Return a cfg attribute value in decimal |
1297 | * | 1320 | * |
1298 | * Description: | 1321 | * Description: |
@@ -1611,13 +1634,13 @@ lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \ | |||
1611 | 1634 | ||
1612 | #define LPFC_ATTR(name, defval, minval, maxval, desc) \ | 1635 | #define LPFC_ATTR(name, defval, minval, maxval, desc) \ |
1613 | static uint lpfc_##name = defval;\ | 1636 | static uint lpfc_##name = defval;\ |
1614 | module_param(lpfc_##name, uint, 0);\ | 1637 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1615 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1638 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1616 | lpfc_param_init(name, defval, minval, maxval) | 1639 | lpfc_param_init(name, defval, minval, maxval) |
1617 | 1640 | ||
1618 | #define LPFC_ATTR_R(name, defval, minval, maxval, desc) \ | 1641 | #define LPFC_ATTR_R(name, defval, minval, maxval, desc) \ |
1619 | static uint lpfc_##name = defval;\ | 1642 | static uint lpfc_##name = defval;\ |
1620 | module_param(lpfc_##name, uint, 0);\ | 1643 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1621 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1644 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1622 | lpfc_param_show(name)\ | 1645 | lpfc_param_show(name)\ |
1623 | lpfc_param_init(name, defval, minval, maxval)\ | 1646 | lpfc_param_init(name, defval, minval, maxval)\ |
@@ -1625,7 +1648,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) | |||
1625 | 1648 | ||
1626 | #define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \ | 1649 | #define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \ |
1627 | static uint lpfc_##name = defval;\ | 1650 | static uint lpfc_##name = defval;\ |
1628 | module_param(lpfc_##name, uint, 0);\ | 1651 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1629 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1652 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1630 | lpfc_param_show(name)\ | 1653 | lpfc_param_show(name)\ |
1631 | lpfc_param_init(name, defval, minval, maxval)\ | 1654 | lpfc_param_init(name, defval, minval, maxval)\ |
@@ -1636,7 +1659,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\ | |||
1636 | 1659 | ||
1637 | #define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \ | 1660 | #define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \ |
1638 | static uint lpfc_##name = defval;\ | 1661 | static uint lpfc_##name = defval;\ |
1639 | module_param(lpfc_##name, uint, 0);\ | 1662 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1640 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1663 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1641 | lpfc_param_hex_show(name)\ | 1664 | lpfc_param_hex_show(name)\ |
1642 | lpfc_param_init(name, defval, minval, maxval)\ | 1665 | lpfc_param_init(name, defval, minval, maxval)\ |
@@ -1644,7 +1667,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) | |||
1644 | 1667 | ||
1645 | #define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ | 1668 | #define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ |
1646 | static uint lpfc_##name = defval;\ | 1669 | static uint lpfc_##name = defval;\ |
1647 | module_param(lpfc_##name, uint, 0);\ | 1670 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1648 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1671 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1649 | lpfc_param_hex_show(name)\ | 1672 | lpfc_param_hex_show(name)\ |
1650 | lpfc_param_init(name, defval, minval, maxval)\ | 1673 | lpfc_param_init(name, defval, minval, maxval)\ |
@@ -1655,13 +1678,13 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\ | |||
1655 | 1678 | ||
1656 | #define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \ | 1679 | #define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \ |
1657 | static uint lpfc_##name = defval;\ | 1680 | static uint lpfc_##name = defval;\ |
1658 | module_param(lpfc_##name, uint, 0);\ | 1681 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1659 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1682 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1660 | lpfc_vport_param_init(name, defval, minval, maxval) | 1683 | lpfc_vport_param_init(name, defval, minval, maxval) |
1661 | 1684 | ||
1662 | #define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \ | 1685 | #define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \ |
1663 | static uint lpfc_##name = defval;\ | 1686 | static uint lpfc_##name = defval;\ |
1664 | module_param(lpfc_##name, uint, 0);\ | 1687 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1665 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1688 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1666 | lpfc_vport_param_show(name)\ | 1689 | lpfc_vport_param_show(name)\ |
1667 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1690 | lpfc_vport_param_init(name, defval, minval, maxval)\ |
@@ -1669,7 +1692,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) | |||
1669 | 1692 | ||
1670 | #define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \ | 1693 | #define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \ |
1671 | static uint lpfc_##name = defval;\ | 1694 | static uint lpfc_##name = defval;\ |
1672 | module_param(lpfc_##name, uint, 0);\ | 1695 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1673 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1696 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1674 | lpfc_vport_param_show(name)\ | 1697 | lpfc_vport_param_show(name)\ |
1675 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1698 | lpfc_vport_param_init(name, defval, minval, maxval)\ |
@@ -1680,7 +1703,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\ | |||
1680 | 1703 | ||
1681 | #define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \ | 1704 | #define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \ |
1682 | static uint lpfc_##name = defval;\ | 1705 | static uint lpfc_##name = defval;\ |
1683 | module_param(lpfc_##name, uint, 0);\ | 1706 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1684 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1707 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1685 | lpfc_vport_param_hex_show(name)\ | 1708 | lpfc_vport_param_hex_show(name)\ |
1686 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1709 | lpfc_vport_param_init(name, defval, minval, maxval)\ |
@@ -1688,7 +1711,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) | |||
1688 | 1711 | ||
1689 | #define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ | 1712 | #define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ |
1690 | static uint lpfc_##name = defval;\ | 1713 | static uint lpfc_##name = defval;\ |
1691 | module_param(lpfc_##name, uint, 0);\ | 1714 | module_param(lpfc_##name, uint, S_IRUGO);\ |
1692 | MODULE_PARM_DESC(lpfc_##name, desc);\ | 1715 | MODULE_PARM_DESC(lpfc_##name, desc);\ |
1693 | lpfc_vport_param_hex_show(name)\ | 1716 | lpfc_vport_param_hex_show(name)\ |
1694 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1717 | lpfc_vport_param_init(name, defval, minval, maxval)\ |
@@ -1732,7 +1755,7 @@ static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL); | |||
1732 | 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); |
1733 | 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); |
1734 | 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); |
1735 | 1758 | static DEVICE_ATTR(lpfc_dss, S_IRUGO, lpfc_dss_show, NULL); | |
1736 | 1759 | ||
1737 | static char *lpfc_soft_wwn_key = "C99G71SL8032A"; | 1760 | static char *lpfc_soft_wwn_key = "C99G71SL8032A"; |
1738 | 1761 | ||
@@ -1973,7 +1996,7 @@ static DEVICE_ATTR(lpfc_soft_wwnn, S_IRUGO | S_IWUSR,\ | |||
1973 | 1996 | ||
1974 | 1997 | ||
1975 | static int lpfc_poll = 0; | 1998 | static int lpfc_poll = 0; |
1976 | module_param(lpfc_poll, int, 0); | 1999 | module_param(lpfc_poll, int, S_IRUGO); |
1977 | MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:" | 2000 | MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:" |
1978 | " 0 - none," | 2001 | " 0 - none," |
1979 | " 1 - poll with interrupts enabled" | 2002 | " 1 - poll with interrupts enabled" |
@@ -1983,21 +2006,21 @@ static DEVICE_ATTR(lpfc_poll, S_IRUGO | S_IWUSR, | |||
1983 | lpfc_poll_show, lpfc_poll_store); | 2006 | lpfc_poll_show, lpfc_poll_store); |
1984 | 2007 | ||
1985 | int lpfc_sli_mode = 0; | 2008 | int lpfc_sli_mode = 0; |
1986 | module_param(lpfc_sli_mode, int, 0); | 2009 | module_param(lpfc_sli_mode, int, S_IRUGO); |
1987 | MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" | 2010 | MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" |
1988 | " 0 - auto (SLI-3 if supported)," | 2011 | " 0 - auto (SLI-3 if supported)," |
1989 | " 2 - select SLI-2 even on SLI-3 capable HBAs," | 2012 | " 2 - select SLI-2 even on SLI-3 capable HBAs," |
1990 | " 3 - select SLI-3"); | 2013 | " 3 - select SLI-3"); |
1991 | 2014 | ||
1992 | int lpfc_enable_npiv = 1; | 2015 | int lpfc_enable_npiv = 1; |
1993 | module_param(lpfc_enable_npiv, int, 0); | 2016 | module_param(lpfc_enable_npiv, int, S_IRUGO); |
1994 | MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); | 2017 | MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); |
1995 | lpfc_param_show(enable_npiv); | 2018 | lpfc_param_show(enable_npiv); |
1996 | lpfc_param_init(enable_npiv, 1, 0, 1); | 2019 | lpfc_param_init(enable_npiv, 1, 0, 1); |
1997 | 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); |
1998 | 2021 | ||
1999 | int lpfc_enable_rrq; | 2022 | int lpfc_enable_rrq; |
2000 | module_param(lpfc_enable_rrq, int, 0); | 2023 | module_param(lpfc_enable_rrq, int, S_IRUGO); |
2001 | MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality"); | 2024 | MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality"); |
2002 | lpfc_param_show(enable_rrq); | 2025 | lpfc_param_show(enable_rrq); |
2003 | lpfc_param_init(enable_rrq, 0, 0, 1); | 2026 | lpfc_param_init(enable_rrq, 0, 0, 1); |
@@ -2059,7 +2082,7 @@ static DEVICE_ATTR(txcmplq_hw, S_IRUGO, | |||
2059 | lpfc_txcmplq_hw_show, NULL); | 2082 | lpfc_txcmplq_hw_show, NULL); |
2060 | 2083 | ||
2061 | int lpfc_iocb_cnt = 2; | 2084 | int lpfc_iocb_cnt = 2; |
2062 | module_param(lpfc_iocb_cnt, int, 1); | 2085 | module_param(lpfc_iocb_cnt, int, S_IRUGO); |
2063 | MODULE_PARM_DESC(lpfc_iocb_cnt, | 2086 | MODULE_PARM_DESC(lpfc_iocb_cnt, |
2064 | "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"); |
2065 | lpfc_param_show(iocb_cnt); | 2088 | lpfc_param_show(iocb_cnt); |
@@ -2211,7 +2234,7 @@ static DEVICE_ATTR(lpfc_nodev_tmo, S_IRUGO | S_IWUSR, | |||
2211 | # disappear until the timer expires. Value range is [0,255]. Default | 2234 | # disappear until the timer expires. Value range is [0,255]. Default |
2212 | # value is 30. | 2235 | # value is 30. |
2213 | */ | 2236 | */ |
2214 | module_param(lpfc_devloss_tmo, int, 0); | 2237 | module_param(lpfc_devloss_tmo, int, S_IRUGO); |
2215 | MODULE_PARM_DESC(lpfc_devloss_tmo, | 2238 | MODULE_PARM_DESC(lpfc_devloss_tmo, |
2216 | "Seconds driver will hold I/O waiting " | 2239 | "Seconds driver will hold I/O waiting " |
2217 | "for a device to come back"); | 2240 | "for a device to come back"); |
@@ -2321,7 +2344,7 @@ LPFC_VPORT_ATTR_R(peer_port_login, 0, 0, 1, | |||
2321 | # Default value of this parameter is 1. | 2344 | # Default value of this parameter is 1. |
2322 | */ | 2345 | */ |
2323 | static int lpfc_restrict_login = 1; | 2346 | static int lpfc_restrict_login = 1; |
2324 | module_param(lpfc_restrict_login, int, 0); | 2347 | module_param(lpfc_restrict_login, int, S_IRUGO); |
2325 | MODULE_PARM_DESC(lpfc_restrict_login, | 2348 | MODULE_PARM_DESC(lpfc_restrict_login, |
2326 | "Restrict virtual ports login to remote initiators."); | 2349 | "Restrict virtual ports login to remote initiators."); |
2327 | lpfc_vport_param_show(restrict_login); | 2350 | lpfc_vport_param_show(restrict_login); |
@@ -2492,7 +2515,7 @@ lpfc_topology_store(struct device *dev, struct device_attribute *attr, | |||
2492 | return -EINVAL; | 2515 | return -EINVAL; |
2493 | } | 2516 | } |
2494 | static int lpfc_topology = 0; | 2517 | static int lpfc_topology = 0; |
2495 | module_param(lpfc_topology, int, 0); | 2518 | module_param(lpfc_topology, int, S_IRUGO); |
2496 | MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology"); | 2519 | MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology"); |
2497 | lpfc_param_show(topology) | 2520 | lpfc_param_show(topology) |
2498 | lpfc_param_init(topology, 0, 0, 6) | 2521 | lpfc_param_init(topology, 0, 0, 6) |
@@ -2934,7 +2957,7 @@ lpfc_link_speed_store(struct device *dev, struct device_attribute *attr, | |||
2934 | } | 2957 | } |
2935 | 2958 | ||
2936 | static int lpfc_link_speed = 0; | 2959 | static int lpfc_link_speed = 0; |
2937 | module_param(lpfc_link_speed, int, 0); | 2960 | module_param(lpfc_link_speed, int, S_IRUGO); |
2938 | MODULE_PARM_DESC(lpfc_link_speed, "Select link speed"); | 2961 | MODULE_PARM_DESC(lpfc_link_speed, "Select link speed"); |
2939 | lpfc_param_show(link_speed) | 2962 | lpfc_param_show(link_speed) |
2940 | 2963 | ||
@@ -3062,7 +3085,7 @@ lpfc_aer_support_store(struct device *dev, struct device_attribute *attr, | |||
3062 | } | 3085 | } |
3063 | 3086 | ||
3064 | static int lpfc_aer_support = 1; | 3087 | static int lpfc_aer_support = 1; |
3065 | module_param(lpfc_aer_support, int, 1); | 3088 | module_param(lpfc_aer_support, int, S_IRUGO); |
3066 | MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support"); | 3089 | MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support"); |
3067 | lpfc_param_show(aer_support) | 3090 | lpfc_param_show(aer_support) |
3068 | 3091 | ||
@@ -3174,7 +3197,7 @@ LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1, | |||
3174 | # The value is set in milliseconds. | 3197 | # The value is set in milliseconds. |
3175 | */ | 3198 | */ |
3176 | static int lpfc_max_scsicmpl_time; | 3199 | static int lpfc_max_scsicmpl_time; |
3177 | module_param(lpfc_max_scsicmpl_time, int, 0); | 3200 | module_param(lpfc_max_scsicmpl_time, int, S_IRUGO); |
3178 | MODULE_PARM_DESC(lpfc_max_scsicmpl_time, | 3201 | MODULE_PARM_DESC(lpfc_max_scsicmpl_time, |
3179 | "Use command completion time to control queue depth"); | 3202 | "Use command completion time to control queue depth"); |
3180 | lpfc_vport_param_show(max_scsicmpl_time); | 3203 | lpfc_vport_param_show(max_scsicmpl_time); |
@@ -3350,7 +3373,7 @@ LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support"); | |||
3350 | */ | 3373 | */ |
3351 | unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION; | 3374 | unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION; |
3352 | 3375 | ||
3353 | module_param(lpfc_prot_mask, uint, 0); | 3376 | module_param(lpfc_prot_mask, uint, S_IRUGO); |
3354 | MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); | 3377 | MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); |
3355 | 3378 | ||
3356 | /* | 3379 | /* |
@@ -3362,7 +3385,7 @@ MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); | |||
3362 | # | 3385 | # |
3363 | */ | 3386 | */ |
3364 | unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP; | 3387 | unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP; |
3365 | module_param(lpfc_prot_guard, byte, 0); | 3388 | module_param(lpfc_prot_guard, byte, S_IRUGO); |
3366 | MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type"); | 3389 | MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type"); |
3367 | 3390 | ||
3368 | /* | 3391 | /* |
@@ -3380,7 +3403,7 @@ MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type"); | |||
3380 | * Default value is 0. | 3403 | * Default value is 0. |
3381 | */ | 3404 | */ |
3382 | int lpfc_delay_discovery; | 3405 | int lpfc_delay_discovery; |
3383 | module_param(lpfc_delay_discovery, int, 0); | 3406 | module_param(lpfc_delay_discovery, int, S_IRUGO); |
3384 | MODULE_PARM_DESC(lpfc_delay_discovery, | 3407 | MODULE_PARM_DESC(lpfc_delay_discovery, |
3385 | "Delay NPort discovery when Clean Address bit is cleared. " | 3408 | "Delay NPort discovery when Clean Address bit is cleared. " |
3386 | "Allowed values: 0,1."); | 3409 | "Allowed values: 0,1."); |
@@ -3475,6 +3498,7 @@ struct device_attribute *lpfc_hba_attrs[] = { | |||
3475 | &dev_attr_txcmplq_hw, | 3498 | &dev_attr_txcmplq_hw, |
3476 | &dev_attr_lpfc_fips_level, | 3499 | &dev_attr_lpfc_fips_level, |
3477 | &dev_attr_lpfc_fips_rev, | 3500 | &dev_attr_lpfc_fips_rev, |
3501 | &dev_attr_lpfc_dss, | ||
3478 | NULL, | 3502 | NULL, |
3479 | }; | 3503 | }; |
3480 | 3504 | ||
@@ -4677,6 +4701,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba) | |||
4677 | lpfc_aer_support_init(phba, lpfc_aer_support); | 4701 | lpfc_aer_support_init(phba, lpfc_aer_support); |
4678 | lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up); | 4702 | lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up); |
4679 | lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt); | 4703 | lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt); |
4704 | phba->cfg_enable_dss = 1; | ||
4680 | return; | 4705 | return; |
4681 | } | 4706 | } |
4682 | 4707 | ||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index a80d938fafc9..3c8c91a7609c 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c | |||
@@ -82,23 +82,23 @@ | |||
82 | * the HBA. X MUST also be a power of 2. | 82 | * the HBA. X MUST also be a power of 2. |
83 | */ | 83 | */ |
84 | static int lpfc_debugfs_enable = 1; | 84 | static int lpfc_debugfs_enable = 1; |
85 | module_param(lpfc_debugfs_enable, int, 0); | 85 | module_param(lpfc_debugfs_enable, int, S_IRUGO); |
86 | MODULE_PARM_DESC(lpfc_debugfs_enable, "Enable debugfs services"); | 86 | MODULE_PARM_DESC(lpfc_debugfs_enable, "Enable debugfs services"); |
87 | 87 | ||
88 | /* This MUST be a power of 2 */ | 88 | /* This MUST be a power of 2 */ |
89 | static int lpfc_debugfs_max_disc_trc; | 89 | static int lpfc_debugfs_max_disc_trc; |
90 | module_param(lpfc_debugfs_max_disc_trc, int, 0); | 90 | module_param(lpfc_debugfs_max_disc_trc, int, S_IRUGO); |
91 | MODULE_PARM_DESC(lpfc_debugfs_max_disc_trc, | 91 | MODULE_PARM_DESC(lpfc_debugfs_max_disc_trc, |
92 | "Set debugfs discovery trace depth"); | 92 | "Set debugfs discovery trace depth"); |
93 | 93 | ||
94 | /* This MUST be a power of 2 */ | 94 | /* This MUST be a power of 2 */ |
95 | static int lpfc_debugfs_max_slow_ring_trc; | 95 | static int lpfc_debugfs_max_slow_ring_trc; |
96 | module_param(lpfc_debugfs_max_slow_ring_trc, int, 0); | 96 | module_param(lpfc_debugfs_max_slow_ring_trc, int, S_IRUGO); |
97 | MODULE_PARM_DESC(lpfc_debugfs_max_slow_ring_trc, | 97 | MODULE_PARM_DESC(lpfc_debugfs_max_slow_ring_trc, |
98 | "Set debugfs slow ring trace depth"); | 98 | "Set debugfs slow ring trace depth"); |
99 | 99 | ||
100 | static int lpfc_debugfs_mask_disc_trc; | 100 | static int lpfc_debugfs_mask_disc_trc; |
101 | module_param(lpfc_debugfs_mask_disc_trc, int, 0); | 101 | module_param(lpfc_debugfs_mask_disc_trc, int, S_IRUGO); |
102 | MODULE_PARM_DESC(lpfc_debugfs_mask_disc_trc, | 102 | MODULE_PARM_DESC(lpfc_debugfs_mask_disc_trc, |
103 | "Set debugfs discovery trace mask"); | 103 | "Set debugfs discovery trace mask"); |
104 | 104 | ||
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 5a4a196baa90..94ae37c5111a 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h | |||
@@ -3204,7 +3204,10 @@ typedef struct { | |||
3204 | #define IOERR_SLER_RRQ_RJT_ERR 0x4C | 3204 | #define IOERR_SLER_RRQ_RJT_ERR 0x4C |
3205 | #define IOERR_SLER_RRQ_RETRY_ERR 0x4D | 3205 | #define IOERR_SLER_RRQ_RETRY_ERR 0x4D |
3206 | #define IOERR_SLER_ABTS_ERR 0x4E | 3206 | #define IOERR_SLER_ABTS_ERR 0x4E |
3207 | 3207 | #define IOERR_ELXSEC_KEY_UNWRAP_ERROR 0xF0 | |
3208 | #define IOERR_ELXSEC_KEY_UNWRAP_COMPARE_ERROR 0xF1 | ||
3209 | #define IOERR_ELXSEC_CRYPTO_ERROR 0xF2 | ||
3210 | #define IOERR_ELXSEC_CRYPTO_COMPARE_ERROR 0xF3 | ||
3208 | #define IOERR_DRVR_MASK 0x100 | 3211 | #define IOERR_DRVR_MASK 0x100 |
3209 | #define IOERR_SLI_DOWN 0x101 /* ulpStatus - Driver defined */ | 3212 | #define IOERR_SLI_DOWN 0x101 /* ulpStatus - Driver defined */ |
3210 | #define IOERR_SLI_BRESET 0x102 | 3213 | #define IOERR_SLI_BRESET 0x102 |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 5e84d2a6ada6..35665cfb5689 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -460,7 +460,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) | |||
460 | || ((phba->cfg_link_speed == LPFC_USER_LINK_SPEED_16G) | 460 | || ((phba->cfg_link_speed == LPFC_USER_LINK_SPEED_16G) |
461 | && !(phba->lmt & LMT_16Gb))) { | 461 | && !(phba->lmt & LMT_16Gb))) { |
462 | /* Reset link speed to auto */ | 462 | /* Reset link speed to auto */ |
463 | lpfc_printf_log(phba, KERN_WARNING, LOG_LINK_EVENT, | 463 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, |
464 | "1302 Invalid speed for this board: " | 464 | "1302 Invalid speed for this board: " |
465 | "Reset link speed to auto: x%x\n", | 465 | "Reset link speed to auto: x%x\n", |
466 | phba->cfg_link_speed); | 466 | phba->cfg_link_speed); |
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 9fb4345ec021..dba32dfdb59b 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -1263,7 +1263,8 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1263 | if (phba->sli_rev == LPFC_SLI_REV3 && phba->vpd.sli3Feat.cerbm) { | 1263 | if (phba->sli_rev == LPFC_SLI_REV3 && phba->vpd.sli3Feat.cerbm) { |
1264 | if (phba->cfg_enable_bg) | 1264 | if (phba->cfg_enable_bg) |
1265 | mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */ | 1265 | mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */ |
1266 | mb->un.varCfgPort.cdss = 1; /* Configure Security */ | 1266 | if (phba->cfg_enable_dss) |
1267 | mb->un.varCfgPort.cdss = 1; /* Configure Security */ | ||
1267 | mb->un.varCfgPort.cerbm = 1; /* Request HBQs */ | 1268 | mb->un.varCfgPort.cerbm = 1; /* Request HBQs */ |
1268 | mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */ | 1269 | mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */ |
1269 | mb->un.varCfgPort.max_hbq = lpfc_sli_hbq_count(); | 1270 | mb->un.varCfgPort.max_hbq = lpfc_sli_hbq_count(); |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index d482dfc951f3..1255b9d1b1b0 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -2508,6 +2508,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
2508 | break; | 2508 | break; |
2509 | case IOSTAT_LOCAL_REJECT: | 2509 | case IOSTAT_LOCAL_REJECT: |
2510 | case IOSTAT_REMOTE_STOP: | 2510 | case IOSTAT_REMOTE_STOP: |
2511 | if (lpfc_cmd->result == IOERR_ELXSEC_KEY_UNWRAP_ERROR || | ||
2512 | lpfc_cmd->result == | ||
2513 | IOERR_ELXSEC_KEY_UNWRAP_COMPARE_ERROR || | ||
2514 | lpfc_cmd->result == IOERR_ELXSEC_CRYPTO_ERROR || | ||
2515 | lpfc_cmd->result == | ||
2516 | IOERR_ELXSEC_CRYPTO_COMPARE_ERROR) { | ||
2517 | cmd->result = ScsiResult(DID_NO_CONNECT, 0); | ||
2518 | break; | ||
2519 | } | ||
2511 | if (lpfc_cmd->result == IOERR_INVALID_RPI || | 2520 | if (lpfc_cmd->result == IOERR_INVALID_RPI || |
2512 | lpfc_cmd->result == IOERR_NO_RESOURCES || | 2521 | lpfc_cmd->result == IOERR_NO_RESOURCES || |
2513 | lpfc_cmd->result == IOERR_ABORT_REQUESTED || | 2522 | lpfc_cmd->result == IOERR_ABORT_REQUESTED || |
@@ -2515,7 +2524,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
2515 | cmd->result = ScsiResult(DID_REQUEUE, 0); | 2524 | cmd->result = ScsiResult(DID_REQUEUE, 0); |
2516 | break; | 2525 | break; |
2517 | } | 2526 | } |
2518 | |||
2519 | if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED || | 2527 | if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED || |
2520 | lpfc_cmd->result == IOERR_TX_DMA_FAILED) && | 2528 | lpfc_cmd->result == IOERR_TX_DMA_FAILED) && |
2521 | pIocbOut->iocb.unsli3.sli3_bg.bgstat) { | 2529 | pIocbOut->iocb.unsli3.sli3_bg.bgstat) { |
@@ -2545,7 +2553,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
2545 | lpfc_cmd->cur_iocbq.sli4_xritag, | 2553 | lpfc_cmd->cur_iocbq.sli4_xritag, |
2546 | 0, 0); | 2554 | 0, 0); |
2547 | } | 2555 | } |
2548 | |||
2549 | /* else: fall through */ | 2556 | /* else: fall through */ |
2550 | default: | 2557 | default: |
2551 | cmd->result = ScsiResult(DID_ERROR, 0); | 2558 | cmd->result = ScsiResult(DID_ERROR, 0); |
@@ -2556,9 +2563,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
2556 | || (pnode->nlp_state != NLP_STE_MAPPED_NODE)) | 2563 | || (pnode->nlp_state != NLP_STE_MAPPED_NODE)) |
2557 | cmd->result = ScsiResult(DID_TRANSPORT_DISRUPTED, | 2564 | cmd->result = ScsiResult(DID_TRANSPORT_DISRUPTED, |
2558 | SAM_STAT_BUSY); | 2565 | SAM_STAT_BUSY); |
2559 | } else { | 2566 | } else |
2560 | cmd->result = ScsiResult(DID_OK, 0); | 2567 | cmd->result = ScsiResult(DID_OK, 0); |
2561 | } | ||
2562 | 2568 | ||
2563 | if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { | 2569 | if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { |
2564 | uint32_t *lp = (uint32_t *)cmd->sense_buffer; | 2570 | uint32_t *lp = (uint32_t *)cmd->sense_buffer; |