aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.c16
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c3
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 6ee6601b517..ca2bbc0e5d4 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -2840,15 +2840,31 @@ int bnx2x_set_features(struct net_device *dev, u32 features)
2840{ 2840{
2841 struct bnx2x *bp = netdev_priv(dev); 2841 struct bnx2x *bp = netdev_priv(dev);
2842 u32 flags = bp->flags; 2842 u32 flags = bp->flags;
2843 bool bnx2x_reload = false;
2843 2844
2844 if (features & NETIF_F_LRO) 2845 if (features & NETIF_F_LRO)
2845 flags |= TPA_ENABLE_FLAG; 2846 flags |= TPA_ENABLE_FLAG;
2846 else 2847 else
2847 flags &= ~TPA_ENABLE_FLAG; 2848 flags &= ~TPA_ENABLE_FLAG;
2848 2849
2850 if (features & NETIF_F_LOOPBACK) {
2851 if (bp->link_params.loopback_mode != LOOPBACK_BMAC) {
2852 bp->link_params.loopback_mode = LOOPBACK_BMAC;
2853 bnx2x_reload = true;
2854 }
2855 } else {
2856 if (bp->link_params.loopback_mode != LOOPBACK_NONE) {
2857 bp->link_params.loopback_mode = LOOPBACK_NONE;
2858 bnx2x_reload = true;
2859 }
2860 }
2861
2849 if (flags ^ bp->flags) { 2862 if (flags ^ bp->flags) {
2850 bp->flags = flags; 2863 bp->flags = flags;
2864 bnx2x_reload = true;
2865 }
2851 2866
2867 if (bnx2x_reload) {
2852 if (bp->recovery_state == BNX2X_RECOVERY_DONE) 2868 if (bp->recovery_state == BNX2X_RECOVERY_DONE)
2853 return bnx2x_reload_if_running(dev); 2869 return bnx2x_reload_if_running(dev);
2854 /* else: bnx2x_nic_load() will be called at end of recovery */ 2870 /* else: bnx2x_nic_load() will be called at end of recovery */
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 2762edf956e..f45c0caf324 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -9273,6 +9273,9 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
9273 if (bp->flags & USING_DAC_FLAG) 9273 if (bp->flags & USING_DAC_FLAG)
9274 dev->features |= NETIF_F_HIGHDMA; 9274 dev->features |= NETIF_F_HIGHDMA;
9275 9275
9276 /* Add Loopback capability to the device */
9277 dev->hw_features |= NETIF_F_LOOPBACK;
9278
9276#ifdef BCM_DCBNL 9279#ifdef BCM_DCBNL
9277 dev->dcbnl_ops = &bnx2x_dcbnl_ops; 9280 dev->dcbnl_ops = &bnx2x_dcbnl_ops;
9278#endif 9281#endif