[PATCH] 2.2.19: Alpha PCI code: pcibios_fixup_bus

From: Oleg I. Vdovikin (vdovikin@jscc.ru)
Date: Wed Jun 20 2001 - 05:42:16 EST


Hi!

    We've number of UP2000+ boards (they just like DP264 in common). These
boards has 2 PCI hoses, both has 3 PCI slots - one 32bits (IdSel=9) & two
64bits (IdSel=7,8) (6 slots in total).
    Recently we've tried to install 3c985b 64-bit card and observe the
following: this card works just fine being inserted into 32bit slot -
detected by Linux PCI code, gots real IRQ level.
    But we've tried to insert it onto the 64 bit slot we got problems. When
inserted onto the slot with IdSel = 8 it's detected twice (!!!) - with
IdSels 8 & 13! So, when pci code assign irqs & memory region it's do this
twice - firstly for card with IdSel = 8 (which is "real" card and it gots
"real" IRQ) and secondly for "phantom" with IdSel = 13 (and assigns IRQ 0
for it because DP264 knows nothing about IdSel 13). As the result 3c985
driver - acenic module sees 2 cards - the real card with valid IRQ (acenic
read IRQ from kernel, not from card), but with invalid memory region
(because this card was remaped for IdSel 13), and the second card with valid
memory region, but with invalid IRQ == 0. Acenic when initialize "phantom",
but works very slow... More fun comes when this card inserted onto the slot
with IdSel = 7 - it's gets detected 32 times - with IdSel = 0..31 - i.e.
entire pci bus!
    SRM detects this card only 6 times when IdSel = 7 and only once for
IdSel = 8, 9 (but SRM knows which IdSels are valid on DP264)..

    So as seems 64bit 3c985b hardware is not fully comaptible with DP264.
We've observe sismilar problems with Intel's EtherExpress PRO/1000 - it's
also detected twice with IdSel = 7,12 when inserted onto the slot with IdSel
= 7.

-- lspci -- for Intel - Note device 01:0c.0 has no IRQ (i.e. IRQ == 0)
01:07.0 Ethernet controller: Intel Corporation: Unknown device 1001 (rev 02)
        Subsystem: Intel Corporation: Unknown device 1003
        Flags: bus master, 66Mhz, medium devsel, latency 252, IRQ 47
        Memory at 0000000109000000 (32-bit, non-prefetchable)
        Memory at 0000000109020000 (32-bit, non-prefetchable)
        Expansion ROM at 0000000001030000 [disabled]
        Capabilities: [dc] Power Management version 2

01:0c.0 Ethernet controller: Intel Corporation: Unknown device 1001 (rev 02)
        Subsystem: Intel Corporation: Unknown device 1003
        Flags: bus master, 66Mhz, medium devsel, latency 252
        Memory at 0000000109040000 (32-bit, non-prefetchable)
        Memory at 0000000109060000 (32-bit, non-prefetchable)
        Expansion ROM at 0000000001030000 [disabled]

--

Sorry, for my bad english and explanations.

Attached please find a patch against 2.2.16 - 2.2.19 kernels. This patch alters 3 files: include/asm-alpha/machvec.h - added new function to mv - pci_fixup_bus - just like X86 has, arch/alpha/kernel/bios32.c - added a in the pcibios_fixup_bus - to call a function from mv if any, arch/alpha/kernel/sys_dp264.c - dp264_pci_fixup_bus to disable phantoms.

With this patch everything works just fine for me and we got really fast net. ;-))

-- lspci -vv 01:08.0 Ethernet controller: 3Com Corporation 3c985 1000BaseSX (rev 01) Subsystem: Unknown device 9850:0001 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 64 min, 248 set, cache line size 08 Interrupt: pin A routed to IRQ 43 Region 0: Memory at 0000000109000000 (32-bit, non-prefetchable) --

As seems pci_fixup_bus needed for Alphas too... And possibly it's need to be done for 2.4 also.

Regards, Oleg.


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 23 2001 - 21:00:27 EST