Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150330
b: refs/heads/master
c: 3a0c7d2
h: refs/heads/master
v: v3
  • Loading branch information
Brice Goglin authored and David S. Miller committed May 19, 2009
1 parent 6ab6ae9 commit 59d1c3b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab35cd4b8f42b5e4a9338949581a510e98503b28
refs/heads/master: 3a0c7d2d2bc61e510e900cfbb99c42d4eef2a443
17 changes: 13 additions & 4 deletions trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, struct myri10ge_rx_buf *rx,
remainder -= MYRI10GE_ALLOC_SIZE;
}

if (mgp->csum_flag && myri10ge_lro) {
if (dev->features & NETIF_F_LRO) {
rx_frags[0].page_offset += MXGEFW_PAD;
rx_frags[0].size -= MXGEFW_PAD;
len -= MXGEFW_PAD;
Expand Down Expand Up @@ -1716,12 +1716,17 @@ static u32 myri10ge_get_rx_csum(struct net_device *netdev)
static int myri10ge_set_rx_csum(struct net_device *netdev, u32 csum_enabled)
{
struct myri10ge_priv *mgp = netdev_priv(netdev);
int err = 0;

if (csum_enabled)
mgp->csum_flag = MXGEFW_FLAGS_CKSUM;
else
else {
u32 flags = ethtool_op_get_flags(netdev);
err = ethtool_op_set_flags(netdev, (flags & ~ETH_FLAG_LRO));
mgp->csum_flag = 0;
return 0;

}
return err;
}

static int myri10ge_set_tso(struct net_device *netdev, u32 tso_enabled)
Expand Down Expand Up @@ -1904,7 +1909,9 @@ static const struct ethtool_ops myri10ge_ethtool_ops = {
.get_sset_count = myri10ge_get_sset_count,
.get_ethtool_stats = myri10ge_get_ethtool_stats,
.set_msglevel = myri10ge_set_msglevel,
.get_msglevel = myri10ge_get_msglevel
.get_msglevel = myri10ge_get_msglevel,
.get_flags = ethtool_op_get_flags,
.set_flags = ethtool_op_set_flags
};

static int myri10ge_allocate_rings(struct myri10ge_slice_state *ss)
Expand Down Expand Up @@ -3910,6 +3917,8 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

if (dac_enabled)
netdev->features |= NETIF_F_HIGHDMA;
if (myri10ge_lro)
netdev->features |= NETIF_F_LRO;

/* make sure we can get an irq, and that MSI can be
* setup (if available). Also ensure netdev->irq
Expand Down

0 comments on commit 59d1c3b

Please sign in to comment.