OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Sep 22, 2018 12:57 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: The RTL8136 varient of the RTL8139
PostPosted: Mon Jul 02, 2018 6:52 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 438
Location: USA
Hi,

Here is one for you. I haven't been able to figure out why, so I thought I would ask here to see if anyone has come across this as well.

One of the laptops I have has a RTL8102E wired network card, which in my understanding, is RTL8139 compatible. However, my RTL8139 driver doesn't work with it. After a little debugging, come to find out when writing a 32-bit physical address to the RBSTART register, only the bottom 16 bits is written.

For example, if I do:
Code:
  outpd(base + RBSTART, 0x12345678);
  inpb(0x64); // pause and "clear" the IO Bus
  temp = inpd(base + RBSTART);

The variable "temp" is now only 0x0005678.

I thought maybe it was my outpd() or inpd() routines. Nope. I coded it in assembly just to be sure and I got the same result. This card has both PortIO and MemIO and can use either. The thing is, the exact thing happens when I use MemIO access. This tells me that it is the register. I also tried writing two 16-bit values, first to SBSTART and then to SBSTART + 2. Undefined results. The write must be a 32-bit write.

Come to find out, some of the other registers don't allow writes as one would expect of the RTL8139.

I can't find any documentation that says you have to do something different to the 8136 (RTL810xE) to be compatible with or allow to use as an RTL8139. About the only thing I found is that to use this specific card on a Linux machine, you have to update the cards firmware. This tells me that the error might be with the card itself. However, before the hard drive crashed on this particular laptop, this card was working just fine with WinXP.

Has anyone else (tried) to use the RTL8136 or know of any documentation for it?

Thank you,
Ben
- http://www.fysnet.net/osdesign_book_series.htm


Top
 Profile  
 
 Post subject: Re: The RTL8136 varient of the RTL8139
PostPosted: Mon Jul 02, 2018 10:07 pm 
Offline
Member
Member

Joined: Fri Aug 19, 2016 10:28 pm
Posts: 351
This is not yet my turf, but I will educate myself when the opportunity arises. :)

Linux handles RTL8102E as RTL8169 variant. Considering that aside from the high level code, the kernel source is sprinkled with specific per-model cases, what this means is left to debate, but it uses the RTL8169 register interface.

Here are some references:
The wiki RTL8169 page (obviously, but still)
RTL8169 datasheet
RTL8169S-32/RTL8169S-64 datasheet (some minor differences; this is technically the newer document if anything)
Vendor and Device ID (linux source code, PCI config space detected values)
The adapter entry (linux source code, controller version enumerator to model name and features mapping)
Transmit Configuration register mapping (linux source code, hardware ids from the said register mapped to the version enumerator value above)


Top
 Profile  
 
 Post subject: Re: The RTL8136 varient of the RTL8139
PostPosted: Tue Jul 03, 2018 11:39 am 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 438
Location: USA
Thank you for the information. I will have a look and see what I can do.

Thanks,
Ben


Top
 Profile  
 
 Post subject: Re: The RTL8136 varient of the RTL8139
PostPosted: Mon Jul 09, 2018 2:12 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 438
Location: USA
Just as a follow up, the card does have the register interface of the RTL8169. This explains quite a bit. The RTL8169 uses quite a different form of buffer transfer as well as the register set being a bit different.

Once I made a few tests to see if it responded to the alternate interface, it worked as expected.

Thanks for the info.

Ben
- http://www.fysnet.net/osdesign_book_series.htm


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group