summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgbe/adapter.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-12-05 20:43:25 +0000
committerjhb <jhb@FreeBSD.org>2016-12-05 20:43:25 +0000
commit14b8e70534d9788f03d27c16ff5957513ea67edc (patch)
treee4c4064dca3e307af30217c487806cabed81cdc7 /sys/dev/cxgbe/adapter.h
parent2d64e2dd58e247189656af25ac3b78211bd989f9 (diff)
downloadFreeBSD-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/adapter.h')
-rw-r--r--sys/dev/cxgbe/adapter.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index 1dacc60..2e74f8f 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -225,6 +225,7 @@ struct vi_info {
int if_flags;
uint16_t *rss, *nm_rss;
+ int smt_idx; /* for convenience */
uint16_t viid;
int16_t xact_addr_filt;/* index of exact MAC address filter */
uint16_t rss_size; /* size of VI's RSS table slice */
@@ -745,10 +746,20 @@ struct sge {
struct hw_buf_info hw_buf_info[SGE_FLBUF_SIZES];
};
+struct devnames {
+ const char *nexus_name;
+ const char *ifnet_name;
+ const char *vi_ifnet_name;
+ const char *pf03_drv_name;
+ const char *vf_nexus_name;
+ const char *vf_ifnet_name;
+};
+
struct adapter {
SLIST_ENTRY(adapter) link;
device_t dev;
struct cdev *cdev;
+ const struct devnames *names;
/* PCIe register resources */
int regs_rid;
@@ -828,7 +839,7 @@ struct adapter {
uint16_t niccaps;
uint16_t toecaps;
uint16_t rdmacaps;
- uint16_t tlscaps;
+ uint16_t cryptocaps;
uint16_t iscsicaps;
uint16_t fcoecaps;
@@ -1033,12 +1044,26 @@ is_10G_port(const struct port_info *pi)
}
static inline bool
+is_25G_port(const struct port_info *pi)
+{
+
+ return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) != 0);
+}
+
+static inline bool
is_40G_port(const struct port_info *pi)
{
return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) != 0);
}
+static inline bool
+is_100G_port(const struct port_info *pi)
+{
+
+ return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) != 0);
+}
+
static inline int
port_top_speed(const struct port_info *pi)
{
@@ -1047,6 +1072,8 @@ port_top_speed(const struct port_info *pi)
return (100);
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G)
return (40);
+ if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G)
+ return (25);
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G)
return (10);
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G)
@@ -1094,6 +1121,7 @@ int t4_os_pci_restore_state(struct adapter *);
void t4_os_portmod_changed(const struct adapter *, int);
void t4_os_link_changed(struct adapter *, int, int, int);
void t4_iterate(void (*)(struct adapter *, void *), void *);
+void t4_init_devnames(struct adapter *);
void t4_add_adapter(struct adapter *);
int t4_detach_common(device_t);
int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *);
OpenPOWER on IntegriCloud