]> Pileus Git - ~andy/linux/blobdiff - drivers/net/igb/igb.h
igb: remove unused rx_hdr_split statistic
[~andy/linux] / drivers / net / igb / igb.h
index 4ff6f0567f3f1184382712b3ee0c4bf9ac0fd2e0..88fdfe4961d8aedd2d0810d8baa41f00798700fd 100644 (file)
 
 struct igb_adapter;
 
-#ifdef CONFIG_IGB_LRO
-#include <linux/inet_lro.h>
-#define MAX_LRO_AGGR                      32
-#define MAX_LRO_DESCRIPTORS                8
-#endif
-
 /* Interrupt defines */
-#define IGB_MAX_TX_CLEAN 72
-
 #define IGB_MIN_DYN_ITR 3000
 #define IGB_MAX_DYN_ITR 96000
 
@@ -127,7 +119,8 @@ struct igb_buffer {
                /* TX */
                struct {
                        unsigned long time_stamp;
-                       u32 length;
+                       u16 length;
+                       u16 next_to_watch;
                };
                /* RX */
                struct {
@@ -160,7 +153,8 @@ struct igb_ring {
        u16 itr_register;
        u16 cpu;
 
-       int queue_index;
+       u16 queue_index;
+       u16 reg_idx;
        unsigned int total_bytes;
        unsigned int total_packets;
 
@@ -176,10 +170,6 @@ struct igb_ring {
                        struct napi_struct napi;
                        int set_itr;
                        struct igb_ring *buddy;
-#ifdef CONFIG_IGB_LRO
-                       struct net_lro_mgr lro_mgr;
-                       bool lro_used;
-#endif
                };
        };
 
@@ -248,7 +238,6 @@ struct igb_adapter {
 
        u64 hw_csum_err;
        u64 hw_csum_good;
-       u64 rx_hdr_split;
        u32 alloc_rx_buff_failed;
        bool rx_csum;
        u32 gorc;
@@ -283,26 +272,17 @@ struct igb_adapter {
        unsigned int flags;
        u32 eeprom_wol;
 
-       /* for ioport free */
-       int bars;
-       int need_ioport;
-
        struct igb_ring *multi_tx_table[IGB_MAX_TX_QUEUES];
-#ifdef CONFIG_IGB_LRO
-       unsigned int lro_max_aggr;
-       unsigned int lro_aggregated;
-       unsigned int lro_flushed;
-       unsigned int lro_no_desc;
-#endif
+       unsigned int tx_ring_count;
+       unsigned int rx_ring_count;
 };
 
 #define IGB_FLAG_HAS_MSI           (1 << 0)
 #define IGB_FLAG_MSI_ENABLE        (1 << 1)
-#define IGB_FLAG_HAS_DCA           (1 << 2)
-#define IGB_FLAG_DCA_ENABLED       (1 << 3)
-#define IGB_FLAG_IN_NETPOLL        (1 << 5)
-#define IGB_FLAG_QUAD_PORT_A       (1 << 6)
-#define IGB_FLAG_NEED_CTX_IDX      (1 << 7)
+#define IGB_FLAG_DCA_ENABLED       (1 << 2)
+#define IGB_FLAG_IN_NETPOLL        (1 << 3)
+#define IGB_FLAG_QUAD_PORT_A       (1 << 4)
+#define IGB_FLAG_NEED_CTX_IDX      (1 << 5)
 
 enum e1000_state_t {
        __IGB_TESTING,
@@ -325,7 +305,41 @@ extern void igb_reset(struct igb_adapter *);
 extern int igb_set_spd_dplx(struct igb_adapter *, u16);
 extern int igb_setup_tx_resources(struct igb_adapter *, struct igb_ring *);
 extern int igb_setup_rx_resources(struct igb_adapter *, struct igb_ring *);
+extern void igb_free_tx_resources(struct igb_ring *);
+extern void igb_free_rx_resources(struct igb_ring *);
 extern void igb_update_stats(struct igb_adapter *);
 extern void igb_set_ethtool_ops(struct net_device *);
 
+static inline s32 igb_reset_phy(struct e1000_hw *hw)
+{
+       if (hw->phy.ops.reset)
+               return hw->phy.ops.reset(hw);
+
+       return 0;
+}
+
+static inline s32 igb_read_phy_reg(struct e1000_hw *hw, u32 offset, u16 *data)
+{
+       if (hw->phy.ops.read_reg)
+               return hw->phy.ops.read_reg(hw, offset, data);
+
+       return 0;
+}
+
+static inline s32 igb_write_phy_reg(struct e1000_hw *hw, u32 offset, u16 data)
+{
+       if (hw->phy.ops.write_reg)
+               return hw->phy.ops.write_reg(hw, offset, data);
+
+       return 0;
+}
+
+static inline s32 igb_get_phy_info(struct e1000_hw *hw)
+{
+       if (hw->phy.ops.get_phy_info)
+               return hw->phy.ops.get_phy_info(hw);
+
+       return 0;
+}
+
 #endif /* _IGB_H_ */