D-Link DFE-690TXD CardBus (RTL8139) not receiving packets

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
malformedpacket
Posts: 4
Joined: Sun Jan 23, 2022 4:55 pm

D-Link DFE-690TXD CardBus (RTL8139) not receiving packets

Post by malformedpacket »

Hello, I have tried every conceivable option I could think of to avoid making yet another thread about RTL8139 adapters, yet here I am, stuck on this issue.

I have a D-Link DFE-690TXD CardBus adapter (RTL8139) attached to a Ricoh RL5c476 II CardBus bridge. I am able to transmit, but not receive packets - the RX buffer stays filled with zeroes. I have bus mastering enabled on both the CardBus bridge and the D-Link adapter, I'm hoping that someone can guide me in the correct direction as I may have missed some configuration option?

Thanks in advance.
Klakap
Member
Member
Posts: 297
Joined: Sat Mar 10, 2018 10:16 am

Re: D-Link DFE-690TXD CardBus (RTL8139) not receiving packet

Post by Klakap »

Hello, without code it is almost impossible to say anything.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: D-Link DFE-690TXD CardBus (RTL8139) not receiving packet

Post by iansjack »

It would also be useful to know what packets you are sending to the NIC. I presume that they are ARP packets as they don't rely on a MAC or IP address and are probably the easiest ones to process.

Could you confirm this.
malformedpacket
Posts: 4
Joined: Sun Jan 23, 2022 4:55 pm

Re: D-Link DFE-690TXD CardBus (RTL8139) not receiving packet

Post by malformedpacket »

Klakap wrote:Hello, without code it is almost impossible to say anything.
I am using the example code from the wiki - this works fine in QEMU, but cannot receive packets on the physical hardware. Transmit packets works fine.
malformedpacket
Posts: 4
Joined: Sun Jan 23, 2022 4:55 pm

Re: D-Link DFE-690TXD CardBus (RTL8139) not receiving packet

Post by malformedpacket »

iansjack wrote:It would also be useful to know what packets you are sending to the NIC. I presume that they are ARP packets as they don't rely on a MAC or IP address and are probably the easiest ones to process.

Could you confirm this.
I am sending DHCP Discover from the RTL8139, DHCP Offer is sent to the RTL8139 but is not copied from the RX FIFO into the RX buffer.

Image
malformedpacket
Posts: 4
Joined: Sun Jan 23, 2022 4:55 pm

Re: D-Link DFE-690TXD CardBus (RTL8139) not receiving packet

Post by malformedpacket »

Ok, this is very odd, and I could swear that I've already tried this, but... I browsed to this external link http://www.jbox.dk/sanos/source/sys/dev/rtl8139.c.html and noticed that enable Tx/Rx MUST be enabled before configuring Rx buffer. I moved the line of code to enable Tx/Rx immediately after software reset and... it works :D

I guess this is something to keep in mind when browsing the wiki, that the code example provided will not work with this particular card.
Post Reply