I'm writting a driver for our NIC (PCI based). The NIC is memory mapped
and the device memory address is in Base Address Register 1 of the
configuration space. The problem is that i'm unable to read correct
values if I assume the address read from Base Address Register 1 as the
base address of the device memory. At present i'm going as follows -
1. Read Base Address Register 1 from configuration space.
I get the value as -> 0xFF900000
2. Remap this address to lower ones by using vremap()
I get the value as -> 0x01805000
3. Mask the prefetch bits from the remapped address (~0xFF)
I'm using the address obtained from third step as the base address for
device memory. I get incorrect values if I try to read some device
registers (whose default value I know) using this base address. The
values i'm getting is 0xFFFFFFFF in all those locations.
I'm using Linux 2.0.33 kernel and gcc 2.7.2 on a PCI based intel 486
machine.
Please reply ASAP.
Thanks in advance
Best Regards,
anand.
-- H/w Dev. Group, C-DAC Pune Univ. Campus, Pune - 7 _/\_|\|_/\_|\|_|]_ Ph : +91-212-370023 [Direct] anand@cdac.ernet.in- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu