Skip to contentSkip to conversation

keylargo PCI USB controller nor enabled on G4 xserve

DISCUSSION Thomas Unger 2 participants 4 messages Sep 15, 2004 – Sep 21, 2004 PowerPC

lore
Share & tools
lore
#0 lore raw

Hello everyone,

I've been searching through the mailing-list archive but haven't seen a similar problem report yet, so I'm asking this here.

We have two G4 dual 1GHz xserves here, they are running 2.4.25-ben1 and working fine, including USB. In the process of upgrading to 2.6 I had to realize the USB KeyLargo hardware isn't detected.

lspci on 2.4 says:

======================================================================
0000:00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP 0000:00:10.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE]
0000:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI 0000:10:0d.0 PCI bridge: Intel Corp. 21154 PCI-to-PCI Bridge 0000:10:11.0 PCI bridge: Intel Corp. 21154 PCI-to-PCI Bridge 0000:10:15.0 RAID bus controller: Promise Technology, Inc. PDC20270 (FastTrak100 LP/TX2/TX4) (rev 02)
0000:10:1b.0 RAID bus controller: Promise Technology, Inc. PDC20270 (FastTrak100 LP/TX2/TX4) (rev 02)
0000:11:07.0 ff00: Apple Computer Inc. KeyLargo Mac I/O (rev 03)
0000:11:08.0 USB Controller: Apple Computer Inc. KeyLargo USB <----
0000:11:09.0 USB Controller: Apple Computer Inc. KeyLargo USB <----
0000:12:02.0 Ethernet controller: Apple Computer Inc. Tigon3 Gigabit Ethernet NIC (BCM5701) (rev 15)
0000:12:03.0 Ethernet controller: National Semiconductor Corporation DP83820 10/100/1000 Ethernet Controller
0000:22:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI 0000:22:0d.0 ff00: Apple Computer Inc. UniNorth 2 ATA/100 0000:22:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2 FireWire (rev 01)
0000:22:0f.0 ffff: Apple Computer Inc. UniNorth 2 GMAC (Sun GEM) (rev ff)
=====================================================================

while on 2.6.6:

=====================================================================
0000:00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP 0000:00:10.0 Ethernet controller: National Semiconductor Corporation DP83820 10/100/1000 Ethernet Controller
0001:01:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI 0001:01:0d.0 PCI bridge: Intel Corp. 21154 PCI-to-PCI Bridge 0001:01:11.0 PCI bridge: Intel Corp. 21154 PCI-to-PCI Bridge 0001:01:15.0 RAID bus controller: Promise Technology, Inc. PDC20270 (FastTrak100 LP/TX2/TX4) (rev 02)
0001:01:1b.0 RAID bus controller: Promise Technology, Inc. PDC20270 (FastTrak100 LP/TX2/TX4) (rev 02)
0001:02:02.0 ffff: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE] (rev ff)
0001:02:03.0 ffff: Apple Computer Inc. Tigon3 Gigabit Ethernet NIC (BCM5701) (rev ff)
0001:03:02.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE]
0001:03:03.0 Ethernet controller: Apple Computer Inc. Tigon3 Gigabit Ethernet NIC (BCM5701) (rev 15)
0002:04:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI 0002:04:0d.0 ff00: Apple Computer Inc. UniNorth 2 ATA/100 0002:04:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2 FireWire (rev 01)
0002:04:0f.0 ffff: Apple Computer Inc. UniNorth 2 GMAC (Sun GEM) (rev ff)
======================================================================

looks to me like a pci problem as the device obviously isn't even enumerated. I tried several 2.6 versions, none of them fixed this.

Has anyone had similar problems or even a solution to this? Any help is welcome.

Thomas Unger

#1 lore raw
Quoted 5 lines · Thomas Unger

looks to me like a pci problem as the device obviously isn't even enumerated. I tried several 2.6 versions, none of them fixed this.

Has anyone had similar problems or even a solution to this? Any help is welcome.

There's something wrong with PCI enumeration on the Xserve G4 in 2.6, though I haven't yet figured out what exactly. Ideally, I would need to have physical access to one of these to fix it ... anybody in .au ?

Ben.

#2 lore raw
In reply to Thomas Unger

Can you try that workaround (quite ugly until I figure out what's really going on in there) and let me know if it makes any difference ?

===== arch/ppc/kernel/pci.c 1.43 vs edited =====

arch/ppc/kernel/pci.c +2 -1
@@ -33,6 +33,7 @@
 unsigned long isa_io_base     = 0;
 unsigned long isa_mem_base    = 0;
 unsigned long pci_dram_offset = 0;
+int pcibios_assign_bus_offset = 1;
 
 void pcibios_make_OF_bus_map(void);
 
@@ -1263,7 +1264,7 @@
 		bus = pci_scan_bus(hose->first_busno, hose->ops, hose);
 		hose->last_busno = bus->subordinate;
 		if (pci_assign_all_busses || next_busno <= hose->last_busno)
-			next_busno = hose->last_busno+1;
+			next_busno = hose->last_busno + pcibios_assign_bus_offset;
 	}
 	pci_bus_count = next_busno;
 

===== arch/ppc/platforms/pmac_pci.c 1.22 vs edited =====

arch/ppc/platforms/pmac_pci.c +9 -0
@@ -50,6 +50,7 @@
 #endif /* CONFIG_POWER4 */
 
 extern u8 pci_cache_line_size;
+extern int pcibios_assign_bus_offset;
 
 struct pci_dev *k2_skiplist[2];
 
@@ -565,6 +566,14 @@
 
 	init_p2pbridge();
 	fixup_nec_usb2();
+	
+	/* We are still having some issues with the Xserve G4, enabling
+	 * some offset between bus number and domains for now when we
+	 * assign all busses should help for now
+	 */
+	if (pci_assign_all_busses)
+		pcibios_assign_bus_offset = 0x10;
+
 #ifdef CONFIG_POWER4 
 	/* There is something wrong with DMA on U3/HT. I haven't figured out
 	 * the details yet, but if I set the cache line size to 128 bytes like
#3 lore raw

Hi,

Quoted 4 lines · Benjamin Herrenschmidt

Can you try that workaround (quite ugly until I figure out what's really going on in there) and let me know if it makes any difference ? .

thank you!
your patches works indeed, no more duplicate entries and USB works fine, too. here comes the current pci list:

0000:00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP 0000:00:10.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE]
0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI 0001:10:0d.0 PCI bridge: Intel Corp. 21154 PCI-to-PCI Bridge 0001:10:11.0 PCI bridge: Intel Corp. 21154 PCI-to-PCI Bridge 0001:10:15.0 RAID bus controller: Promise Technology, Inc. PDC20270 (FastTrak100 LP/TX2/TX4) (rev 02)
0001:10:1b.0 RAID bus controller: Promise Technology, Inc. PDC20270 (FastTrak100 LP/TX2/TX4) (rev 02)
0001:11:07.0 ff00: Apple Computer Inc. KeyLargo Mac I/O (rev 03) 0001:11:08.0 USB Controller: Apple Computer Inc. KeyLargo USB 0001:11:09.0 USB Controller: Apple Computer Inc. KeyLargo USB 0001:12:02.0 Ethernet controller: Apple Computer Inc. Tigon3 Gigabit Ethernet NIC (BCM5701) (rev 15)
0001:12:03.0 Ethernet controller: National Semiconductor Corporation DP83820 10/100/1000 Ethernet Controller
0002:22:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI 0002:22:0d.0 ff00: Apple Computer Inc. UniNorth 2 ATA/100 0002:22:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2 FireWire (rev 01)
0002:22:0f.0 Ethernet controller: Apple Computer Inc. UniNorth 2 GMAC (Sun GEM)

Greetings,
Thomas Unger