Commit 32e8239c authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Retrieve the hardware bridge mode from the firmware.

Retrieve and store the hardware bridge mode, so that we can implement
ndo_bridge_{get|set)link methods in the next patch.
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent acb20054
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/mii.h> #include <linux/mii.h>
#include <linux/if.h> #include <linux/if.h>
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/if_bridge.h>
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/bpf.h> #include <linux/bpf.h>
#include <net/ip.h> #include <net/ip.h>
...@@ -4610,6 +4611,13 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp) ...@@ -4610,6 +4611,13 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp)
bp->port_partition_type = resp->port_partition_type; bp->port_partition_type = resp->port_partition_type;
break; break;
} }
if (bp->hwrm_spec_code < 0x10707 ||
resp->evb_mode == FUNC_QCFG_RESP_EVB_MODE_VEB)
bp->br_mode = BRIDGE_MODE_VEB;
else if (resp->evb_mode == FUNC_QCFG_RESP_EVB_MODE_VEPA)
bp->br_mode = BRIDGE_MODE_VEPA;
else
bp->br_mode = BRIDGE_MODE_UNDEF;
func_qcfg_exit: func_qcfg_exit:
mutex_unlock(&bp->hwrm_cmd_lock); mutex_unlock(&bp->hwrm_cmd_lock);
......
...@@ -1164,6 +1164,7 @@ struct bnxt { ...@@ -1164,6 +1164,7 @@ struct bnxt {
u8 nge_port_cnt; u8 nge_port_cnt;
__le16 nge_fw_dst_port_id; __le16 nge_fw_dst_port_id;
u8 port_partition_type; u8 port_partition_type;
u16 br_mode;
u16 rx_coal_ticks; u16 rx_coal_ticks;
u16 rx_coal_ticks_irq; u16 rx_coal_ticks_irq;
......
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