ipv6: remove csummode in ip6_append_data()
[deliverable/linux.git] / drivers / net / ethernet / emulex / benet / be.h
index 9576ac002c23eb8df17cacb49b0d58e7e16d4a90..ecf1a81f26e28a28e49c2b0135ce765d78932561 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "be_hw.h"
 
-#define DRV_VER                        "4.2.116u"
+#define DRV_VER                        "4.2.220u"
 #define DRV_NAME               "be2net"
 #define BE_NAME                        "ServerEngines BladeEngine2 10Gbps NIC"
 #define BE3_NAME               "ServerEngines BladeEngine3 10Gbps NIC"
@@ -162,6 +162,11 @@ static inline void queue_head_inc(struct be_queue_info *q)
        index_inc(&q->head, q->len);
 }
 
+static inline void index_dec(u16 *index, u16 limit)
+{
+       *index = MODULO((*index - 1), limit);
+}
+
 static inline void queue_tail_inc(struct be_queue_info *q)
 {
        index_inc(&q->tail, q->len);
@@ -308,11 +313,33 @@ struct be_vf_cfg {
        u32 tx_rate;
 };
 
+enum vf_state {
+       ENABLED = 0,
+       ASSIGNED = 1
+};
+
 #define BE_FLAGS_LINK_STATUS_INIT              1
 #define BE_FLAGS_WORKER_SCHEDULED              (1 << 3)
 #define BE_UC_PMAC_COUNT               30
 #define BE_VF_UC_PMAC_COUNT            2
 
+struct phy_info {
+       u8 transceiver;
+       u8 autoneg;
+       u8 fc_autoneg;
+       u8 port_type;
+       u16 phy_type;
+       u16 interface_type;
+       u32 misc_params;
+       u16 auto_speeds_supported;
+       u16 fixed_speeds_supported;
+       int link_speed;
+       int forced_port_speed;
+       u32 dac_cable_len;
+       u32 advertising;
+       u32 supported;
+};
+
 struct be_adapter {
        struct pci_dev *pdev;
        struct net_device *netdev;
@@ -377,29 +404,29 @@ struct be_adapter {
        u32 rx_fc;              /* Rx flow control */
        u32 tx_fc;              /* Tx flow control */
        bool stats_cmd_sent;
-       int link_speed;
-       u8 port_type;
-       u8 transceiver;
-       u8 autoneg;
        u8 generation;          /* BladeEngine ASIC generation */
        u32 flash_status;
        struct completion flash_compl;
 
-       u32 num_vfs;
-       u8 is_virtfn;
+       u32 num_vfs;            /* Number of VFs provisioned by PF driver */
+       u32 dev_num_vfs;        /* Number of VFs supported by HW */
+       u8 virtfn;
        struct be_vf_cfg *vf_cfg;
        bool be3_native;
        u32 sli_family;
        u8 hba_port_num;
        u16 pvid;
+       struct phy_info phy;
        u8 wol_cap;
        bool wol;
        u32 max_pmac_cnt;       /* Max secondary UC MACs programmable */
        u32 uc_macs;            /* Count of secondary UC MAC programmed */
 };
 
-#define be_physfn(adapter) (!adapter->is_virtfn)
+#define be_physfn(adapter)             (!adapter->virtfn)
 #define        sriov_enabled(adapter)          (adapter->num_vfs > 0)
+#define        sriov_want(adapter)             (adapter->dev_num_vfs && num_vfs && \
+                                        be_physfn(adapter))
 #define for_all_vfs(adapter, vf_cfg, i)                                        \
        for (i = 0, vf_cfg = &adapter->vf_cfg[i]; i < adapter->num_vfs; \
                i++, vf_cfg++)
@@ -528,14 +555,6 @@ static inline u8 is_udp_pkt(struct sk_buff *skb)
        return val;
 }
 
-static inline void be_check_sriov_fn_type(struct be_adapter *adapter)
-{
-       u32 sli_intf;
-
-       pci_read_config_dword(adapter->pdev, SLI_INTF_REG_OFFSET, &sli_intf);
-       adapter->is_virtfn = (sli_intf & SLI_INTF_FT_MASK) ? 1 : 0;
-}
-
 static inline void be_vf_eth_addr_generate(struct be_adapter *adapter, u8 *mac)
 {
        u32 addr;
@@ -583,4 +602,5 @@ extern void be_link_status_update(struct be_adapter *adapter, u8 link_status);
 extern void be_parse_stats(struct be_adapter *adapter);
 extern int be_load_fw(struct be_adapter *adapter, u8 *func);
 extern bool be_is_wol_supported(struct be_adapter *adapter);
+extern bool be_pause_supported(struct be_adapter *adapter);
 #endif                         /* BE_H */
This page took 0.025719 seconds and 5 git commands to generate.