Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247486
b: refs/heads/master
c: 538dd2e
h: refs/heads/master
v: v3
  • Loading branch information
Mahesh Bandewar authored and David S. Miller committed May 16, 2011
1 parent c28f55a commit 76553fc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5be24ff62d238a3fdd5d15461b420cd72e78a14
refs/heads/master: 538dd2e3976a7c572ee927d6bbebe01bf4d6f128
16 changes: 16 additions & 0 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2840,15 +2840,31 @@ int bnx2x_set_features(struct net_device *dev, u32 features)
{
struct bnx2x *bp = netdev_priv(dev);
u32 flags = bp->flags;
bool bnx2x_reload = false;

if (features & NETIF_F_LRO)
flags |= TPA_ENABLE_FLAG;
else
flags &= ~TPA_ENABLE_FLAG;

if (features & NETIF_F_LOOPBACK) {
if (bp->link_params.loopback_mode != LOOPBACK_BMAC) {
bp->link_params.loopback_mode = LOOPBACK_BMAC;
bnx2x_reload = true;
}
} else {
if (bp->link_params.loopback_mode != LOOPBACK_NONE) {
bp->link_params.loopback_mode = LOOPBACK_NONE;
bnx2x_reload = true;
}
}

if (flags ^ bp->flags) {
bp->flags = flags;
bnx2x_reload = true;
}

if (bnx2x_reload) {
if (bp->recovery_state == BNX2X_RECOVERY_DONE)
return bnx2x_reload_if_running(dev);
/* else: bnx2x_nic_load() will be called at end of recovery */
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9273,6 +9273,9 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
if (bp->flags & USING_DAC_FLAG)
dev->features |= NETIF_F_HIGHDMA;

/* Add Loopback capability to the device */
dev->hw_features |= NETIF_F_LOOPBACK;

#ifdef BCM_DCBNL
dev->dcbnl_ops = &bnx2x_dcbnl_ops;
#endif
Expand Down

0 comments on commit 76553fc

Please sign in to comment.