Re: PCI read config functions

2002-03-15 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> "Daniel O'Connor" <[EMAIL PROTECTED]> writes: : On Fri, 2002-03-15 at 03:13, M. Warner Losh wrote: : > The pci config space is always mapped. What does pciconf -r pciX:Y:Z : > 0:0xff say? X:Y:Z is the pci bus address. : : mdtest# pciconf -r pci0:11:0

Re: PCI read config functions

2002-03-14 Thread Daniel O'Connor
On Fri, 2002-03-15 at 03:13, M. Warner Losh wrote: > The pci config space is always mapped. What does pciconf -r pciX:Y:Z > 0:0xff say? X:Y:Z is the pci bus address. mdtest# pciconf -r pci0:11:0 0:0xff 0x0004 0x0283 0x07000202 0x0008 0xd8002000 0xc001 0x 0xc401 0x000

Re: PCI read config functions

2002-03-14 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> "Daniel O'Connor" <[EMAIL PROTECTED]> writes: : On Thu, 2002-03-14 at 18:11, M. Warner Losh wrote: : > : However this just ends up printing 0. : > : : > : (PCI_DC_SIO_PORT is 0x2f) : > : > Do you have the right dev? : > : > bcr = pci_read_config(s

Re: PCI read config functions

2002-03-13 Thread Daniel O'Connor
On Thu, 2002-03-14 at 18:11, M. Warner Losh wrote: > : However this just ends up printing 0. > : > : (PCI_DC_SIO_PORT is 0x2f) > > Do you have the right dev? > > bcr = pci_read_config(sp->sc->dev, CB_PCI_BRIDGE_CTRL, 2); > > is what I use in the pccard bridge pci driver and it works. I

Re: PCI read config functions

2002-03-13 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> "Daniel O'Connor" <[EMAIL PROTECTED]> writes: : In the Linux driver there is stuff like -> : if ((rc = pcibios_read_config_byte(bus, dev_fn, PCI_DC_SIO_PORT, : &nport)) != PCIBIOS_SUCCESSFUL) break; :

PCI read config functions

2002-03-13 Thread Daniel O'Connor
Hi, I'm trying to write a driver for a serial card - it is fairly simple, but I'm having trouble with some conversions from the Linux driver :) In the Linux driver there is stuff like -> if ((rc = pcibios_read_config_byte(bus, dev_fn, PCI_DC_SIO_PORT,