Re: please help me understand a line code about pci

From: John Bradford (john@grabjohn.com)
Date: Sat Jan 04 2003 - 07:14:09 EST


> I am reading code about pci, and I can't understand some lines in
> pci_check_direct(), in arch/i386/kernel/pci-pc.c
>
> the PCI spec v2.0 say: ( page32)
>
> "Anytime a host bridge sees a full DWORD I/O write from the host to
> CONFIG_ADDRESS, the bridge must latch the data into its CONFIG_ADDRESS
> register. On full DWORD I/O reads to CONFIG_ADDRESS,the bridge must return
> the
> data in CONFIG_ADDRESS. Any other types of accesses to this
> address(non-DWORD)
> have no effect on CONFIG_ADDRESS and are excuted as normal I/O transaction
> on PCI bus......"
>
> CONFIG_ADDRESS = 0xcf8
> CONFIG_data = 0xcfc
>
> so , I wonder why need "outb (0x01, 0xCFB);" if check configuration type 1 ?
> and why "outb (0x00, 0xCFB);" if check configuration type 2?

It looks to me like a workaround for broken hardware, but I could be
wrong.

Incidently, wouldn't it be worth printing some debugging info, such as
the values read from 0xCF8 and 0xCFA, when neither configuration type
works? I've attached an, (untested), patch to do so.

John.



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



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:25 EST