Date: 13 Mar 2002 20:13:54 +1130 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-hackers@freebsd.org Subject: PCI read config functions Message-ID: <1016009035.1876.72.camel@chowder.gsoft.com.au>
next in thread | raw e-mail | index | archive | help
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, &nport)) != PCIBIOS_SUCCESSFUL) break; And I think the equiv would be -> tmp = pci_read_config(dev, PCI_DC_SIO_PORT, /*bytes*/1); printf("pccom: number of ports - %d\n", tmp); However this just ends up printing 0. (PCI_DC_SIO_PORT is 0x2f) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1016009035.1876.72.camel>