diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-05-31 20:40:33 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-06-12 02:40:31 -0400 |
commit | fab1f6b1e25c2c7e9d0b79e589a5e48fdead47f6 (patch) | |
tree | f5ccc7b3aeee7d4299f3276a90d3c16dddffe5c0 /drivers/net/mv643xx_eth.c | |
parent | 5dc4d174e2fc0a30ae8fbeb0de81d7cef21f8885 (diff) |
mv643xx_eth: kill ->rx_resource_err
The ->rx_resource_err variable doesn't serve a useful purpose --
kill it.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 63e0d0fff95..f23e82c84ae 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -320,8 +320,6 @@ struct mv643xx_eth_private { | |||
320 | u32 tx_sram_addr; /* Base address of tx sram area */ | 320 | u32 tx_sram_addr; /* Base address of tx sram area */ |
321 | u32 tx_sram_size; /* Size of tx sram area */ | 321 | u32 tx_sram_size; /* Size of tx sram area */ |
322 | 322 | ||
323 | int rx_resource_err; /* Rx ring resource error flag */ | ||
324 | |||
325 | /* Tx/Rx rings managment indexes fields. For driver use */ | 323 | /* Tx/Rx rings managment indexes fields. For driver use */ |
326 | 324 | ||
327 | /* Next available and first returning Rx resource */ | 325 | /* Next available and first returning Rx resource */ |
@@ -472,9 +470,6 @@ static FUNC_RET_STATUS rx_return_buff(struct mv643xx_eth_private *mp, | |||
472 | /* Move the used descriptor pointer to the next descriptor */ | 470 | /* Move the used descriptor pointer to the next descriptor */ |
473 | mp->rx_used_desc_q = (used_rx_desc + 1) % mp->rx_ring_size; | 471 | mp->rx_used_desc_q = (used_rx_desc + 1) % mp->rx_ring_size; |
474 | 472 | ||
475 | /* Any Rx return cancels the Rx resource error status */ | ||
476 | mp->rx_resource_err = 0; | ||
477 | |||
478 | spin_unlock_irqrestore(&mp->lock, flags); | 473 | spin_unlock_irqrestore(&mp->lock, flags); |
479 | 474 | ||
480 | return ETH_OK; | 475 | return ETH_OK; |
@@ -531,10 +526,6 @@ static FUNC_RET_STATUS port_receive(struct mv643xx_eth_private *mp, | |||
531 | unsigned int command_status; | 526 | unsigned int command_status; |
532 | unsigned long flags; | 527 | unsigned long flags; |
533 | 528 | ||
534 | /* Do not process Rx ring in case of Rx ring resource error */ | ||
535 | if (mp->rx_resource_err) | ||
536 | return ETH_QUEUE_FULL; | ||
537 | |||
538 | spin_lock_irqsave(&mp->lock, flags); | 529 | spin_lock_irqsave(&mp->lock, flags); |
539 | 530 | ||
540 | /* Get the Rx Desc ring 'curr and 'used' indexes */ | 531 | /* Get the Rx Desc ring 'curr and 'used' indexes */ |
@@ -569,10 +560,6 @@ static FUNC_RET_STATUS port_receive(struct mv643xx_eth_private *mp, | |||
569 | rx_next_curr_desc = (rx_curr_desc + 1) % mp->rx_ring_size; | 560 | rx_next_curr_desc = (rx_curr_desc + 1) % mp->rx_ring_size; |
570 | mp->rx_curr_desc_q = rx_next_curr_desc; | 561 | mp->rx_curr_desc_q = rx_next_curr_desc; |
571 | 562 | ||
572 | /* Rx descriptors exhausted. Set the Rx ring resource error flag */ | ||
573 | if (rx_next_curr_desc == rx_used_desc) | ||
574 | mp->rx_resource_err = 1; | ||
575 | |||
576 | spin_unlock_irqrestore(&mp->lock, flags); | 563 | spin_unlock_irqrestore(&mp->lock, flags); |
577 | 564 | ||
578 | return ETH_OK; | 565 | return ETH_OK; |
@@ -1760,8 +1747,6 @@ static unsigned int set_tx_coal(struct mv643xx_eth_private *mp, | |||
1760 | 1747 | ||
1761 | static void port_init(struct mv643xx_eth_private *mp) | 1748 | static void port_init(struct mv643xx_eth_private *mp) |
1762 | { | 1749 | { |
1763 | mp->rx_resource_err = 0; | ||
1764 | |||
1765 | port_reset(mp); | 1750 | port_reset(mp); |
1766 | 1751 | ||
1767 | init_mac_tables(mp); | 1752 | init_mac_tables(mp); |