Subject: Re: PCI network driver -- receive pkts with 0xDEADBEEF
To: None <>
From: Shashi Rao <>
List: tech-net
Date: 02/08/2001 18:25:16
Le Wed, Feb 07, 2001 at 05:31:31PM -0500, Michael Richardson <> a ecrit:
: >>>>> "Shashi" == Shashi Rao <> writes:
:     Shashi> also, using a pci bus analyzer shows that the device actually goes
:     Shashi> out and fetches (what seems like) a legitimate transmit descriptor
:     Shashi> except that this descriptor seems to be pointing to an mbuf that
:     Shashi> contains garbage (which i never put in there)
:   Ah, you have a PCI bus analyzer...  That's always nice :-)

yes, these things are amazing (if only one can figure out how to
work them, and with windows too, ugh)

:   Now, if only there was a way to have the analyzer force you into DDB
: when it detects certain things. 

actually, i sort of achieve that by breakpointing at the right place
in the kernel and also writing some bytes to some predetermined
memory address that the pci analyzer triggers on. so, when the bug
appears, my kgdb freezes and the pci analyzer triggers so i can dump
state and look around, etc.

:   Do you have a routine to dump your xmit descriptor ring?

not really. i am unable to figure out what the best way to "print"
stuff from the kernel is. i use printf sometimes, but it's probably
not the best way. i dont know what the equivalent of the /proc
filesystem from linux is on netbsd...

:   What chip are you targetting, out of curiosity.

it's our own fpga for our router. unfortunately, i dont know how
much more i am allowed to say about this. :(

also, i finally fixed the problem that i originally reported, of the
transmit logic picking up freed mbufs. it was exactly that -- my
code in the transmit-complete interrupt handler would mercilessly
free all txsoft structures in the txdirtyq without checking to see
if they had been indeed transmitted!

i fixed that and things work fine except for another problem which
i will describe in a following post.

Shashi Rao