e1000 driver help

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
dschatz
Member
Member
Posts: 61
Joined: Wed Nov 10, 2010 10:55 pm

e1000 driver help

Post 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?
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: e1000 driver help

Post 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.
Developer of tyndur - community OS of Lowlevel (German)
Matthew
Member
Member
Posts: 48
Joined: Wed Jul 01, 2009 11:47 am

Re: e1000 driver help

Post 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.
Post Reply