RTL8169 initialization sequence incorrect?

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
szh
Posts: 1
Joined: Sun Feb 08, 2009 7:15 pm

RTL8169 initialization sequence incorrect?

Post by szh »

@szh: People won't find it if you have questions about something and you leave a note hidden on a wiki page - its not a forum.

Moved here for everybody to see
-Combuster


szh appended at 2009-2-9:
Thanks to this article, it helped a lot on developping my OS. but there seems to be some problems on the initilize squences of 8169 chip. I tryed the squences as decribed in the article that:
1, write 0x0000E70F to RxConfig(ioaddr+0x44) and 0x03000700 to TxConfig(ioaddr+0x40)
2, enable Rx/TX
But I found the values I read from RxConfig/TxConfig are not what I wrote until I change the squence to:
1, enable Rx/TX
2, write 0x0000E70F to RxConfig(ioaddr+0x44) and 0x03000700 to TxConfig(ioaddr+0x40)
Is there something wrong with this article/ the chip? Or just my fault?
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: RTL8169 initialization sequence incorrect?

Post by 01000101 »

It's been a while since I made that article. I'll look into it again and double check some things.

But, for this particular issue, the article is correct at first glance.
You shouldn't/can't initialize the RX/TX operations before setting the RX/TX configurations... It would either not work entirely, or produce unwanted/unpredictable results as the state of the Rx/Tx config registers is iffy. Like I said, it's been a while, but are there any register LOCK/UNLOCK components that I may have overlooked to be able to edit those crucial config registers? If so, those need to be unlocked in order to be written to.
Post Reply