Bug 50789 - PCI Bus number reported by /dev/pci is wrong.
Summary: PCI Bus number reported by /dev/pci is wrong.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: sparc64 (show other bugs)
Version: 5.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-sparc64 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-10 19:30 UTC by akm
Modified: 2003-06-13 18:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description akm 2003-04-10 19:30:16 UTC
	The PCI bus reported by pciconf and /dev/pci + ioctls is incorrect,
	the correct PCI Bus is repported for devices in dmesg output.
	This likely affects other architectures with > 1 PCI bus, but, I don't
	have access to any to confirm.

Fix: 

Unknown.
How-To-Repeat: This is fairly simple to detect, I have an onboard video card on
pcibus #2, dmesg shows;

pci2: <display, VGA> at device 2.0 (no driver attached)

pciconf -lv:
none0@pci1:2:0: class=0x030000 card=0x00000000 chip=0x47541002 rev=0x9a hdr=0x00
    vendor   = 'ATI Technologies'
    device   = 'Mach 64 GT Rage 3D II Graphics Accelerator'
    class    = display
    subclass = VGA

If I tried to read register 0 I should get the chip back (0x47541002)

pciconf -r pci1:2:0 0
ffffffff 

If I use pci bus 2 as reported by dmesg;

pciconf -r pci2:2:0 0
47541002
Comment 1 John-Mark Gurney freebsd_committer freebsd_triage 2003-06-13 18:44:22 UTC
State Changed
From-To: open->closed

Fixed in version 1.5 of src/sys/sparc64/pci/apb.c