diff options
author | jhb <jhb@FreeBSD.org> | 2016-12-05 20:43:25 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-12-05 20:43:25 +0000 |
commit | 14b8e70534d9788f03d27c16ff5957513ea67edc (patch) | |
tree | e4c4064dca3e307af30217c487806cabed81cdc7 /sys/dev/cxgbe/common | |
parent | 2d64e2dd58e247189656af25ac3b78211bd989f9 (diff) | |
download | FreeBSD-src-14b8e70534d9788f03d27c16ff5957513ea67edc.zip FreeBSD-src-14b8e70534d9788f03d27c16ff5957513ea67edc.tar.gz |
MFC 305695,305696,305699,305702,305703,305713,305715,305827,305852,305906,
305908,306062,306063,306137,306138,306206,306216,306273,306295,306301,
306465,309302:
Add support for adapters using the Terminator T6 ASIC.
305695:
cxgbe(4): Set up fl_starve_threshold2 accurately for T6.
305696:
cxgbe(4): Use correct macro for header length with T6 ASICs. This
affects the transmit of the VF driver only.
305699:
cxgbe(4): Update the pad_boundary calculation for T6, which has a
different range of boundaries.
305702:
cxgbe(4): Use smaller min/max bursts for fl descriptors with a T6.
305703:
cxgbe(4): Deal with the slightly different SGE_STAT_CFG in T6.
305713:
cxgbe(4): Add support for additional port types and link speeds.
305715:
cxgbe(4): Catch up with the rename of tlscaps -> cryptocaps. TLS is one
of the capabilities of the crypto engine in T6.
305827:
cxgbe(4): Use the interface's viid to calculate the PF/VF/VFValid fields
to use in tx work requests.
305852:
cxgbe(4): Attach to cards with the Terminator 6 ASIC. T6 cards will
come up as 't6nex' nexus devices with 'cc' ports hanging off them.
The T6 firmware and configuration files will be added as soon as they
are released. For now the driver will try to work with whatever
firmware and configuration is on the card's flash.
305906:
cxgbe/t4_tom: The SMAC entry for a VI is at a different location in the T6.
305908:
cxgbe/t4_tom: Update the active/passive open code to support T6. Data
path works as-is.
306062:
cxgbe(4): Show wcwr_stats for T6 cards.
306063:
cxgbe(4): Setup congestion response for T6 rx queues.
306137:
cxgbetool: Add T6 support to the SGE context decoder.
306138:
Fix typo.
306206:
cxgbe(4): Catch up with the different layout of WHOAMI in T6.
Note that the code moved below t4_prep_adapter() as part of this change
because now it needs a working chip_id().
306216:
cxgbe(4): Fix the output of the "tids" sysctl on T6.
306273:
cxgbe(4): Fix netmap with T6, which doesn't encapsulate SGE_EGR_UPDATE
message inside a FW_MSG. The base NIC already deals with updates in
either form.
306295:
cxgbe(4): Support SIOGIFXMEDIA so that ifconfig displays correct media
for 25Gbps and 100Gbps ports. This should have been part of r305713,
which is when the driver first started reporting extended media types.
306301:
cxgbe(4): Use the port's top speed to figure out whether it is "high
speed" or not (for the purpose of calculating the number of queues etc.)
This does the right thing for 25Gbps and 100Gbps ports.
306465:
cxgbe(4): Claim the T6 -DBG card.
309302:
cxgbe(4): Include firmware for T6 cards in the driver. Update all
firmwares to 1.16.12.0.
Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/dev/cxgbe/common')
-rw-r--r-- | sys/dev/cxgbe/common/common.h | 3 | ||||
-rw-r--r-- | sys/dev/cxgbe/common/t4_hw.c | 47 | ||||
-rw-r--r-- | sys/dev/cxgbe/common/t4vf_hw.c | 14 |
3 files changed, 52 insertions, 12 deletions
diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 954501e..790dbe5 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -578,7 +578,8 @@ int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid, int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode, unsigned int flags); int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid, - unsigned int flags, unsigned int defq); + unsigned int flags, unsigned int defq, unsigned int skeyidx, + unsigned int skey); int t4_read_rss(struct adapter *adapter, u16 *entries); void t4_fw_tp_pio_rw(struct adapter *adap, u32 *vals, unsigned int nregs, unsigned int start_index, unsigned int rw); diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index dbf5ffc..2140d8c 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -3666,8 +3666,9 @@ void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf) } #define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\ - FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G | \ - FW_PORT_CAP_SPEED_100G | FW_PORT_CAP_ANEG) + FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_25G | \ + FW_PORT_CAP_SPEED_40G | FW_PORT_CAP_SPEED_100G | \ + FW_PORT_CAP_ANEG) /** * t4_link_l1cfg - apply link configuration to MAC/PHY @@ -4735,7 +4736,7 @@ int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode, c.u.manual.mode_pkd = cpu_to_be32(V_FW_RSS_GLB_CONFIG_CMD_MODE(mode)); } else if (mode == FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL) { - c.u.basicvirtual.mode_pkd = + c.u.basicvirtual.mode_keymode = cpu_to_be32(V_FW_RSS_GLB_CONFIG_CMD_MODE(mode)); c.u.basicvirtual.synmapen_to_hashtoeplitz = cpu_to_be32(flags); } else @@ -4750,11 +4751,14 @@ int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode, * @viid: the VI id * @flags: RSS flags * @defq: id of the default RSS queue for the VI. + * @skeyidx: RSS secret key table index for non-global mode + * @skey: RSS vf_scramble key for VI. * * Configures VI-specific RSS properties. */ int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid, - unsigned int flags, unsigned int defq) + unsigned int flags, unsigned int defq, unsigned int skeyidx, + unsigned int skey) { struct fw_rss_vi_config_cmd c; @@ -4765,6 +4769,10 @@ int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid, c.retval_len16 = cpu_to_be32(FW_LEN16(c)); c.u.basicvirtual.defaultq_to_udpen = cpu_to_be32(flags | V_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(defq)); + c.u.basicvirtual.secretkeyidx_pkd = cpu_to_be32( + V_FW_RSS_VI_CONFIG_CMD_SECRETKEYIDX(skeyidx)); + c.u.basicvirtual.secretkeyxor = cpu_to_be32(skey); + return t4_wr_mbox(adapter, mbox, &c, sizeof(c), NULL); } @@ -4883,11 +4891,11 @@ void t4_write_rss_key(struct adapter *adap, u32 *key, int idx) if (idx >= 0 && idx < rss_key_addr_cnt) { if (rss_key_addr_cnt > 16) t4_write_reg(adap, A_TP_RSS_CONFIG_VRT, - V_KEYWRADDRX(idx >> 4) | + vrt | V_KEYWRADDRX(idx >> 4) | V_T6_VFWRADDR(idx) | F_KEYWREN); else t4_write_reg(adap, A_TP_RSS_CONFIG_VRT, - V_KEYWRADDR(idx) | F_KEYWREN); + vrt| V_KEYWRADDR(idx) | F_KEYWREN); } } @@ -5772,6 +5780,13 @@ const char *t4_get_port_type_description(enum fw_port_type port_type) "QSA", "QSFP", "BP40_BA", + "KR4_100G", + "CR4_QSFP", + "CR_QSFP", + "CR_SFP28", + "SFP28", + "KR_SFP28", + "CR2_QSFP", }; if (port_type < ARRAY_SIZE(port_type_description)) @@ -7459,8 +7474,12 @@ int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl) speed = 1000; else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_10G)) speed = 10000; + else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_25G)) + speed = 25000; else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_40G)) speed = 40000; + else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_100G)) + speed = 100000; for_each_port(adap, i) { pi = adap2pinfo(adap, i); @@ -7863,8 +7882,10 @@ int t4_init_sge_params(struct adapter *adapter) sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; if (is_t4(adapter)) sp->fl_starve_threshold2 = sp->fl_starve_threshold; - else + else if (is_t5(adapter)) sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(r) * 2 + 1; + else + sp->fl_starve_threshold2 = G_T6_EGRTHRESHOLDPACKING(r) * 2 + 1; /* egress queues: log2 of # of doorbells per BAR2 page */ r = t4_read_reg(adapter, A_SGE_EGRESS_QUEUES_PER_PAGE_PF); @@ -7887,7 +7908,13 @@ int t4_init_sge_params(struct adapter *adapter) sp->sge_control = r; sp->spg_len = r & F_EGRSTATUSPAGESIZE ? 128 : 64; sp->fl_pktshift = G_PKTSHIFT(r); - sp->pad_boundary = 1 << (G_INGPADBOUNDARY(r) + 5); + if (chip_id(adapter) <= CHELSIO_T5) { + sp->pad_boundary = 1 << (G_INGPADBOUNDARY(r) + + X_INGPADBOUNDARY_SHIFT); + } else { + sp->pad_boundary = 1 << (G_INGPADBOUNDARY(r) + + X_T6_INGPADBOUNDARY_SHIFT); + } if (is_t4(adapter)) sp->pack_boundary = sp->pad_boundary; else { @@ -8079,6 +8106,10 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id) return ret; p->vi[0].viid = ret; + if (chip_id(adap) <= CHELSIO_T5) + p->vi[0].smt_idx = (ret & 0x7f) << 1; + else + p->vi[0].smt_idx = (ret & 0x7f); p->tx_chan = j; p->rx_chan_map = t4_get_mps_bg_map(adap, j); p->lport = j; diff --git a/sys/dev/cxgbe/common/t4vf_hw.c b/sys/dev/cxgbe/common/t4vf_hw.c index adbeb0e..009f34b6 100644 --- a/sys/dev/cxgbe/common/t4vf_hw.c +++ b/sys/dev/cxgbe/common/t4vf_hw.c @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "common.h" #include "t4_regs.h" +#include "t4_regs_values.h" #undef msleep #define msleep(x) do { \ @@ -130,9 +131,10 @@ int t4vf_get_sge_params(struct adapter *adapter) sp->fl_starve_threshold = G_EGRTHRESHOLD(vals[5]) * 2 + 1; if (is_t4(adapter)) sp->fl_starve_threshold2 = sp->fl_starve_threshold; + else if (is_t5(adapter)) + sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(vals[5]) * 2 + 1; else - sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(vals[5]) * 2 + - 1; + sp->fl_starve_threshold2 = G_T6_EGRTHRESHOLDPACKING(vals[5]) * 2 + 1; /* * We need the Queues/Page and Host Page Size for our VF. @@ -168,7 +170,13 @@ int t4vf_get_sge_params(struct adapter *adapter) */ sp->spg_len = sp->sge_control & F_EGRSTATUSPAGESIZE ? 128 : 64; sp->fl_pktshift = G_PKTSHIFT(sp->sge_control); - sp->pad_boundary = 1 << (G_INGPADBOUNDARY(sp->sge_control) + 5); + if (chip_id(adapter) <= CHELSIO_T5) { + sp->pad_boundary = 1 << (G_INGPADBOUNDARY(sp->sge_control) + + X_INGPADBOUNDARY_SHIFT); + } else { + sp->pad_boundary = 1 << (G_INGPADBOUNDARY(sp->sge_control) + + X_T6_INGPADBOUNDARY_SHIFT); + } if (is_t4(adapter)) sp->pack_boundary = sp->pad_boundary; else { |