Messages in this thread | | | Date | Thu, 16 May 2002 20:03:54 +0200 | From | "'Roger Luethi'" <> | Subject | Re: [PATCH] #2 VIA Rhine stalls: TxAbort handling |
| |
On Thu, 16 May 2002 18:03:25 +0800, Shing Chuang wrote: > As following three error conditions occurred, the VT6102 & VT86C100A > chip are designed to shutdown TX for driver to examine the error frame. > > 1. Tx fifo underrun. > > 2. Tx Abort (Too many collisions occurred). > > 3. TxDescriptors status write back error. (Only on VT6102 chip)
Hey, thanks! That's exactly the piece of information I've been looking for.
> All the three conditions caused the TXON bit of CR1 went off. the > driver must wait a little while until the bit go off, reset the pointer of > [...] > do {} while (BYTE_REG_BITS_IS_ON(CR0_TXON,&pMacRegs->byCR0));
The driver "waits a little" in the interrupt handler? How long can that take, worst case? I don't know of many places where the kernel stops to wait for an external device to change some value.
I have no numbers on the expected number of iterations, but I'd rather drop out of the handler after a few failed checks and try again later (or just reset the chip and log an error, if dropping out is rare enough :-)).
> current Tx descriptor, and then turn on TXON bit of CR1 again. Those may be
ITYM the TXON bit of CR0. TDMD1 is the one you are setting in CR1. Which takes me to the next question:
According to my docs, internal registers are like this:
VT86C100A Byte Bit 0x08 (CR0) 5 TDMD 0x08 (CR0) 6 RDMD 0x09 (CR1) 5 Reserved 0x09 (CR1) 6 Reserved
VT6102 Byte Bit 0x08 (CR0) 5 TDMD 0x08 (CR0) 6 RDMD 0x09 (CR1) 5 TDMD1 0x09 (CR1) 6 RDMD1
The descriptions in both data sheets are somewhat unclear, so maybe you could enlighten me about why you chose to set TDMD1 instead of TDMD (which is what the LK driver does)?
Roger - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |