From: Stefan Assmann Date: Wed, 29 Jan 2014 09:19:07 +0000 (+0100) Subject: backports: igb fixes for linux-3.2 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=255a290f0705b06fd037dcb7206048a48ed92291;p=openwrt%2Fstaging%2Fblogic.git backports: igb fixes for linux-3.2 - add patches/collateral-evolutions/network/84-ethernet/0009-igb_vlan_rx_vid.patch - add patches/collateral-evolutions/network/84-ethernet/0010-igb_ethtool_ops.patch Signed-off-by: Stefan Assmann Signed-off-by: Hauke Mehrtens --- diff --git a/patches/collateral-evolutions/network/84-ethernet/0009-igb_vlan_rx_vid.patch b/patches/collateral-evolutions/network/84-ethernet/0009-igb_vlan_rx_vid.patch new file mode 100644 index 000000000000..c6d977aa9eb7 --- /dev/null +++ b/patches/collateral-evolutions/network/84-ethernet/0009-igb_vlan_rx_vid.patch @@ -0,0 +1,64 @@ +diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c +index 37e6062..6bf0a88 100644 +--- a/drivers/net/ethernet/intel/igb/igb_main.c ++++ b/drivers/net/ethernet/intel/igb/igb_main.c +@@ -164,10 +164,13 @@ static void igb_vlan_mode(struct net_dev + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + static int igb_vlan_rx_add_vid(struct net_device *, __be16, u16); + static int igb_vlan_rx_kill_vid(struct net_device *, __be16, u16); +-#else ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + static int igb_vlan_rx_add_vid(struct net_device *, u16); + static int igb_vlan_rx_kill_vid(struct net_device *, u16); +-#endif ++#else ++static void igb_vlan_rx_add_vid(struct net_device *, u16); ++static void igb_vlan_rx_kill_vid(struct net_device *, u16); ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */ + static void igb_restore_vlan(struct igb_adapter *); + static void igb_rar_set_qsel(struct igb_adapter *, u8 *, u32 , u8); + static void igb_ping_all_vfs(struct igb_adapter *); +@@ -7185,8 +7188,10 @@ static void igb_vlan_mode(struct net_dev + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + static int igb_vlan_rx_add_vid(struct net_device *netdev, + __be16 proto, u16 vid) +-#else ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + static int igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid) ++#else ++static void igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid) + #endif + { + struct igb_adapter *adapter = netdev_priv(netdev); +@@ -7201,15 +7206,19 @@ static int igb_vlan_rx_add_vid(struct ne + + set_bit(vid, adapter->active_vlans); + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + return 0; ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ + } + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + static int igb_vlan_rx_kill_vid(struct net_device *netdev, + __be16 proto, u16 vid) +-#else ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + static int igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) +-#endif ++#else ++static void igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */ + { + struct igb_adapter *adapter = netdev_priv(netdev); + struct e1000_hw *hw = &adapter->hw; +@@ -7225,7 +7234,9 @@ static int igb_vlan_rx_kill_vid(struct n + + clear_bit(vid, adapter->active_vlans); + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + return 0; ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ + } + + static void igb_restore_vlan(struct igb_adapter *adapter) diff --git a/patches/collateral-evolutions/network/84-ethernet/0010-igb_ethtool_ops.patch b/patches/collateral-evolutions/network/84-ethernet/0010-igb_ethtool_ops.patch new file mode 100644 index 000000000000..aa50dd1be48c --- /dev/null +++ b/patches/collateral-evolutions/network/84-ethernet/0010-igb_ethtool_ops.patch @@ -0,0 +1,48 @@ +diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c +index 3cf9600..5e519ce 100644 +--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c ++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c +@@ -2817,6 +2817,7 @@ static void igb_ethtool_complete(struct + pm_runtime_put(&adapter->pdev->dev); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + static u32 igb_get_rxfh_indir_size(struct net_device *netdev) + { + return IGB_RETA_SIZE; +@@ -2832,6 +2833,7 @@ static int igb_get_rxfh_indir(struct net + + return 0; + } ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ + + void igb_write_rss_indir_tbl(struct igb_adapter *adapter) + { +@@ -2868,6 +2870,7 @@ void igb_write_rss_indir_tbl(struct igb_ + } + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + static int igb_set_rxfh_indir(struct net_device *netdev, const u32 *indir) + { + struct igb_adapter *adapter = netdev_priv(netdev); +@@ -2900,6 +2903,7 @@ static int igb_set_rxfh_indir(struct net + + return 0; + } ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ + + static unsigned int igb_max_channels(struct igb_adapter *adapter) + { +@@ -3022,9 +3026,11 @@ static const struct ethtool_ops igb_etht + .get_module_info = igb_get_module_info, + .get_module_eeprom = igb_get_module_eeprom, + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + .get_rxfh_indir_size = igb_get_rxfh_indir_size, + .get_rxfh_indir = igb_get_rxfh_indir, + .set_rxfh_indir = igb_set_rxfh_indir, ++#endif + .get_channels = igb_get_channels, + .set_channels = igb_set_channels, + .begin = igb_ethtool_begin,