Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2001 06:59:54 -0700 (PDT)
From:      dot@dotat.at
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/26920: PCI autoconfiguration of USB, dc ether, and pccard broken on SHARP PC-AR10
Message-ID:  <200104281359.f3SDxsL05935@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         26920
>Category:       kern
>Synopsis:       PCI autoconfiguration of USB, dc ether, and pccard broken on SHARP PC-AR10
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 28 07:00:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Tony Finch
>Release:        FreeBSD-4.3-RC3
>Organization:
dotat labs
>Environment:
This machine is a laptop which appears to be designed for Windows ME.
It has a 500MHz PIII, Intel 82371AB/EB (PIIx4) and 82443BX chipset,
Accton EN2242 dc ethernet, Texas Instruments PCI-4451 CardBus controllers,
and a TI IEEE 1394 OHCI host controller, plus other working devices.

(I should probably include my kernel config here but I don't have a
convenient way of copying it since the machine has no network devices.
The only unusual option is PNPBIOS.)
>Description:
There is a problem with PCI autoconfiguration of the USB controller
(which is part of the PIIx4) and the Ethernet and the cardbus controllers.
If I hack around the immediate problem then some other problems surface.

Before I installed FreeBSD on the machine I recorded the hardware
configuration details that Windows was using. A verbose boot showed
that the memory and IO ranges I expected to see for the USB, Ether,
and CardBus ports weren't being probed, although other devices (such
as the PCI bridge, ATA controller, etc) were probed OK. I hacked
/sys/pci/pci.c to print more information about the memory map as
follows (plus my comments):

[...]
found-> vendor=0x8086, dev=0x7112, revid=0x01 (Intel PIIx4 USB ctlr)
	class=0c-03-00, hdrtype=0x00, mfdev=0
	subordinatebus=0	secondarybus=0
	cmdreg=0x0000, statreg=0x0280, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=d, irq=5
	invalid map entry 0
	invalid map entry 0
	invalid map entry 0
	invalid map entry 0
	map entry fcc1 ffe1 (i.e. the variables map and testval)
	io port not enabled
	invalid map entry 0
	(should have io range 0x1000 - 0x101f)
[...]
found-> vendor=0x1113, dev=0x1216, revid=0x11 (Accton dc Ethernet)
	class=02-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0	secondarybus=0
	cmdreg=0x0010, statreg=0x0290, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0xff (63750 ns), maxlat=0xff (63750 ns)
	intpin=a, irq=11
	map entry f801 ffffff01
	io port not enabled
	map entry fedffc00 fffffc00
	mem range not enabled
	invalid map entry 0
	invalid map entry 0
	invalid map entry 0
	invalid map entry 0
	(should have io range 0x1400 - 0x14ff)
	(should have mem range 0x08002800 - 0x08002bff)
[...]
found-> vendor=0x104c, dev=0xac42, revid=0x00 (TI PCI-4451 CardBus)
	class=06-07-00, hdrtype=0x02, mfdev=1
	subordinatebus=0	secondarybus=0
	cmdreg=0x0000, statreg=0x0210, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0xc0 (48000 ns), maxlat=0x03 (750 ns)
	intpin=a, irq=11
	map entry fedfe000 fffff000
	mem range not enabled
	(should have mem range 0x08000000 - 0x08000fff)
[...]
found-> vendor=0x104c, dev=0xac42, revid=0x00 (TI PCI-4451 CardBus)
	class=06-07-00, hdrtype=0x02, mfdev=1
	subordinatebus=0	secondarybus=0
	cmdreg=0x0000, statreg=0x0210, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0xc0 (48000 ns), maxlat=0x03 (750 ns)
	intpin=a, irq=11
	map entry fedfd000 fffff000
	mem range not enabled
	(should have mem range 0x08001000 - 0x08001fff)
[...]
found-> vendor=0x104c, dev=0x8027, revid=0x00 (TI IEEE 1394 ctlr)
	class=0c-00-10, hdrtype=0x00, mfdev=1
	subordinatebus=0	secondarybus=0
	cmdreg=0x0010, statreg=0x0210, cachelnsz=8 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x02 (500 ns), maxlat=0x04 (1000 ns)
	intpin=a, irq=11
	map entry fedff000 fffff800
	mem range not enabled
	map entry fedf8000 ffffc000
	mem range not enabled
	invalid map entry 0
	invalid map entry 0
	invalid map entry 0
	invalid map entry 0
	(should have mem range 0x08002000 - 0x080027ff)
	(should have mem range 0x08004000 - 0x08007fff)
[...]

The cmdreg values and the map entries seem to be rather funted.

I further hacked pci.c to abuse the quirk mechanism to force the desired
configuration to be "probed". I also hacked pcic_p.[ch] to treat
a TI4451 like a TI1451 (in the vain hope that it would work given that
other TI pccard chipsets looked reasonably compatible).

[Owing to lack of networking on the problem machine the diffs are too
inaccessible to repeat here.]

Once that was done, the drivers attempted to initialize the devices, although
not entirely successfully, as follows:

[...]
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0x1000-0x101f irq 5 at device 7.2 on pci0
usb0: cannot start
uhci0: USB init failed
device_probe_and_attach: uhci0 attach returned 5
chip1: <Intel 82371AB Power management controller> port 0x2180-0x218f at device 7.3 on pci0
dc0: <Accton EN2242 MiniPCI 10/100BaseTX> port 0x1400-0x14ff mem 0x8002800-0x8002bff irq 11 at device 11.0 on pci0
dc0: Ethernet address: ff:ff:ff:ff:ff:ff
dc0: MII without any PHY!
device_probe_and_attach: dc0 attach returned 6
pcic-pci0: <TI PCI-4451 PCI-CardBus Bridge> mem 0x8001000-0x8001fff irq 11 at device 12.0 on pci0
pcic-pci0: TI12XX PCI Config Reg: [ring enable][speaker enable][pwr save][FUNC pci int + CSC serial isa irq]
pcic-pci0: Legacy address set to 0x3e0
PCI Config space:
00: ac42104c 02100003 06070000 00824008
01: fedfe000 020000a0 00000000 00000000
20: 00000000 00000000 00000000 00000000
30: 00000000 00000000 00000000 03c0010b
40: 101913bd 000003e1 00000000 00000000
50: 00000000 00000000 00000000 00000000
60: 00000000 00000000 00000000 00000000
70: 00000000 00000000 00000000 00000000
80: 3844d061 00008400 000f0000 00000002
90: 616682c0 00000000 00000000 00000000
Cardbus Socket registers:
00: 00000000: 00000000: 30000006: 00000000:
10: 00000000: 00000000: 00000000: 00000000:
ExCa registers:
00: 84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10: 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
pcic-pci1: <TI PCI-4451 PCI-CardBus Bridge> mem 0x8001000-0x8001fff irq 11 at device 12.1 on pci0
pcic-pci1: TI12XX PCI Config Reg: [ring enable][speaker enable][pwr save][FUNC pci int + CSC serial isa irq]
PCI Config space:
00: ac42104c 02100003 06070000 00824008
01: fedfd000 020000a0 00000000 00000000
20: 00000000 00000000 00000000 00000000
30: 00000000 00000000 00000000 03c0010b
40: 101913bd 000003e1 00000000 00000000
50: 00000000 00000000 00000000 00000000
60: 00000000 00000000 00000000 00000000
70: 00000000 00000000 00000000 00000000
80: 3844d061 00008400 000f0000 00000002
90: 616682c0 00000000 00000000 00000000
Cardbus Socket registers:
00: 00000000: 00000000: 30000006: 00000000:
10: 00000000: 00000000: 00000000: 00000000:
ExCa registers:
00: 84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10: 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
pci0: <unknown card> (vendor=0x104c, dev=0x8027) at 12.2 irq11
[...]

After this there's no sign of pccard devices, although this might be because
I screwed up the quirk hack and gave both cardbus controllers the same memory
range...

>How-To-Repeat:
I haven't heard of any other machines with this problem :-(

>Fix:
I don't know. Any help getting it working would be greatly appreciated.

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104281359.f3SDxsL05935>