mirror of https://gitee.com/openkylin/linux.git
bnxt_en: Update firmware header file to latest 1.6.0.
Latest interface has the latest DCB command structs. Get and store the max number of lossless TCs the hardware can support. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c5e3deb8a3
commit
87c374ded0
|
@ -186,11 +186,11 @@ static const u16 bnxt_vf_req_snif[] = {
|
|||
};
|
||||
|
||||
static const u16 bnxt_async_events_arr[] = {
|
||||
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE,
|
||||
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD,
|
||||
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED,
|
||||
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE,
|
||||
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE,
|
||||
ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE,
|
||||
ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD,
|
||||
ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED,
|
||||
ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE,
|
||||
ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE,
|
||||
};
|
||||
|
||||
static bool bnxt_vf_pciid(enum board_idx idx)
|
||||
|
@ -1476,8 +1476,8 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons,
|
|||
}
|
||||
|
||||
#define BNXT_GET_EVENT_PORT(data) \
|
||||
((data) & \
|
||||
HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK)
|
||||
((data) & \
|
||||
ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK)
|
||||
|
||||
static int bnxt_async_event_process(struct bnxt *bp,
|
||||
struct hwrm_async_event_cmpl *cmpl)
|
||||
|
@ -1486,7 +1486,7 @@ static int bnxt_async_event_process(struct bnxt *bp,
|
|||
|
||||
/* TODO CHIMP_FW: Define event id's for link change, error etc */
|
||||
switch (event_id) {
|
||||
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: {
|
||||
case ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: {
|
||||
u32 data1 = le32_to_cpu(cmpl->event_data1);
|
||||
struct bnxt_link_info *link_info = &bp->link_info;
|
||||
|
||||
|
@ -1502,13 +1502,13 @@ static int bnxt_async_event_process(struct bnxt *bp,
|
|||
set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
|
||||
/* fall thru */
|
||||
}
|
||||
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
|
||||
case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
|
||||
set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event);
|
||||
break;
|
||||
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
|
||||
case ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
|
||||
set_bit(BNXT_HWRM_PF_UNLOAD_SP_EVENT, &bp->sp_event);
|
||||
break;
|
||||
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED: {
|
||||
case ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED: {
|
||||
u32 data1 = le32_to_cpu(cmpl->event_data1);
|
||||
u16 port_id = BNXT_GET_EVENT_PORT(data1);
|
||||
|
||||
|
@ -1521,7 +1521,7 @@ static int bnxt_async_event_process(struct bnxt *bp,
|
|||
set_bit(BNXT_HWRM_PORT_MODULE_SP_EVENT, &bp->sp_event);
|
||||
break;
|
||||
}
|
||||
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
|
||||
case ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
|
||||
if (BNXT_PF(bp))
|
||||
goto async_event_process_exit;
|
||||
set_bit(BNXT_RESET_TASK_SILENT_SP_EVENT, &bp->sp_event);
|
||||
|
@ -4261,12 +4261,16 @@ static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
|
|||
goto qportcfg_exit;
|
||||
}
|
||||
bp->max_tc = resp->max_configurable_queues;
|
||||
bp->max_lltc = resp->max_configurable_lossless_queues;
|
||||
if (bp->max_tc > BNXT_MAX_QUEUE)
|
||||
bp->max_tc = BNXT_MAX_QUEUE;
|
||||
|
||||
if (resp->queue_cfg_info & QUEUE_QPORTCFG_RESP_QUEUE_CFG_INFO_ASYM_CFG)
|
||||
bp->max_tc = 1;
|
||||
|
||||
if (bp->max_lltc > bp->max_tc)
|
||||
bp->max_lltc = bp->max_tc;
|
||||
|
||||
qptr = &resp->queue_id0;
|
||||
for (i = 0; i < bp->max_tc; i++) {
|
||||
bp->q_info[i].queue_id = *qptr++;
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#define BNXT_H
|
||||
|
||||
#define DRV_MODULE_NAME "bnxt_en"
|
||||
#define DRV_MODULE_VERSION "1.5.0"
|
||||
#define DRV_MODULE_VERSION "1.6.0"
|
||||
|
||||
#define DRV_VER_MAJ 1
|
||||
#define DRV_VER_MIN 5
|
||||
#define DRV_VER_MIN 6
|
||||
#define DRV_VER_UPD 0
|
||||
|
||||
struct tx_bd {
|
||||
|
@ -1010,6 +1010,7 @@ struct bnxt {
|
|||
u32 rss_hash_cfg;
|
||||
|
||||
u8 max_tc;
|
||||
u8 max_lltc; /* lossless TCs */
|
||||
struct bnxt_queue_info q_info[BNXT_MAX_QUEUE];
|
||||
|
||||
unsigned int current_interval;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,8 +34,7 @@ static int bnxt_hwrm_fwd_async_event_cmpl(struct bnxt *bp,
|
|||
/* broadcast this async event to all VFs */
|
||||
req.encap_async_event_target_id = cpu_to_le16(0xffff);
|
||||
async_cmpl = (struct hwrm_async_event_cmpl *)req.encap_async_event_cmpl;
|
||||
async_cmpl->type =
|
||||
cpu_to_le16(HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT);
|
||||
async_cmpl->type = cpu_to_le16(ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT);
|
||||
async_cmpl->event_id = cpu_to_le16(event_id);
|
||||
|
||||
mutex_lock(&bp->hwrm_cmd_lock);
|
||||
|
@ -288,7 +287,7 @@ int bnxt_set_vf_link_state(struct net_device *dev, int vf_id, int link)
|
|||
}
|
||||
if (vf->flags & (BNXT_VF_LINK_UP | BNXT_VF_LINK_FORCED))
|
||||
rc = bnxt_hwrm_fwd_async_event_cmpl(bp, vf,
|
||||
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE);
|
||||
ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -578,8 +577,7 @@ void bnxt_sriov_disable(struct bnxt *bp)
|
|||
|
||||
if (pci_vfs_assigned(bp->pdev)) {
|
||||
bnxt_hwrm_fwd_async_event_cmpl(
|
||||
bp, NULL,
|
||||
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD);
|
||||
bp, NULL, ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD);
|
||||
netdev_warn(bp->dev, "Unable to free %d VFs because some are assigned to VMs.\n",
|
||||
num_vfs);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue