scsi: qla2xxx: Fix incorrect display of max frame size
commit cf3b4fb655796674e605268bd4bfb47a47c8bce6 upstream.
Replace display field with the correct field.
Link: https://lore.kernel.org/r/20220713052045.10683-3-njavali@marvell.com
Fixes: 8777e4314d
("scsi: qla2xxx: Migrate NVME N2N handling into state machine")
Cc: stable@vger.kernel.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
408bfa1489
commit
6f18b5ad2d
@@ -3857,6 +3857,7 @@ struct qla_hw_data {
|
|||||||
/* SRB cache. */
|
/* SRB cache. */
|
||||||
#define SRB_MIN_REQ 128
|
#define SRB_MIN_REQ 128
|
||||||
mempool_t *srb_mempool;
|
mempool_t *srb_mempool;
|
||||||
|
u8 port_name[WWN_SIZE];
|
||||||
|
|
||||||
volatile struct {
|
volatile struct {
|
||||||
uint32_t mbox_int :1;
|
uint32_t mbox_int :1;
|
||||||
|
@@ -1594,7 +1594,6 @@ qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
|
|||||||
unsigned int callopt)
|
unsigned int callopt)
|
||||||
{
|
{
|
||||||
struct qla_hw_data *ha = vha->hw;
|
struct qla_hw_data *ha = vha->hw;
|
||||||
struct init_cb_24xx *icb24 = (void *)ha->init_cb;
|
|
||||||
struct new_utsname *p_sysid = utsname();
|
struct new_utsname *p_sysid = utsname();
|
||||||
struct ct_fdmi_hba_attr *eiter;
|
struct ct_fdmi_hba_attr *eiter;
|
||||||
uint16_t alen;
|
uint16_t alen;
|
||||||
@@ -1756,8 +1755,8 @@ qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
|
|||||||
/* MAX CT Payload Length */
|
/* MAX CT Payload Length */
|
||||||
eiter = entries + size;
|
eiter = entries + size;
|
||||||
eiter->type = cpu_to_be16(FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH);
|
eiter->type = cpu_to_be16(FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH);
|
||||||
eiter->a.max_ct_len = cpu_to_be32(le16_to_cpu(IS_FWI2_CAPABLE(ha) ?
|
eiter->a.max_ct_len = cpu_to_be32(ha->frame_payload_size >> 2);
|
||||||
icb24->frame_payload_size : ha->init_cb->frame_payload_size));
|
|
||||||
alen = sizeof(eiter->a.max_ct_len);
|
alen = sizeof(eiter->a.max_ct_len);
|
||||||
alen += FDMI_ATTR_TYPELEN(eiter);
|
alen += FDMI_ATTR_TYPELEN(eiter);
|
||||||
eiter->len = cpu_to_be16(alen);
|
eiter->len = cpu_to_be16(alen);
|
||||||
@@ -1849,7 +1848,6 @@ qla2x00_port_attributes(scsi_qla_host_t *vha, void *entries,
|
|||||||
unsigned int callopt)
|
unsigned int callopt)
|
||||||
{
|
{
|
||||||
struct qla_hw_data *ha = vha->hw;
|
struct qla_hw_data *ha = vha->hw;
|
||||||
struct init_cb_24xx *icb24 = (void *)ha->init_cb;
|
|
||||||
struct new_utsname *p_sysid = utsname();
|
struct new_utsname *p_sysid = utsname();
|
||||||
char *hostname = p_sysid ?
|
char *hostname = p_sysid ?
|
||||||
p_sysid->nodename : fc_host_system_hostname(vha->host);
|
p_sysid->nodename : fc_host_system_hostname(vha->host);
|
||||||
@@ -1901,8 +1899,7 @@ qla2x00_port_attributes(scsi_qla_host_t *vha, void *entries,
|
|||||||
/* Max frame size. */
|
/* Max frame size. */
|
||||||
eiter = entries + size;
|
eiter = entries + size;
|
||||||
eiter->type = cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE);
|
eiter->type = cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE);
|
||||||
eiter->a.max_frame_size = cpu_to_be32(le16_to_cpu(IS_FWI2_CAPABLE(ha) ?
|
eiter->a.max_frame_size = cpu_to_be32(ha->frame_payload_size);
|
||||||
icb24->frame_payload_size : ha->init_cb->frame_payload_size));
|
|
||||||
alen = sizeof(eiter->a.max_frame_size);
|
alen = sizeof(eiter->a.max_frame_size);
|
||||||
alen += FDMI_ATTR_TYPELEN(eiter);
|
alen += FDMI_ATTR_TYPELEN(eiter);
|
||||||
eiter->len = cpu_to_be16(alen);
|
eiter->len = cpu_to_be16(alen);
|
||||||
|
@@ -4328,6 +4328,8 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
|
|||||||
BIT_6) != 0;
|
BIT_6) != 0;
|
||||||
ql_dbg(ql_dbg_init, vha, 0x00bc, "FA-WWPN Support: %s.\n",
|
ql_dbg(ql_dbg_init, vha, 0x00bc, "FA-WWPN Support: %s.\n",
|
||||||
(ha->flags.fawwpn_enabled) ? "enabled" : "disabled");
|
(ha->flags.fawwpn_enabled) ? "enabled" : "disabled");
|
||||||
|
/* Init_cb will be reused for other command(s). Save a backup copy of port_name */
|
||||||
|
memcpy(ha->port_name, ha->init_cb->port_name, WWN_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = qla2x00_init_firmware(vha, ha->init_cb_size);
|
rval = qla2x00_init_firmware(vha, ha->init_cb_size);
|
||||||
|
@@ -1202,9 +1202,7 @@ skip_rio:
|
|||||||
if (!vha->vp_idx) {
|
if (!vha->vp_idx) {
|
||||||
if (ha->flags.fawwpn_enabled &&
|
if (ha->flags.fawwpn_enabled &&
|
||||||
(ha->current_topology == ISP_CFG_F)) {
|
(ha->current_topology == ISP_CFG_F)) {
|
||||||
void *wwpn = ha->init_cb->port_name;
|
memcpy(vha->port_name, ha->port_name, WWN_SIZE);
|
||||||
|
|
||||||
memcpy(vha->port_name, wwpn, WWN_SIZE);
|
|
||||||
fc_host_port_name(vha->host) =
|
fc_host_port_name(vha->host) =
|
||||||
wwn_to_u64(vha->port_name);
|
wwn_to_u64(vha->port_name);
|
||||||
ql_dbg(ql_dbg_init + ql_dbg_verbose,
|
ql_dbg(ql_dbg_init + ql_dbg_verbose,
|
||||||
|
Reference in New Issue
Block a user