Re: Weird PCI problem

Linux Lists (lists@cyclades.com)
Wed, 12 May 1999 17:21:20 -0700 (PDT)


On Wed, 12 May 1999, Stephen Williams wrote:
>
> mj@atrey.karlin.mff.cuni.cz said:
> > It's quite possible both the DOS diag program and the NT driver
> > completely ignore the region type bit.

The DOS diag program (Cyctest) does NOT ignore (nor mask) the region type
bit, and it's shown as '0'. NT ignores, but we've generated a special
version that prints to the Event Viewer whatever is read from the PCI
device header itself (before masking), and it shows the region type bit as
'0'.

I have now one more information that would point (IMHO) to a problem with
Linux kernel 2.0.x. The customer has just upgraded to Red Hat 6.0, which
comes with kernel 2.2.5. Well, let's have a look at 'cat /proc/pci' and
'cat /proc/bus/pci/devices':

# cat /proc/pci
<snip>
Bus 2, device 9, function 0:
Communication controller: Cyclades Cyclom-Z above 1Mbyte (rev 1).
Medium devsel. Fast back-to-back capable. Master Capable.
Latency=32.
Non-prefetchable 32 bit memory at 0xf9fffc00 [0xf9fffc00].
I/O at 0xdc80 [0xdc81].
Non-prefetchable 32 bit memory at 0xf9e00000 [0xf9e00000].
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<snip>

As you can see, it now shows the register correctly configured as a memory
address.

# cat /proc/bus/pci/devices
0000 80867190 0 f0000008 00000000 00000000 0
0008 80867191 0 00000000 00000000 00000000 0
0010 10110024 0 00000000 00000000 00000000 0
0038 80867110 0 00000000 00000000 00000000 0
0039 80867111 0 00000000 00000000 00000000 0
003a 80867112 e 00000000 00000000 00000000 0
003b 80867113 0 00000000 00000000 00000000 0
0068 80861229 b f7000008 0000ccc1 fe000000 0
0100 10024757 0 fc000000 0000ec01 fbfff000 0
0248 120e0201 0 f9fffc00 0000dc81 f9e00000 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0258 9005001f a 0000d801 f9ffe004 00000000 0

Please note that the BAR2 (6th field on the table above) is correctly set
to a 32-bit memory address (which is also correctly stated by /proc/pci).

Up to now, we have:

- DOS: BAR2 address assignment works properly
- Windows NT: BAR2 address assignment works properly
- Linux 2.2.5: BAR2 address assignment works properly

- Linux 2.0.36: BAR2 address assignment **fails** (I/O instead of memory)

Please comment on these results.

NOTE: although the BAR2 problem seems to be solved with kernels 2.2.x,
even then I'm still not able to access that memory space from userspace
with cyzload (i.e., the FPGA load still fails). If anybody has a hint on
where I could look at in order to find the solution, I'd really appreciate
it if you let me know. If you need more information about the cyzload
program, its src code is available at:

ftp://ftp.cyclades.com/pub/cyclades/async/linux/cyc_async-611.tgz

Regards,
Ivan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/