Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290517
b: refs/heads/master
c: 75f58a5
h: refs/heads/master
i:
  290515: 1b91f95
v: v3
  • Loading branch information
Ben Greear authored and Jeff Kirsher committed Mar 1, 2012
1 parent c832b7a commit 7ab7722
Show file tree
Hide file tree
Showing 2 changed files with 17 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: 719cdac54e0237837251a32a3d690bfe9c1e9bed
refs/heads/master: 75f58a537674cdff2122789cfd3cc7a76956ece5
16 changes: 16 additions & 0 deletions trunk/drivers/net/ethernet/intel/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ enum cb_status {
cb_ok = 0x2000,
};

/**
* cb_command - Command Block flags
* @cb_tx_nc: 0: controler does CRC (normal), 1: CRC from skb memory
*/
enum cb_command {
cb_nop = 0x0000,
cb_iaaddr = 0x0001,
Expand All @@ -421,6 +425,7 @@ enum cb_command {
cb_ucode = 0x0005,
cb_dump = 0x0006,
cb_tx_sf = 0x0008,
cb_tx_nc = 0x0010,
cb_cid = 0x1f00,
cb_i = 0x2000,
cb_s = 0x4000,
Expand Down Expand Up @@ -1724,6 +1729,16 @@ static void e100_xmit_prepare(struct nic *nic, struct cb *cb,
struct sk_buff *skb)
{
cb->command = nic->tx_command;

/*
* Use the last 4 bytes of the SKB payload packet as the CRC, used for
* testing, ie sending frames with bad CRC.
*/
if (unlikely(skb->no_fcs))
cb->command |= __constant_cpu_to_le16(cb_tx_nc);
else
cb->command &= ~__constant_cpu_to_le16(cb_tx_nc);

/* interrupt every 16 packets regardless of delay */
if ((nic->cbs_avail & ~15) == nic->cbs_avail)
cb->command |= cpu_to_le16(cb_i);
Expand Down Expand Up @@ -2778,6 +2793,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
return -ENOMEM;

netdev->hw_features |= NETIF_F_RXFCS;
netdev->priv_flags |= IFF_SUPP_NOFCS;

netdev->netdev_ops = &e100_netdev_ops;
SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops);
Expand Down

0 comments on commit 7ab7722

Please sign in to comment.