NetBSD Problem Report #8799

Received: (qmail 8752 invoked from network); 14 Nov 1999 18:26:57 -0000
Message-Id: <199911141826.TAA04957@arresum.inka.de>
Date: Sun, 14 Nov 1999 19:26:53 +0100 (MET)
From: Bernd Ernesti <bernd@arresum.inka.de>
Reply-To: bernd@arresum.inka.de
To: gnats-bugs@gnats.netbsd.org
Subject: Wrong attachment of the Host Bridge at cardbus0
X-Send-Pr-Version: 3.95

>Number:         8799
>Category:       port-i386
>Synopsis:       Wrong attachment of the Host Bridge at cardbus0
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 14 10:27:00 +0000 1999
>Closed-Date:    Wed Nov 17 20:15:00 +0000 1999
>Last-Modified:  Wed Nov 17 20:19:53 +0000 1999
>Originator:     Bernd Ernesti
>Release:        NetBSD-current 12-Nov-1999 20:00 GMT
>Organization:

>Environment:

System: NetBSD arresum.inka.de 1.4M NetBSD 1.4M (ARRESUM) #399: Sun Oct 31 17:03:23 MET 1999 bernd@arresum.inka.de:/home/work/obj_i386/src.i386/sys/arch/i386/compile/ARRESUM i386


>Description:
	Try to boot an Asus F7400 notebook with an intel cardbus card and notice
	the wrong attachment of the cardbus card:
[..]
Intel 82443BX Host Bridge/Controller (host bridge, revision 0x03) at ? dev 0 function 0 (tag 0x80000000, intrtag 0x80000000, intrswiz 0, intrpin 0, i/o off, mem on, no quirks)
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
[..]
cbb0 at pci0 dev 10 function 0: PCI configuration registers:
[..]
Texas Instruments PCI1220 PCI-CardBus Bridge (CardBus bridge, revision 0x02) at ? dev 10 function 0 (tag 0x80005000, intrtag 0x80005000, intrswiz 0, intrpin 0x1, i/o on, mem on, no quirks) (TI1220), chipflags 3
cbb1 at pci0 dev 10 function 1: PCI configuration registers:
Texas Instruments PCI1220 PCI-CardBus Bridge (CardBus bridge, revision 0x02) at ? dev 10 function 1 (tag 0x80005100, intrtag 0x80005100, intrswiz 0, intrpin 0x2, i/o on, mem on, no quirks) (TI1220), chipflags 3
[..]
cbb0: interrupting at irq 11
cbb0: cacheline 0x0 lattimer 0x20
cbb0: bhlc 0x824000 lscp 0x20000000
cardslot0 at cbb0 slot 0 flags 0
cardslot0 attaching CardBus bus...
cardbus0 at cardslot0: bus 0 device 0 cacheline 0x0, lattimer 0x20
cardslotattach: found cardbus on cardslot0
cardbusmatch: busname differs pcmcia <=> cardbus
pcmcia0 at cardslot0
cardslotattach: found 16-bit pcmcia bus
cardslotattach: CardBus card found
cardslot_event_throw: an event CardBus Card inserted comes
cbb1: interrupting at irq 11
cbb1: cacheline 0x0 lattimer 0x20
cbb1: bhlc 0x824000 lscp 0x20000000
cardslot1 at cbb1 slot 1 flags 0
cardslot1 attaching CardBus bus...
cardbus1 at cardslot1: bus 0 device 0 cacheline 0x0, lattimer 0x20
cardslotattach: found cardbus on cardslot1
cardbusmatch: busname differs pcmcia <=> cardbus
pcmcia1 at cardslot1
cardslotattach: found 16-bit pcmcia bus
[..]
cardbus_attach_card: cb0 start
cardbus_attach_card: Vendor 0x8086, Product 0x7190, CIS 0x0
cardbus0: reading CIS data from configuration space
WRONG TUPLE: 0x86
WRONG TUPLE: 0x86
(manufacturer 0x0, product 0x0) Intel 82443BX Host Bridge/Controller (host bridge, revision 0x03) at cardbus0 dev 0 function 0 not configured

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:

From: joda@pdc.kth.se (Johan Danielsson)
To: bernd@arresum.inka.de
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/8799: Wrong attachment of the Host Bridge at cardbus0
Date: 14 Nov 1999 19:48:15 +0100

 Bernd Ernesti <bernd@arresum.inka.de> writes:

 Your cardbus bridge hasn't been configured properly, and (incorrectly)
 thinks it's PCI bus 0:

 > cardbus0 at cardslot0: bus 0 device 0 cacheline 0x0, lattimer 0x20

 so when the code tries to access the card at what it thinks is PCI bus
 0, it hits the host controller, and not the card.

 See if this patch makes any difference.

 /Johan

 --- pccbb.c	1999/11/01 08:58:45	1.7
 +++ pccbb.c	1999/11/14 18:45:25
 @@ -600,6 +618,12 @@
      pcireg_t bhlc = pci_conf_read(pc, sc->sc_tag, PCI_BHLC_REG);
      pcireg_t pci_lscp = pci_conf_read(pc, sc->sc_tag, PCI_CB_LSCP_REG);

 +    if(((pci_lscp >> 8) & 0xff) == 0) {
 +	pci_lscp &= 0xff0000ff;
 +	pci_lscp |= 0x020200;
 +	pci_conf_read(pc, sc->sc_tag, pci_lscp);
 +    }
 +
      /* initialise cbslot_attach */
      cba.cba_busname = "cardbus";
      cba.cba_iot = sc->sc_iot;


From: Bernd Ernesti <bernd@arresum.inka.de>
To: joda@pdc.kth.se (Johan Danielsson)
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/8799: Wrong attachment of the Host Bridge at cardbus0
Date: Sun, 14 Nov 1999 22:48:34 +0100 (MET)

 On Sun Nov 14 19:48:15 1999, Johan Danielsson wrote:
 > 
 > Bernd Ernesti <bernd@arresum.inka.de> writes:
 > 
 > Your cardbus bridge hasn't been configured properly, and (incorrectly)
 > thinks it's PCI bus 0:
 > 
 > > cardbus0 at cardslot0: bus 0 device 0 cacheline 0x0, lattimer 0x20
 > 
 > so when the code tries to access the card at what it thinks is PCI bus
 > 0, it hits the host controller, and not the card.
 > 
 > See if this patch makes any difference.

 Nope, doesn't make any difference.

 Bernd


From: joda@pdc.kth.se (Johan Danielsson)
To: Bernd Ernesti <bernd@arresum.inka.de>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/8799: Wrong attachment of the Host Bridge at cardbus0
Date: 15 Nov 1999 09:48:12 +0100

 Bernd Ernesti <bernd@arresum.inka.de> writes:

 > Nope, doesn't make any difference.

 I can understand that, sorry for the confusion. Try this instead.

 /Johan

 --- pccbb.c	1999/11/01 08:58:45	1.7
 +++ pccbb.c	1999/11/15 08:46:41
 @@ -598,7 +616,12 @@
    if (!(sc->sc_pcmcia_flags & PCCBB_PCMCIA_16BITONLY)) {
      pcireg_t busreg = pci_conf_read(pc, sc->sc_tag, PCI_BUSNUM);
      pcireg_t bhlc = pci_conf_read(pc, sc->sc_tag, PCI_BHLC_REG);
 -    pcireg_t pci_lscp = pci_conf_read(pc, sc->sc_tag, PCI_CB_LSCP_REG);
 +
 +    if(((busreg >> 8) & 0xff) == 0) {
 +	busreg &= 0xff0000ff;
 +	busreg |= 0x020200;
 +	pci_conf_write(pc, sc->sc_tag, PCI_BUSNUM, busreg);
 +    }

      /* initialise cbslot_attach */
      cba.cba_busname = "cardbus";
 @@ -617,12 +640,12 @@
  #endif

      cba.cba_cacheline = PCI_CACHELINE(bhlc);
 -    cba.cba_lattimer = PCI_CB_LATENCY(pci_lscp);
 +    cba.cba_lattimer = PCI_CB_LATENCY(busreg);

      printf("%s: cacheline 0x%x lattimer 0x%x\n", sc->sc_dev.dv_xname,
  	   cba.cba_cacheline, cba.cba_lattimer);
      printf("%s: bhlc 0x%x lscp 0x%x\n", sc->sc_dev.dv_xname,
 -	   bhlc, pci_lscp);
 +	   bhlc, busreg);
  #if defined SHOW_REGS
      cb_show_regs(sc->sc_pc, sc->sc_tag, sc->sc_base_memt, sc->sc_base_memh);
  #endif

From: Bernd Ernesti <Bernd.Ernesti@xlink.net>
To: Johan Danielsson <joda@pdc.kth.se>, gnats-bugs@gnats.netbsd.org
Cc:  Subject: Re: port-i386/8799: Wrong attachment of the Host Bridge at cardbus0
Date: Mon, 15 Nov 1999 15:55:56 +0100

 Hi,

 the new 'patch' works, so the kernel finds the card and the phy, but I now
 get 'device timeouts'.
 So there is still an interrupt problem.

 Bernd

 P.S: Note the reply-to address, so I see the answer also at work and doen't
 have to run an tail -f on the server :)

From: joda@pdc.kth.se (Johan Danielsson)
To: veego@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/8799: Wrong attachment of the Host Bridge at cardbus0
Date: 15 Nov 1999 16:49:23 +0100

 Bernd Ernesti <Bernd.Ernesti@xlink.net> writes:

 > the new 'patch' works, so the kernel finds the card and the phy, but I now
 > get 'device timeouts'.
 > So there is still an interrupt problem.

 There are probably more things that need fixing.

 I don't know if it's worth the trouble to try to fix this the ugly
 way, since this is what the pcibios code is supposed to do.  Did you
 try those patches, and if so, did they made any difference?

 ftp://f77.nop.or.jp/users/uch/PCI/PCIBIOS-NetBSD-1.4L-991021.patch.gz

 /Johan

From: Bernd Ernesti <Bernd.Ernesti@xlink.net>
To: Johan Danielsson <joda@pdc.kth.se>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/8799: Wrong attachment of the Host Bridge at cardbus0
Date: Mon, 15 Nov 1999 16:53:51 +0100

 Johan Danielsson wrote:
 > 
 > Bernd Ernesti <Bernd.Ernesti@xlink.net> writes:
 > 
 > > the new 'patch' works, so the kernel finds the card and the phy, but I now
 > > get 'device timeouts'.
 > > So there is still an interrupt problem.
 > 
 > There are probably more things that need fixing.

 Yeah, I still need to boot a linux boot disk and initalize my ne2k card and
 then reboot into netbsd to get a working ne0. Thats without using the
 cardbus driver, because I only get device timeouts with the cardbus driver
 and the ne2k card (even with booting the linux disk before).

 > I don't know if it's worth the trouble to try to fix this the ugly
 > way, since this is what the pcibios code is supposed to do.  Did you
 > try those patches, and if so, did they made any difference?

 I did and it didn't make any differences :(

 Bernd
State-Changed-From-To: open->closed 
State-Changed-By: veego 
State-Changed-When: Wed Nov 17 12:15:00 PST 1999 
State-Changed-Why:  
Updating to -current of today fixed the problem. 
I use PCIBIOS. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.