3c59x: read eeprom
Posted: Sun May 15, 2005 6:08 am
Hi!
I can find my 3c556 hurragane nic pci bus and device no and it's io base addr. I found out that the following pseudo-code should return 0x6055, the deviceid:
foo gets filled with 0xffff. Do I need to initialize the card prior to reading eeprom?
I followed sample drivers like
http://koders.com/c/fidF4DF59676417BEC5C1810CBB42F1CE37D5C30640.aspx?s=3c59x
http://koders.com/c/fidF032F73835297E3B6018361AB99075FE9753E884.aspx?s=3c90x
And specifications
http://www.italios.it/oslib/3c90xb.zip
http://www.italios.it/oslib/3c90xc.zip
http://www.italios.it/oslib/3c59x.zip
Having in mind, that 3c556, 3c90x, 3c90xb, 3c90xc, 3c59x are somewhat compatible.
Cheers
[edit] It seems I fail to SelectRegisterWindow using pci32 routines.. The IntStatus register tells me that I'm always on window #0.
I can find my 3c556 hurragane nic pci bus and device no and it's io base addr. I found out that the following pseudo-code should return 0x6055, the deviceid:
Code: Select all
Set-Active-Register-Window ( 0 ) ; // outw ( 1<<11 + 0, baseaddr + 0xe)
Ensure-EepromCommand-Not-Busy () ; // wait for bit 15 in inw ( baseaddr + 0xa ) to clear
Write-To-Register-By-IO ( reg_Eeprom_Command, cmdReadEeprom + offsetEeprom_DeviceId ); // outw ( 1<<7 + 3, baseaddr + 0xa);
Ensure-EepromCommand-Not-Busy () ; // wait for bit 15 in inw ( baseaddr + 0xa ) to clear
Read-From-Register-By-Io ( reg_Eeprom_Data , &foo); //foo = inw ( baseaddr + 0xc );
I followed sample drivers like
http://koders.com/c/fidF4DF59676417BEC5C1810CBB42F1CE37D5C30640.aspx?s=3c59x
http://koders.com/c/fidF032F73835297E3B6018361AB99075FE9753E884.aspx?s=3c90x
And specifications
http://www.italios.it/oslib/3c90xb.zip
http://www.italios.it/oslib/3c90xc.zip
http://www.italios.it/oslib/3c59x.zip
Having in mind, that 3c556, 3c90x, 3c90xb, 3c90xc, 3c59x are somewhat compatible.
Cheers
[edit] It seems I fail to SelectRegisterWindow using pci32 routines.. The IntStatus register tells me that I'm always on window #0.