Commit ab56dc2e authored by James Smart's avatar James Smart Committed by James Bottomley

[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: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 92494144
...@@ -662,7 +662,7 @@ struct lpfc_hba { ...@@ -662,7 +662,7 @@ struct lpfc_hba {
#define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */ #define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */
#define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */ #define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */
#define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */ #define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */
uint32_t cfg_enable_dss;
lpfc_vpd_t vpd; /* vital product data */ lpfc_vpd_t vpd; /* vital product data */
struct pci_dev *pcidev; struct pci_dev *pcidev;
......
...@@ -678,6 +678,7 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type) ...@@ -678,6 +678,7 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type)
* *
* Notes: * Notes:
* Assumes any error from lpfc_do_offline() will be negative. * Assumes any error from lpfc_do_offline() will be negative.
* Do not make this function static.
* *
* Returns: * Returns:
* lpfc_do_offline() return code if not zero * lpfc_do_offline() return code if not zero
...@@ -1292,6 +1293,28 @@ lpfc_fips_rev_show(struct device *dev, struct device_attribute *attr, ...@@ -1292,6 +1293,28 @@ lpfc_fips_rev_show(struct device *dev, struct device_attribute *attr,
return snprintf(buf, PAGE_SIZE, "%d\n", phba->fips_spec_rev); return snprintf(buf, PAGE_SIZE, "%d\n", phba->fips_spec_rev);
} }
/**
* lpfc_dss_show - Return the current state of dss and the configured state
* @dev: class converted to a Scsi_host structure.
* @attr: device attribute, not used.
* @buf: on return contains the formatted text.
*
* Returns: size of formatted string.
**/
static ssize_t
lpfc_dss_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct Scsi_Host *shost = class_to_shost(dev);
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
struct lpfc_hba *phba = vport->phba;
return snprintf(buf, PAGE_SIZE, "%s - %sOperational\n",
(phba->cfg_enable_dss) ? "Enabled" : "Disabled",
(phba->sli3_options & LPFC_SLI3_DSS_ENABLED) ?
"" : "Not ");
}
/** /**
* lpfc_param_show - Return a cfg attribute value in decimal * lpfc_param_show - Return a cfg attribute value in decimal
* *
...@@ -1611,13 +1634,13 @@ lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \ ...@@ -1611,13 +1634,13 @@ lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
#define LPFC_ATTR(name, defval, minval, maxval, desc) \ #define LPFC_ATTR(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_param_init(name, defval, minval, maxval) lpfc_param_init(name, defval, minval, maxval)
#define LPFC_ATTR_R(name, defval, minval, maxval, desc) \ #define LPFC_ATTR_R(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_param_show(name)\ lpfc_param_show(name)\
lpfc_param_init(name, defval, minval, maxval)\ lpfc_param_init(name, defval, minval, maxval)\
...@@ -1625,7 +1648,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) ...@@ -1625,7 +1648,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
#define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \ #define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_param_show(name)\ lpfc_param_show(name)\
lpfc_param_init(name, defval, minval, maxval)\ lpfc_param_init(name, defval, minval, maxval)\
...@@ -1636,7 +1659,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\ ...@@ -1636,7 +1659,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
#define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \ #define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_param_hex_show(name)\ lpfc_param_hex_show(name)\
lpfc_param_init(name, defval, minval, maxval)\ lpfc_param_init(name, defval, minval, maxval)\
...@@ -1644,7 +1667,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) ...@@ -1644,7 +1667,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
#define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ #define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_param_hex_show(name)\ lpfc_param_hex_show(name)\
lpfc_param_init(name, defval, minval, maxval)\ lpfc_param_init(name, defval, minval, maxval)\
...@@ -1655,13 +1678,13 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\ ...@@ -1655,13 +1678,13 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
#define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \ #define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_vport_param_init(name, defval, minval, maxval) lpfc_vport_param_init(name, defval, minval, maxval)
#define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \ #define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_vport_param_show(name)\ lpfc_vport_param_show(name)\
lpfc_vport_param_init(name, defval, minval, maxval)\ lpfc_vport_param_init(name, defval, minval, maxval)\
...@@ -1669,7 +1692,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) ...@@ -1669,7 +1692,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
#define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \ #define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_vport_param_show(name)\ lpfc_vport_param_show(name)\
lpfc_vport_param_init(name, defval, minval, maxval)\ lpfc_vport_param_init(name, defval, minval, maxval)\
...@@ -1680,7 +1703,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\ ...@@ -1680,7 +1703,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
#define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \ #define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_vport_param_hex_show(name)\ lpfc_vport_param_hex_show(name)\
lpfc_vport_param_init(name, defval, minval, maxval)\ lpfc_vport_param_init(name, defval, minval, maxval)\
...@@ -1688,7 +1711,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) ...@@ -1688,7 +1711,7 @@ static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL)
#define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \ #define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
static uint lpfc_##name = defval;\ static uint lpfc_##name = defval;\
module_param(lpfc_##name, uint, 0);\ module_param(lpfc_##name, uint, S_IRUGO);\
MODULE_PARM_DESC(lpfc_##name, desc);\ MODULE_PARM_DESC(lpfc_##name, desc);\
lpfc_vport_param_hex_show(name)\ lpfc_vport_param_hex_show(name)\
lpfc_vport_param_init(name, defval, minval, maxval)\ 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,7 +1755,7 @@ static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL); static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL);
static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL); static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL);
static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL); static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL);
static DEVICE_ATTR(lpfc_dss, S_IRUGO, lpfc_dss_show, NULL);
static char *lpfc_soft_wwn_key = "C99G71SL8032A"; static char *lpfc_soft_wwn_key = "C99G71SL8032A";
...@@ -1973,7 +1996,7 @@ static DEVICE_ATTR(lpfc_soft_wwnn, S_IRUGO | S_IWUSR,\ ...@@ -1973,7 +1996,7 @@ static DEVICE_ATTR(lpfc_soft_wwnn, S_IRUGO | S_IWUSR,\
static int lpfc_poll = 0; static int lpfc_poll = 0;
module_param(lpfc_poll, int, 0); module_param(lpfc_poll, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:" MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:"
" 0 - none," " 0 - none,"
" 1 - poll with interrupts enabled" " 1 - poll with interrupts enabled"
...@@ -1983,21 +2006,21 @@ static DEVICE_ATTR(lpfc_poll, S_IRUGO | S_IWUSR, ...@@ -1983,21 +2006,21 @@ static DEVICE_ATTR(lpfc_poll, S_IRUGO | S_IWUSR,
lpfc_poll_show, lpfc_poll_store); lpfc_poll_show, lpfc_poll_store);
int lpfc_sli_mode = 0; int lpfc_sli_mode = 0;
module_param(lpfc_sli_mode, int, 0); module_param(lpfc_sli_mode, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:"
" 0 - auto (SLI-3 if supported)," " 0 - auto (SLI-3 if supported),"
" 2 - select SLI-2 even on SLI-3 capable HBAs," " 2 - select SLI-2 even on SLI-3 capable HBAs,"
" 3 - select SLI-3"); " 3 - select SLI-3");
int lpfc_enable_npiv = 1; int lpfc_enable_npiv = 1;
module_param(lpfc_enable_npiv, int, 0); module_param(lpfc_enable_npiv, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality");
lpfc_param_show(enable_npiv); lpfc_param_show(enable_npiv);
lpfc_param_init(enable_npiv, 1, 0, 1); lpfc_param_init(enable_npiv, 1, 0, 1);
static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL); static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL);
int lpfc_enable_rrq; int lpfc_enable_rrq;
module_param(lpfc_enable_rrq, int, 0); module_param(lpfc_enable_rrq, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality"); MODULE_PARM_DESC(lpfc_enable_rrq, "Enable RRQ functionality");
lpfc_param_show(enable_rrq); lpfc_param_show(enable_rrq);
lpfc_param_init(enable_rrq, 0, 0, 1); lpfc_param_init(enable_rrq, 0, 0, 1);
...@@ -2059,7 +2082,7 @@ static DEVICE_ATTR(txcmplq_hw, S_IRUGO, ...@@ -2059,7 +2082,7 @@ static DEVICE_ATTR(txcmplq_hw, S_IRUGO,
lpfc_txcmplq_hw_show, NULL); lpfc_txcmplq_hw_show, NULL);
int lpfc_iocb_cnt = 2; int lpfc_iocb_cnt = 2;
module_param(lpfc_iocb_cnt, int, 1); module_param(lpfc_iocb_cnt, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_iocb_cnt, MODULE_PARM_DESC(lpfc_iocb_cnt,
"Number of IOCBs alloc for ELS, CT, and ABTS: 1k to 5k IOCBs"); "Number of IOCBs alloc for ELS, CT, and ABTS: 1k to 5k IOCBs");
lpfc_param_show(iocb_cnt); lpfc_param_show(iocb_cnt);
...@@ -2211,7 +2234,7 @@ static DEVICE_ATTR(lpfc_nodev_tmo, S_IRUGO | S_IWUSR, ...@@ -2211,7 +2234,7 @@ static DEVICE_ATTR(lpfc_nodev_tmo, S_IRUGO | S_IWUSR,
# disappear until the timer expires. Value range is [0,255]. Default # disappear until the timer expires. Value range is [0,255]. Default
# value is 30. # value is 30.
*/ */
module_param(lpfc_devloss_tmo, int, 0); module_param(lpfc_devloss_tmo, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_devloss_tmo, MODULE_PARM_DESC(lpfc_devloss_tmo,
"Seconds driver will hold I/O waiting " "Seconds driver will hold I/O waiting "
"for a device to come back"); "for a device to come back");
...@@ -2321,7 +2344,7 @@ LPFC_VPORT_ATTR_R(peer_port_login, 0, 0, 1, ...@@ -2321,7 +2344,7 @@ LPFC_VPORT_ATTR_R(peer_port_login, 0, 0, 1,
# Default value of this parameter is 1. # Default value of this parameter is 1.
*/ */
static int lpfc_restrict_login = 1; static int lpfc_restrict_login = 1;
module_param(lpfc_restrict_login, int, 0); module_param(lpfc_restrict_login, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_restrict_login, MODULE_PARM_DESC(lpfc_restrict_login,
"Restrict virtual ports login to remote initiators."); "Restrict virtual ports login to remote initiators.");
lpfc_vport_param_show(restrict_login); lpfc_vport_param_show(restrict_login);
...@@ -2492,7 +2515,7 @@ lpfc_topology_store(struct device *dev, struct device_attribute *attr, ...@@ -2492,7 +2515,7 @@ lpfc_topology_store(struct device *dev, struct device_attribute *attr,
return -EINVAL; return -EINVAL;
} }
static int lpfc_topology = 0; static int lpfc_topology = 0;
module_param(lpfc_topology, int, 0); module_param(lpfc_topology, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology"); MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology");
lpfc_param_show(topology) lpfc_param_show(topology)
lpfc_param_init(topology, 0, 0, 6) lpfc_param_init(topology, 0, 0, 6)
...@@ -2934,7 +2957,7 @@ lpfc_link_speed_store(struct device *dev, struct device_attribute *attr, ...@@ -2934,7 +2957,7 @@ lpfc_link_speed_store(struct device *dev, struct device_attribute *attr,
} }
static int lpfc_link_speed = 0; static int lpfc_link_speed = 0;
module_param(lpfc_link_speed, int, 0); module_param(lpfc_link_speed, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_link_speed, "Select link speed"); MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
lpfc_param_show(link_speed) lpfc_param_show(link_speed)
...@@ -3062,7 +3085,7 @@ lpfc_aer_support_store(struct device *dev, struct device_attribute *attr, ...@@ -3062,7 +3085,7 @@ lpfc_aer_support_store(struct device *dev, struct device_attribute *attr,
} }
static int lpfc_aer_support = 1; static int lpfc_aer_support = 1;
module_param(lpfc_aer_support, int, 1); module_param(lpfc_aer_support, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support"); MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support");
lpfc_param_show(aer_support) lpfc_param_show(aer_support)
...@@ -3174,7 +3197,7 @@ LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1, ...@@ -3174,7 +3197,7 @@ LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
# The value is set in milliseconds. # The value is set in milliseconds.
*/ */
static int lpfc_max_scsicmpl_time; static int lpfc_max_scsicmpl_time;
module_param(lpfc_max_scsicmpl_time, int, 0); module_param(lpfc_max_scsicmpl_time, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_max_scsicmpl_time, MODULE_PARM_DESC(lpfc_max_scsicmpl_time,
"Use command completion time to control queue depth"); "Use command completion time to control queue depth");
lpfc_vport_param_show(max_scsicmpl_time); lpfc_vport_param_show(max_scsicmpl_time);
...@@ -3350,7 +3373,7 @@ LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support"); ...@@ -3350,7 +3373,7 @@ LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support");
*/ */
unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION; unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION;
module_param(lpfc_prot_mask, uint, 0); module_param(lpfc_prot_mask, uint, S_IRUGO);
MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask");
/* /*
...@@ -3362,7 +3385,7 @@ MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); ...@@ -3362,7 +3385,7 @@ MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask");
# #
*/ */
unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP; unsigned char lpfc_prot_guard = SHOST_DIX_GUARD_IP;
module_param(lpfc_prot_guard, byte, 0); module_param(lpfc_prot_guard, byte, S_IRUGO);
MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type"); MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type");
/* /*
...@@ -3380,7 +3403,7 @@ MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type"); ...@@ -3380,7 +3403,7 @@ MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type");
* Default value is 0. * Default value is 0.
*/ */
int lpfc_delay_discovery; int lpfc_delay_discovery;
module_param(lpfc_delay_discovery, int, 0); module_param(lpfc_delay_discovery, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_delay_discovery, MODULE_PARM_DESC(lpfc_delay_discovery,
"Delay NPort discovery when Clean Address bit is cleared. " "Delay NPort discovery when Clean Address bit is cleared. "
"Allowed values: 0,1."); "Allowed values: 0,1.");
...@@ -3475,6 +3498,7 @@ struct device_attribute *lpfc_hba_attrs[] = { ...@@ -3475,6 +3498,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
&dev_attr_txcmplq_hw, &dev_attr_txcmplq_hw,
&dev_attr_lpfc_fips_level, &dev_attr_lpfc_fips_level,
&dev_attr_lpfc_fips_rev, &dev_attr_lpfc_fips_rev,
&dev_attr_lpfc_dss,
NULL, NULL,
}; };
...@@ -4677,6 +4701,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba) ...@@ -4677,6 +4701,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
lpfc_aer_support_init(phba, lpfc_aer_support); lpfc_aer_support_init(phba, lpfc_aer_support);
lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up); lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up);
lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt); lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt);
phba->cfg_enable_dss = 1;
return; return;
} }
......
...@@ -82,23 +82,23 @@ ...@@ -82,23 +82,23 @@
* the HBA. X MUST also be a power of 2. * the HBA. X MUST also be a power of 2.
*/ */
static int lpfc_debugfs_enable = 1; static int lpfc_debugfs_enable = 1;
module_param(lpfc_debugfs_enable, int, 0); module_param(lpfc_debugfs_enable, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_debugfs_enable, "Enable debugfs services"); MODULE_PARM_DESC(lpfc_debugfs_enable, "Enable debugfs services");
/* This MUST be a power of 2 */ /* This MUST be a power of 2 */
static int lpfc_debugfs_max_disc_trc; static int lpfc_debugfs_max_disc_trc;
module_param(lpfc_debugfs_max_disc_trc, int, 0); module_param(lpfc_debugfs_max_disc_trc, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_debugfs_max_disc_trc, MODULE_PARM_DESC(lpfc_debugfs_max_disc_trc,
"Set debugfs discovery trace depth"); "Set debugfs discovery trace depth");
/* This MUST be a power of 2 */ /* This MUST be a power of 2 */
static int lpfc_debugfs_max_slow_ring_trc; static int lpfc_debugfs_max_slow_ring_trc;
module_param(lpfc_debugfs_max_slow_ring_trc, int, 0); module_param(lpfc_debugfs_max_slow_ring_trc, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_debugfs_max_slow_ring_trc, MODULE_PARM_DESC(lpfc_debugfs_max_slow_ring_trc,
"Set debugfs slow ring trace depth"); "Set debugfs slow ring trace depth");
static int lpfc_debugfs_mask_disc_trc; static int lpfc_debugfs_mask_disc_trc;
module_param(lpfc_debugfs_mask_disc_trc, int, 0); module_param(lpfc_debugfs_mask_disc_trc, int, S_IRUGO);
MODULE_PARM_DESC(lpfc_debugfs_mask_disc_trc, MODULE_PARM_DESC(lpfc_debugfs_mask_disc_trc,
"Set debugfs discovery trace mask"); "Set debugfs discovery trace mask");
......
...@@ -3204,7 +3204,10 @@ typedef struct { ...@@ -3204,7 +3204,10 @@ typedef struct {
#define IOERR_SLER_RRQ_RJT_ERR 0x4C #define IOERR_SLER_RRQ_RJT_ERR 0x4C
#define IOERR_SLER_RRQ_RETRY_ERR 0x4D #define IOERR_SLER_RRQ_RETRY_ERR 0x4D
#define IOERR_SLER_ABTS_ERR 0x4E #define IOERR_SLER_ABTS_ERR 0x4E
#define IOERR_ELXSEC_KEY_UNWRAP_ERROR 0xF0
#define IOERR_ELXSEC_KEY_UNWRAP_COMPARE_ERROR 0xF1
#define IOERR_ELXSEC_CRYPTO_ERROR 0xF2
#define IOERR_ELXSEC_CRYPTO_COMPARE_ERROR 0xF3
#define IOERR_DRVR_MASK 0x100 #define IOERR_DRVR_MASK 0x100
#define IOERR_SLI_DOWN 0x101 /* ulpStatus - Driver defined */ #define IOERR_SLI_DOWN 0x101 /* ulpStatus - Driver defined */
#define IOERR_SLI_BRESET 0x102 #define IOERR_SLI_BRESET 0x102
......
...@@ -460,7 +460,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) ...@@ -460,7 +460,7 @@ lpfc_config_port_post(struct lpfc_hba *phba)
|| ((phba->cfg_link_speed == LPFC_USER_LINK_SPEED_16G) || ((phba->cfg_link_speed == LPFC_USER_LINK_SPEED_16G)
&& !(phba->lmt & LMT_16Gb))) { && !(phba->lmt & LMT_16Gb))) {
/* Reset link speed to auto */ /* Reset link speed to auto */
lpfc_printf_log(phba, KERN_WARNING, LOG_LINK_EVENT, lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
"1302 Invalid speed for this board: " "1302 Invalid speed for this board: "
"Reset link speed to auto: x%x\n", "Reset link speed to auto: x%x\n",
phba->cfg_link_speed); phba->cfg_link_speed);
......
...@@ -1263,6 +1263,7 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) ...@@ -1263,6 +1263,7 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
if (phba->sli_rev == LPFC_SLI_REV3 && phba->vpd.sli3Feat.cerbm) { if (phba->sli_rev == LPFC_SLI_REV3 && phba->vpd.sli3Feat.cerbm) {
if (phba->cfg_enable_bg) if (phba->cfg_enable_bg)
mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */ mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */
if (phba->cfg_enable_dss)
mb->un.varCfgPort.cdss = 1; /* Configure Security */ mb->un.varCfgPort.cdss = 1; /* Configure Security */
mb->un.varCfgPort.cerbm = 1; /* Request HBQs */ mb->un.varCfgPort.cerbm = 1; /* Request HBQs */
mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */ mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */
......
...@@ -2508,6 +2508,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, ...@@ -2508,6 +2508,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
break; break;
case IOSTAT_LOCAL_REJECT: case IOSTAT_LOCAL_REJECT:
case IOSTAT_REMOTE_STOP: case IOSTAT_REMOTE_STOP:
if (lpfc_cmd->result == IOERR_ELXSEC_KEY_UNWRAP_ERROR ||
lpfc_cmd->result ==
IOERR_ELXSEC_KEY_UNWRAP_COMPARE_ERROR ||
lpfc_cmd->result == IOERR_ELXSEC_CRYPTO_ERROR ||
lpfc_cmd->result ==
IOERR_ELXSEC_CRYPTO_COMPARE_ERROR) {
cmd->result = ScsiResult(DID_NO_CONNECT, 0);
break;
}
if (lpfc_cmd->result == IOERR_INVALID_RPI || if (lpfc_cmd->result == IOERR_INVALID_RPI ||
lpfc_cmd->result == IOERR_NO_RESOURCES || lpfc_cmd->result == IOERR_NO_RESOURCES ||
lpfc_cmd->result == IOERR_ABORT_REQUESTED || lpfc_cmd->result == IOERR_ABORT_REQUESTED ||
...@@ -2515,7 +2524,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, ...@@ -2515,7 +2524,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
cmd->result = ScsiResult(DID_REQUEUE, 0); cmd->result = ScsiResult(DID_REQUEUE, 0);
break; break;
} }
if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED || if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED ||
lpfc_cmd->result == IOERR_TX_DMA_FAILED) && lpfc_cmd->result == IOERR_TX_DMA_FAILED) &&
pIocbOut->iocb.unsli3.sli3_bg.bgstat) { pIocbOut->iocb.unsli3.sli3_bg.bgstat) {
...@@ -2545,7 +2553,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, ...@@ -2545,7 +2553,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
lpfc_cmd->cur_iocbq.sli4_xritag, lpfc_cmd->cur_iocbq.sli4_xritag,
0, 0); 0, 0);
} }
/* else: fall through */ /* else: fall through */
default: default:
cmd->result = ScsiResult(DID_ERROR, 0); cmd->result = ScsiResult(DID_ERROR, 0);
...@@ -2556,9 +2563,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, ...@@ -2556,9 +2563,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
|| (pnode->nlp_state != NLP_STE_MAPPED_NODE)) || (pnode->nlp_state != NLP_STE_MAPPED_NODE))
cmd->result = ScsiResult(DID_TRANSPORT_DISRUPTED, cmd->result = ScsiResult(DID_TRANSPORT_DISRUPTED,
SAM_STAT_BUSY); SAM_STAT_BUSY);
} else { } else
cmd->result = ScsiResult(DID_OK, 0); cmd->result = ScsiResult(DID_OK, 0);
}
if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) {
uint32_t *lp = (uint32_t *)cmd->sense_buffer; uint32_t *lp = (uint32_t *)cmd->sense_buffer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment