lkml.org 
[lkml]   [1998]   [Mar]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 11 Mar 1998 10:27:46 +0100 (MET)
FromGabriel Paubert <>
SubjectRe: PCI Driver for NIC, base address problem!!


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

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008