u32 tx_sram_addr; /* Base address of tx sram area */
u32 tx_sram_size; /* Size of tx sram area */
- int rx_resource_err; /* Rx ring resource error flag */
-
/* Tx/Rx rings managment indexes fields. For driver use */
/* Next available and first returning Rx resource */
/* Move the used descriptor pointer to the next descriptor */
mp->rx_used_desc_q = (used_rx_desc + 1) % mp->rx_ring_size;
- /* Any Rx return cancels the Rx resource error status */
- mp->rx_resource_err = 0;
-
spin_unlock_irqrestore(&mp->lock, flags);
return ETH_OK;
unsigned int command_status;
unsigned long flags;
- /* Do not process Rx ring in case of Rx ring resource error */
- if (mp->rx_resource_err)
- return ETH_QUEUE_FULL;
-
spin_lock_irqsave(&mp->lock, flags);
/* Get the Rx Desc ring 'curr and 'used' indexes */
rx_next_curr_desc = (rx_curr_desc + 1) % mp->rx_ring_size;
mp->rx_curr_desc_q = rx_next_curr_desc;
- /* Rx descriptors exhausted. Set the Rx ring resource error flag */
- if (rx_next_curr_desc == rx_used_desc)
- mp->rx_resource_err = 1;
-
spin_unlock_irqrestore(&mp->lock, flags);
return ETH_OK;
static void port_init(struct mv643xx_eth_private *mp)
{
- mp->rx_resource_err = 0;
-
port_reset(mp);
init_mac_tables(mp);