This is an old revision of the document!


Day 1 ( June 27 )

In yesterdays weekly meeting we decided to split the driver into several .c files. I started splitting the driver into tg3_hw.c which contains all the low-level NIC hardware access functions, and tg3_main.c which contains all the code that directly interacts with gPXE(e.g. tg3_open, tg3_transmit, etc).

I also added all the PCI IDs from the linux driver to the gPXE driver. This was done by adding a macro definition to the linux driver:

#define str(s) rem#s

#undef PCI_DEVICE

#define PCI_DEVICE(vendor, device) ( PCI_ROM(vendor, device, str(vendor)str(device), str(vendor)str(device), 0) )

and compiling the code with gcc -E, which only runs the C preprocessor. Use find and replace to get it into a more polished form.

Day 2 ( June 28 )

Today I added the code to initialize tp→dma_rwctrl. For now I also disabled the code to allocate resources needed for packet reception, as we don't have any other code for receiving packets for now. I tried to send some packets but failed. I noticed that gPXE didn't detect the correct link state and the other machine of the link negotiated to 10MBit/s half duplex while 1000MBit/s full duplex would be possible. To debug the issue I moved all the PHY functions to a new file, tg3_phy.c. After some fixes the other machine was able to detect the link speed correctly, but gPXE still detected the link as down.


QR Code
QR Code soc:2011:meteger:journal:week6 (generated for current page)