Re: PCI Driver for NIC, base address problem!!

Gabriel Paubert (paubert@iram.es)
Wed, 11 Mar 1998 10:27:46 +0100 (MET)


On Wed, 11 Mar 1998, Anand Misra wrote:

> 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.

Are you sure the memory space is enabled in the configuration space
(control register at offset 4) ?

Gabriel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu