Skip to content

Commit

Permalink
drivers/net: Kill now superfluous ->last_rx stores.
Browse files Browse the repository at this point in the history
The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.

Drivers need not do it any more.

Some cases had to be skipped over because the drivers
were making use of the ->last_rx value themselves.

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Nov 4, 2008
1 parent ab29109 commit babcda7
Show file tree
Hide file tree
Showing 211 changed files with 1 addition and 276 deletions.
1 change: 0 additions & 1 deletion drivers/net/3c501.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,6 @@ static void el_receive(struct net_device *dev)
insb(DATAPORT, skb_put(skb, pkt_len), pkt_len);
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pkt_len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/3c505.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id)
skb->protocol = eth_type_trans(skb,dev);
dev->stats.rx_bytes += skb->len;
netif_rx(skb);
dev->last_rx = jiffies;
}
}
adapter->dmaing = 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/3c507.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,6 @@ static void el16_rx(struct net_device *dev)

skb->protocol=eth_type_trans(skb,dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pkt_len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/3c509.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,6 @@ el3_rx(struct net_device *dev)
outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */
skb->protocol = eth_type_trans(skb,dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_bytes += pkt_len;
dev->stats.rx_packets++;
continue;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/3c515.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,6 @@ static int corkscrew_rx(struct net_device *dev)
outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pkt_len;
/* Wait a limited time to go to next packet. */
Expand Down Expand Up @@ -1388,7 +1387,6 @@ static int boomerang_rx(struct net_device *dev)
}
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
}
entry = (++vp->cur_rx) % RX_RING_SIZE;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/3c523.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,6 @@ static void elmc_rcv_int(struct net_device *dev)
skb_copy_to_linear_data(skb, (char *) p->base+(unsigned long) rbd->buffer,totlen);
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += totlen;
} else {
Expand Down
1 change: 0 additions & 1 deletion drivers/net/3c527.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,6 @@ static void mc32_rx_ring(struct net_device *dev)
}

skb->protocol=eth_type_trans(skb,dev);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += length;
netif_rx(skb);
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,6 @@ static int vortex_rx(struct net_device *dev)
iowrite16(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
/* Wait a limited time to go to next packet. */
for (i = 200; i >= 0; i--)
Expand Down Expand Up @@ -2529,7 +2528,6 @@ boomerang_rx(struct net_device *dev)
}
}
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
}
entry = (++vp->cur_rx) % RX_RING_SIZE;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/7990.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ static int lance_rx (struct net_device *dev)
len);
skb->protocol = eth_type_trans (skb, dev);
netif_rx (skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ static inline void cp_rx_skb (struct cp_private *cp, struct sk_buff *skb,

cp->dev->stats.rx_packets++;
cp->dev->stats.rx_bytes += skb->len;
cp->dev->last_rx = jiffies;

#if CP_VLAN_TAG_USED
if (cp->vlgrp && (desc->opts2 & cpu_to_le32(RxVlanTagged))) {
Expand Down
1 change: 0 additions & 1 deletion drivers/net/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,6 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,

skb->protocol = eth_type_trans (skb, dev);

dev->last_rx = jiffies;
dev->stats.rx_bytes += pkt_size;
dev->stats.rx_packets++;

Expand Down
1 change: 0 additions & 1 deletion drivers/net/82596.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,6 @@ static inline int i596_rx(struct net_device *dev)
pkt_len);
#endif
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes+=pkt_len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/a2065.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ static int lance_rx (struct net_device *dev)
len);
skb->protocol = eth_type_trans (skb, dev);
netif_rx (skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/acenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,6 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
#endif
netif_rx(skb);

dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += retdesc->size;

Expand Down
1 change: 0 additions & 1 deletion drivers/net/amd8111e.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,6 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget)
lp->coal_conf.rx_packets++;
lp->coal_conf.rx_bytes += pkt_len;
num_rx_pkt++;
dev->last_rx = jiffies;

err_next_pkt:
lp->rx_ring[rx_index].buff_phy_addr
Expand Down
1 change: 0 additions & 1 deletion drivers/net/appletalk/cops.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,6 @@ static void cops_rx(struct net_device *dev)

/* Send packet to a higher place. */
netif_rx(skb);
dev->last_rx = jiffies;
}

static void cops_timeout(struct net_device *dev)
Expand Down
1 change: 0 additions & 1 deletion drivers/net/appletalk/ltpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,6 @@ static int sendup_buffer (struct net_device *dev)

/* toss it onwards */
netif_rx(skb);
dev->last_rx = jiffies;
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/arcnet/arc-rawmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ static void rx(struct net_device *dev, int bufnum,
skb->protocol = __constant_htons(ETH_P_ARCNET);
;
netif_rx(skb);
dev->last_rx = jiffies;
}


Expand Down
1 change: 0 additions & 1 deletion drivers/net/arcnet/capmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ static void rx(struct net_device *dev, int bufnum,
skb->protocol = __constant_htons(ETH_P_ARCNET);
;
netif_rx(skb);
dev->last_rx = jiffies;
}


Expand Down
1 change: 0 additions & 1 deletion drivers/net/arcnet/rfc1051.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ static void rx(struct net_device *dev, int bufnum,

skb->protocol = type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
}


Expand Down
2 changes: 0 additions & 2 deletions drivers/net/arcnet/rfc1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ static void rx(struct net_device *dev, int bufnum,

skb->protocol = type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
} else { /* split packet */
/*
* NOTE: MSDOS ARP packet correction should only need to apply to
Expand Down Expand Up @@ -366,7 +365,6 @@ static void rx(struct net_device *dev, int bufnum,

skb->protocol = type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ariadne.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@ static int ariadne_rx(struct net_device *dev)
#endif

netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pkt_len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/arm/am79c961a.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ am79c961_rx(struct net_device *dev, struct dev_priv *priv)
am_writeword(dev, hdraddr + 2, RMD_OWN);
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
priv->stats.rx_bytes += len;
priv->stats.rx_packets ++;
} else {
Expand Down
1 change: 0 additions & 1 deletion drivers/net/arm/at91_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,6 @@ static void at91ether_rx(struct net_device *dev)
memcpy(skb_put(skb, pktlen), p_recv, pktlen);

skb->protocol = eth_type_trans(skb, dev);
dev->last_rx = jiffies;
dev->stats.rx_bytes += pktlen;
netif_rx(skb);
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/arm/ep93xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ static int ep93xx_rx(struct net_device *dev, int processed, int budget)
skb_put(skb, length);
skb->protocol = eth_type_trans(skb, dev);

dev->last_rx = jiffies;

netif_receive_skb(skb);

ep->stats.rx_packets++;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/arm/ixp4xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ static int eth_poll(struct napi_struct *napi, int budget)
debug_pkt(dev, "eth_poll", skb->data, skb->len);

skb->protocol = eth_type_trans(skb, dev);
dev->last_rx = jiffies;
port->stat.rx_packets++;
port->stat.rx_bytes += skb->len;
netif_receive_skb(skb);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/at1700.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,6 @@ net_rx(struct net_device *dev)
insw(ioaddr + DATAPORT, skb_put(skb,pkt_len), (pkt_len + 1) >> 1);
skb->protocol=eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pkt_len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/atarilance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,6 @@ static int lance_rx( struct net_device *dev )
lp->memcpy_f( skb->data, PKTBUF_ADDR(head), pkt_len );
skb->protocol = eth_type_trans( skb, dev );
netif_rx( skb );
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pkt_len;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/atl1e/atl1e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,6 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que,
netif_receive_skb(skb);
}

netdev->last_rx = jiffies;
skip_pkt:
/* skip current packet whether it's ok or not. */
rx_page->read_offset +=
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,8 +2028,6 @@ static void atl1_intr_rx(struct atl1_adapter *adapter)
buffer_info->skb = NULL;
buffer_info->alloced = 0;
rrd->xsz.valid = 0;

adapter->netdev->last_rx = jiffies;
}

atomic_set(&rrd_ring->next_to_clean, rrd_next_to_clean);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ static void atl2_intr_rx(struct atl2_adapter *adapter)
netif_rx(skb);
netdev->stats.rx_bytes += rx_size;
netdev->stats.rx_packets++;
netdev->last_rx = jiffies;
} else {
netdev->stats.rx_errors++;

Expand Down
1 change: 0 additions & 1 deletion drivers/net/au1000_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,6 @@ static int au1000_rx(struct net_device *dev)
/* next descriptor */
prxd = aup->rx_dma_ring[aup->rx_head];
buff_stat = prxd->buff_stat;
dev->last_rx = jiffies;
}
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ static int b44_rx(struct b44 *bp, int budget)
skb->ip_summed = CHECKSUM_NONE;
skb->protocol = eth_type_trans(skb, bp->dev);
netif_receive_skb(skb);
bp->dev->last_rx = jiffies;
received++;
budget--;
next_pkt:
Expand Down
1 change: 0 additions & 1 deletion drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,6 @@ static void bfin_mac_rx(struct net_device *dev)
blackfin_dcache_invalidate_range((unsigned long)skb->head,
(unsigned long)skb->tail);

dev->last_rx = jiffies;
skb->protocol = eth_type_trans(skb, dev);
#if defined(BFIN_MAC_CSUM_OFFLOAD)
skb->csum = current_rx_ptr->status.ip_payload_csum;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,13 +716,11 @@ static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id)
skb_put(skb, nb);
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->last_rx = jiffies;
++dev->stats.rx_packets;
dev->stats.rx_bytes += nb;
} else {
++dev->stats.rx_dropped;
}
dev->last_rx = jiffies;
if ((skb = bp->rx_bufs[i]) == NULL) {
bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2);
if (skb != NULL)
Expand Down
1 change: 0 additions & 1 deletion drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3000,7 +3000,6 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
#endif
netif_receive_skb(skb);

bp->dev->last_rx = jiffies;
rx_pkt++;

next_rx:
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,6 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
dev_kfree_skb(skb);
}

bp->dev->last_rx = jiffies;

/* put new skb in bin */
fp->tpa_pool[queue].skb = new_skb;
Expand Down Expand Up @@ -1557,7 +1556,6 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
#endif
netif_receive_skb(skb);

bp->dev->last_rx = jiffies;

next_rx:
rx_buf->skb = NULL;
Expand Down Expand Up @@ -8767,7 +8765,6 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode, u8 link_up)
rc = 0;

test_loopback_rx_exit:
bp->dev->last_rx = jiffies;

fp->rx_bd_cons = NEXT_RX_IDX(fp->rx_bd_cons);
fp->rx_bd_prod = NEXT_RX_IDX(fp->rx_bd_prod);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,6 @@ static int cas_rx_ringN(struct cas *cp, int ring, int budget)
cp->net_stats[ring].rx_packets++;
cp->net_stats[ring].rx_bytes += len;
spin_unlock(&cp->stat_lock[ring]);
cp->dev->last_rx = jiffies;

next:
npackets++;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/chelsio/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,6 @@ static void sge_rx(struct sge *sge, struct freelQ *fl, unsigned int len)
st = per_cpu_ptr(sge->port_stats[p->iff], smp_processor_id());

skb->protocol = eth_type_trans(skb, adapter->port[p->iff].dev);
skb->dev->last_rx = jiffies;
if ((adapter->flags & RX_CSUM_ENABLED) && p->csum == 0xffff &&
skb->protocol == htons(ETH_P_IP) &&
(skb->data[9] == IPPROTO_TCP || skb->data[9] == IPPROTO_UDP)) {
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ dma_rx(struct net_device *dev)
}
skb->protocol=eth_type_trans(skb,dev);
netif_rx(skb);
dev->last_rx = jiffies;
lp->stats.rx_packets++;
lp->stats.rx_bytes += length;
}
Expand Down Expand Up @@ -1718,7 +1717,6 @@ net_rx(struct net_device *dev)

skb->protocol=eth_type_trans(skb,dev);
netif_rx(skb);
dev->last_rx = jiffies;
lp->stats.rx_packets++;
lp->stats.rx_bytes += length;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/cxgb3/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,6 @@ static void rx_eth(struct adapter *adap, struct sge_rspq *rq,

skb_pull(skb, sizeof(*p) + pad);
skb->protocol = eth_type_trans(skb, adap->port[p->iff]);
skb->dev->last_rx = jiffies;
pi = netdev_priv(skb->dev);
if (pi->rx_csum_offload && p->csum_valid && p->csum == htons(0xffff) &&
!p->fragment) {
Expand Down
1 change: 0 additions & 1 deletion drivers/net/de600.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ static void de600_rx_intr(struct net_device *dev)
netif_rx(skb);

/* update stats */
dev->last_rx = jiffies;
dev->stats.rx_packets++; /* count all receives */
dev->stats.rx_bytes += size; /* count all received bytes */

Expand Down
1 change: 0 additions & 1 deletion drivers/net/de620.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ static int de620_rx_intr(struct net_device *dev)
PRINTK(("Read %d bytes\n", size));
skb->protocol=eth_type_trans(skb,dev);
netif_rx(skb); /* deliver it "upstairs" */
dev->last_rx = jiffies;
/* count all receives */
dev->stats.rx_packets++;
dev->stats.rx_bytes += size;
Expand Down
Loading

0 comments on commit babcda7

Please sign in to comment.