net/ixgbe/base: update X550 SFP identification
[dpdk.git] / drivers / net / cxgbe / base / common.h
index e524f79..d9f74d9 100644 (file)
@@ -156,6 +156,10 @@ struct tp_params {
        int vnic_shift;
        int port_shift;
        int protocol_shift;
+       int ethertype_shift;
+       int macmatch_shift;
+
+       u64 hash_filter_mask;
 };
 
 struct vpd_params {
@@ -207,6 +211,14 @@ struct rss_params {
        } u;
 };
 
+/*
+ * Maximum resources provisioned for a PCI PF.
+ */
+struct pf_resources {
+       unsigned int neq;      /* N egress Qs */
+       unsigned int niqflint; /* N ingress Qs/w free list(s) & intr */
+};
+
 /*
  * Maximum resources provisioned for a PCI VF.
  */
@@ -230,6 +242,7 @@ struct adapter_params {
        struct pci_params pci;
        struct devlog_params devlog;
        struct rss_params rss;
+       struct pf_resources pfres;
        struct vf_resources vfres;
        enum pcie_memwin drv_memwin;
 
@@ -251,6 +264,8 @@ struct adapter_params {
        unsigned char nports;             /* # of ethernet ports */
        unsigned char portvec;
 
+       unsigned char hash_filter;
+
        enum chip_type chip;              /* chip code */
        struct arch_specific_params arch; /* chip specific params */
 
@@ -314,6 +329,11 @@ static inline int is_pf4(struct adapter *adap)
 #define for_each_port(adapter, iter) \
        for (iter = 0; iter < (adapter)->params.nports; ++iter)
 
+static inline int is_hashfilter(const struct adapter *adap)
+{
+       return adap->params.hash_filter;
+}
+
 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
                            unsigned int mask, unsigned int val);
@@ -369,6 +389,12 @@ int t4_free_vi(struct adapter *adap, unsigned int mbox,
 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
                  int mtu, int promisc, int all_multi, int bcast, int vlanex,
                  bool sleep_ok);
+int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid,
+                        const u8 *addr, const u8 *mask, unsigned int idx,
+                        u8 lookup_type, u8 port_id, bool sleep_ok);
+int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid,
+                         const u8 *addr, const u8 *mask, unsigned int idx,
+                         u8 lookup_type, u8 port_id, bool sleep_ok);
 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
                  int idx, const u8 *addr, bool persist, bool add_smt);
 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
@@ -456,6 +482,7 @@ void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
                       unsigned int nregs, unsigned int start_idx);
 
 int t4_get_vpd_params(struct adapter *adapter, struct vpd_params *p);
+int t4_get_pfres(struct adapter *adapter);
 int t4_read_flash(struct adapter *adapter, unsigned int addr,
                  unsigned int nwords, u32 *data, int byte_oriented);
 int t4_flash_cfg_addr(struct adapter *adapter);