dmlb at dmlb.org
Mon Jul 28 17:22:54 PDT 2003
From: "Bruce Cran" <bruce at cran.org.uk>
> I realise that there's a 'beta' FreeBSD driver out for this card, and I've
> been attempting to learn the kernel interfaces such as bus_dma and mbuf
> handling to debug it, but without much success. On my Dell, it seems to
> mostly work if I set the number of RX descriptors very low, around 5, but
> the default of 200 the network stalls with invalid packets. Running a
> tcpdump on the interface shows that, with 5 descriptors, there's an
> bad packet, but it doesn't stop any network access working. With 200, I
> loads of bad packets, where tcpdump shows the mac addresses (the ethernet
> header I guess) quite a few bytes
> into the packet. I recently ran the system with the driver preloaded,
> after a while it locked the system up, spamming me with 'bcm0: discarding
> w/o ethernet header (len 4294967296 pktlen 4294967296)'. It looks as
> there's either a problem with where the chip is putting the data, or
> something's wrong with the mbuf handling, but which only gets triggered
> a while. Does anyone know enough about
> network drivers to know what the problem might be?
> It would be great to have this card supported, and it seems that the
> is very near to being working, it just needs a bit more debugging work
> done on it.
Firstly, an apology. I released the beta driver at the end of june just
before I went on holiday. Since I got back I've been maxed out at $REALJOB
and been too tired in the evenings to do any hacking on the driver - because
of the stuff (chip layout) I'm doing at work, the last thing I want to do is
sit in front of another monitor! This situation will continue for another
week or two.
Your report above tallies with my experiences and those of others on a few
platforms. Although you have spotted a few more bits and pieces. I hadn't
noticed the misaligned MAC addresses on bad packets. I think that the driver
might be programming the chip very slightly incorrectly. Either there is a
requirement for the chip to see some sort of alignment on the RX buffers or
I've got something wrong in handling the extra header that the chip prepends
to the packets, or I've simply got mbuf alignment requirements wrong.
Sometimes, I see symptoms of kernel memory being trashed - odd sig 11's etc.
It is possible that the chip is spamming memory where it shouldn't.
FYI, I used two Linux drivers for reference. One from Broadcom (called
bcm4400) and one from Redhat, (called b44 I think). I haven't managed to get
any docs from Broadcom, so have had to work blind, and
may well have something wrong.
Thanks for the feedback and once again apologies for being tardy in tracking
this bug down.
More information about the freebsd-hackers