From akm@orchid.theinternet.com.au Thu Apr 10 11:21:57 2003 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F1FD37B408 for ; Thu, 10 Apr 2003 11:21:57 -0700 (PDT) Received: from theinternet.com.au (c17609.carlnfd1.nsw.optusnet.com.au [210.49.139.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EF2F43FA3 for ; Thu, 10 Apr 2003 11:21:54 -0700 (PDT) (envelope-from akm@orchid.theinternet.com.au) Received: from orchid.theinternet.com.au (orchid.theinternet.com.au [203.34.176.147]) by theinternet.com.au (8.12.9/8.12.9) with ESMTP id h3AHEV8g016649 for ; Fri, 11 Apr 2003 03:14:31 +1000 (EST) (envelope-from akm@orchid.theinternet.com.au) Received: from orchid.theinternet.com.au (localhost.theinternet.com.au [127.0.0.1]) by orchid.theinternet.com.au (8.12.9/8.12.9) with ESMTP id h3AHCKaN001521 for ; Fri, 11 Apr 2003 03:12:20 +1000 (EST) (envelope-from akm@orchid.theinternet.com.au) Received: (from akm@localhost) by orchid.theinternet.com.au (8.12.9/8.12.9/Submit) id h3AHCJHg001520; Fri, 11 Apr 2003 03:12:19 +1000 (EST) Message-Id: <200304101712.h3AHCJHg001520@orchid.theinternet.com.au> Date: Fri, 11 Apr 2003 03:12:19 +1000 (EST) From: Andrew Milton Reply-To: Andrew Milton To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: PCI Bus number reported by /dev/pci is wrong. X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 50789 >Category: sparc64 >Synopsis: PCI Bus number reported by /dev/pci is wrong. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-sparc >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 10 11:30:16 PDT 2003 >Closed-Date: Fri Jun 13 10:45:51 PDT 2003 >Last-Modified: Fri Jun 13 10:45:51 PDT 2003 >Originator: Andrew Milton >Release: FreeBSD 5.0-CURRENT sparc64 >Organization: >Environment: System: FreeBSD orchid.theinternet.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Thu Apr 10 17:36:22 EST 2003 akm@orchid.theinternet.com.au:/usr/obj/usr/src/sys/orchid sparc64 cpu0: Sun Microsystems UltraSparc-IIi Processor (269.80 MHz CPU) Model: SUNW,Ultra-5_10 nexus0: pcib0: on nexus0 pcib0: Sabre, impl 0, version 0, ign 0x7c0 DVMA map: 0xc0000000 to 0xc1ffffff PCI-PCI bridge at 0/1/1: setting bus #s to 0/1/1 pcib0: ofw_pci_init: descending to subordinate PCI bus device 1/1/0: latency timer 0 -> 82 pcib0: ofw_pci_init: no interrupt mapping found for 1/1/0 (preset 0) device 1/1/1: latency timer 0 -> 82 pcib0: ofw_pci_init: mapping intr for 1/1/1 to 33 (preset was 0) device 1/2/0: latency timer 0 -> 66 pcib0: ofw_pci_init: mapping intr for 1/2/0 to 15 (preset was 15) device 1/3/0: latency timer 0 -> 16 pcib0: ofw_pci_init: mapping intr for 1/3/0 to 32 (preset was 14) PCI-PCI bridge at 0/1/0: setting bus #s to 0/2/2 pcib0: ofw_pci_init: descending to subordinate PCI bus pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pcib2: at device 1.1 on pci0 pci2: on pcib2 ebus0: revision 0x01 ebus0: mem 0xf1000000-0xf17fffff,0xf0000000-0xf0ffffff at device 1.0 on pci2 ebus0: addr 0x140072f000-0x140072f003,0x140072c000-0x140072c003,0x140072a000-0x140072a003,0x1400728000-0x1400728003,0x1400726000-0x1400726003 (no driver attached) ebus0: addr 0x1400724000-0x1400724003 irq 37 (no driver attached) ebus0: addr 0x1400504000-0x1400504002 (no driver attached) sab0: addr 0x1400400000-0x140040007f irq 43 on ebus0 sabtty0: on sab0 sabtty0: console 9600,8,n,1,- sabtty1: on sab0 ebus0: addr 0x14003083f8-0x14003083ff irq 41 (no driver attached) ebus0: addr 0x14003062f8-0x14003062ff irq 42 (no driver attached) ebus0: addr 0x1400700000-0x140070000f,0x140030015c-0x140030015d,0x14003043bc-0x14003043cb irq 34 (no driver attached) ebus0: addr 0x1400720000-0x1400720003,0x1400706000-0x140070600f,0x14003023f0-0x14003023f7 irq 39 (no driver attached) eeprom0: addr 0x1400000000-0x1400001fff on ebus0 eeprom0: model mk48t59 eeprom0: hostid 808e84c0 ebus0: addr 0x1000000000-0x10000fffff (no driver attached) ebus0: addr 0x1400722000-0x1400722003,0x1400704000-0x140070400f,0x1400702000-0x140070200f,0x1400200000-0x14002000ff irq 36,35 (no driver attached) hme0: mem 0xe0000000-0xe0007fff irq 33 at device 1.1 on pci2 miibus0: on hme0 nsphy0: on miibus0 nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pci2: at device 2.0 (no driver attached) atapci0: port 0xc00020-0xc0002f,0xc00018-0xc0001b,0xc00010-0xc00017,0xc00008-0xc0000b,0xc00000-0xc00007 irq 32 at device 3.0 on pci2 ata2: at 0xc00000 on atapci0 ata3: at 0xc00010 on atapci0 >Description: 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. >How-To-Repeat: This is fairly simple to detect, I have an onboard video card on pcibus #2, dmesg shows; pci2: 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 >Fix: Unknown. >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: jmg State-Changed-When: Fri Jun 13 10:44:22 PDT 2003 State-Changed-Why: Fixed in version 1.5 of src/sys/sparc64/pci/apb.c http://www.freebsd.org/cgi/query-pr.cgi?pr=50789 >Unformatted: