I wrote a special purpose driver for 82546GB (Linux/x86, 2.6.x kernels) for some proprietary appplication. I reused e1000_hw from Linux e1000 driver for PHY/MAC handling. The TX/RX rings management
Driver works with some strange glitch: tx unit starts only after several hw resets. More details: after
I put device UP, rx unit starts ok and receive packets. tx descriptors are programmed in legacy mode (DEXT == 0) with RS | IDE | EOP bits set in cmd field. After filling descs, I increment TDT. After 1 sec, I got the following strange situation:
TDH == TDT > 0, but status.DD bit for descriptors behind TDH is still zero, and packets are not sent to the wire. Below is appropriate log with semi-obvious field tags:
E1000 02:05.1: Tx HANG TDH 4 TDT 4 next_to_use 4 next_to_clean 0 dma 1dc02000 timestamp 172dcb2 jiffies 172dea7 status 0 cmd 89 length 64 cso 0 css 0 spec 0
On tx hang, I do a full hw reset (DOWN/UP cycle). After several (usually 1-2) resets on timeouts, tx unit starts working. I obtain full 1Gb bandwith without further tx hangs.
I'm completely out of ideas why. The most fishy issue is that the TDH is moved by card (I do clear TDT and TDH on reset). If it stall, it would be definitely my bug. But TDH moves.
Any help ?