Page 1 of 1

e1000 driver help

Posted: Mon Jun 06, 2011 11:05 am
by dschatz
Hey all,

I'm developing an E1000 driver for my system using vmware. Right now I've set it up very simply to enable transmission and then load the tx ring with a descriptor for a small packet and then move the tx ring tail. However, I see no packets being transmitted (and reading the DD flag of the descriptor shows no change). I wonder if theres any way to debug this?

Re: e1000 driver help

Posted: Wed Jun 08, 2011 2:47 pm
by Kevin
When you're stuck it's sometimes easier to start with a emulator where you can look at the source code or even insert some debug code to see what happens. It's not generally a good idea to do this because it can lead to writing a driver for the specific emulator rather than the spec, but in some cases it helps with finding the bug.

That being said, I think I would first try to check if the descriptor is valid and has all necessary flags set, the transmitter is enabled in TCTL etc. Again, comparing code to known working drivers is not a bad thing, but you should be careful not to copy things that you don't understand.

Re: e1000 driver help

Posted: Fri Jun 17, 2011 1:35 pm
by Matthew
Which vmware? The vmware player I use emulates a PCnet32 device, not e1000. I tested my e1000 driver with qemu, where I did as Kevin suggested and instrumented the emulator code to find out what's going on. It then carried over to a real card fairly easily.