[tulip] Bug in tulip_interrupt?

Bhavesh P. Davda bhavesh@avaya.com
Tue Feb 19 19:47:01 2002


In that case, why would I see a case where though xmits and recvs appear
to be working on the device, the tx_carrier_errors and tx_errors are
getting incremented while tx_packets is not?

The only way I could get the device out of this state was to ifconfig
the device down, rmmod tulip, and insmod tulip again. Once I did that,
all net_device_stats were cleared for the device, and tx_packets started
incrementing correctly, while tx_carrier_errors and tx_errors stayed 0.

- Bhavesh

Donald Becker wrote:
> 
> On Tue, 19 Feb 2002, Bhavesh P. Davda wrote:
> 
> > I think there is a bug in tulip_interrupt, where in if you get a TxIntr
> > interrupt as indicated by CSR5, and if the status register indicated an
> > error, the status register never gets cleared, and every frame
> > transmitted after that using that ring buffer entry will be marked as a
> > transmit error.
> 
> I think that you are mixing up two different concepts.
> 
> The TxIntr bit in the status register is clear early in the interrupt
> dispatch loop.
> 
>         /* Acknowledge all of the current interrupt sources ASAP. */
>         outl(csr5 & 0x0001ffff, ioaddr + CSR5);
> 
> > +                               /* Clear the status register */
> > +                               tp->tx_ring[entry].status =
> > cpu_to_le32(DescOwned);
> 
> The code you are proposing adding clears the descriptor error status
> bit, and sets the DescOwned bit.  After one pass through the Tx ring,
> the chip will loop retransmiting old packets as fast as the driver
> handles the interrupts!
> 
> There is no need to clear the error status bit as the descriptor status
> word is initialized when the Tx packet is queued.
> 
>         tp->tx_ring[entry].length = cpu_to_le32(skb->len | flag);
>         tp->tx_ring[entry].status = cpu_to_le32(DescOwned);
>         tp->cur_tx++;
> 
> Donald Becker                           becker@scyld.com
> Scyld Computing Corporation             http://www.scyld.com
> 410 Severn Ave. Suite 210               Second Generation Beowulf Clusters
> Annapolis MD 21403                      410-990-9993


-- 
Bhavesh P. Davda
Avaya Inc
Room B3-B16                     E-mail : bhavesh@avaya.com
1300 West 120th Avenue          Phone  : (303) 538-4438
Westminster, CO 80234           Fax    : (303) 538-3155