Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111885
b: refs/heads/master
c: 78fff83
h: refs/heads/master
i:
  111883: bc434fb
v: v3
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Sep 5, 2008
1 parent b0ac1c9 commit 74db76c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 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: 45c5d3bc1eae7a1d91b12dbee6443109337ec8c3
refs/heads/master: 78fff83b0347d72e996cef883f09c3e5b8544f73
31 changes: 3 additions & 28 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ static char mv643xx_eth_driver_name[] = "mv643xx_eth";
static char mv643xx_eth_driver_version[] = "1.3";

#define MV643XX_ETH_CHECKSUM_OFFLOAD_TX
#define MV643XX_ETH_NAPI
#define MV643XX_ETH_TX_FAST_REFILL

#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
Expand Down Expand Up @@ -616,7 +615,7 @@ static int rxq_process(struct rx_queue *rxq, int budget)
if (cmd_sts & ERROR_SUMMARY)
stats->rx_errors++;

dev_kfree_skb_irq(skb);
dev_kfree_skb(skb);
} else {
/*
* The -4 is for the CRC in the trailer of the
Expand All @@ -630,11 +629,7 @@ static int rxq_process(struct rx_queue *rxq, int budget)
(cmd_sts & 0x0007fff8) >> 3);
}
skb->protocol = eth_type_trans(skb, mp->dev);
#ifdef MV643XX_ETH_NAPI
netif_receive_skb(skb);
#else
netif_rx(skb);
#endif
}

mp->dev->last_rx = jiffies;
Expand All @@ -645,7 +640,6 @@ static int rxq_process(struct rx_queue *rxq, int budget)
return rx;
}

#ifdef MV643XX_ETH_NAPI
static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
{
struct mv643xx_eth_private *mp;
Expand Down Expand Up @@ -681,7 +675,6 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)

return rx;
}
#endif


/* tx ***********************************************************************/
Expand Down Expand Up @@ -1856,23 +1849,13 @@ static irqreturn_t mv643xx_eth_irq(int irq, void *dev_id)
/*
* RxBuffer or RxError set for any of the 8 queues?
*/
#ifdef MV643XX_ETH_NAPI
if (int_cause & INT_RX) {
wrl(mp, INT_CAUSE(mp->port_num), ~(int_cause & INT_RX));
wrl(mp, INT_MASK(mp->port_num), 0x00000000);
rdl(mp, INT_MASK(mp->port_num));

netif_rx_schedule(dev, &mp->napi);
}
#else
if (int_cause & INT_RX) {
int i;

for (i = 7; i >= 0; i--)
if (mp->rxq_mask & (1 << i))
rxq_process(mp->rxq + i, INT_MAX);
}
#endif

/*
* TxBuffer or TxError set for any of the 8 queues?
Expand Down Expand Up @@ -2101,9 +2084,7 @@ static int mv643xx_eth_open(struct net_device *dev)
}
}

#ifdef MV643XX_ETH_NAPI
napi_enable(&mp->napi);
#endif

netif_carrier_off(dev);
netif_stop_queue(dev);
Expand Down Expand Up @@ -2167,9 +2148,8 @@ static int mv643xx_eth_stop(struct net_device *dev)
wrl(mp, INT_MASK(mp->port_num), 0x00000000);
rdl(mp, INT_MASK(mp->port_num));

#ifdef MV643XX_ETH_NAPI
napi_disable(&mp->napi);
#endif

netif_carrier_off(dev);
netif_stop_queue(dev);

Expand Down Expand Up @@ -2632,9 +2612,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
mp->port_num = pd->port_number;

mp->dev = dev;
#ifdef MV643XX_ETH_NAPI

netif_napi_add(dev, &mp->napi, mv643xx_eth_poll, 64);
#endif

set_params(mp, pd);

Expand Down Expand Up @@ -2700,10 +2679,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
if (dev->features & NETIF_F_IP_CSUM)
dev_printk(KERN_NOTICE, &dev->dev, "tx checksum offload\n");

#ifdef MV643XX_ETH_NAPI
dev_printk(KERN_NOTICE, &dev->dev, "napi enabled\n");
#endif

if (mp->tx_desc_sram_size > 0)
dev_printk(KERN_NOTICE, &dev->dev, "configured with sram\n");

Expand Down

0 comments on commit 74db76c

Please sign in to comment.