Bug 114550 - [cbb] Cardbus WiFi card activation problem
Summary: [cbb] Cardbus WiFi card activation problem
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2007-07-13 12:40 UTC by Aurélien Méré
Modified: 2018-05-21 22:12 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Aurélien Méré 2007-07-13 12:40:01 UTC

I have a problem with Cardbus support : the inserted card is not
correctly recognized during bootup unless a specific PCICONF command
is done after. Here is the output of the boot process with cardbus debug
enabled :

cbb0: <ENE CB1410 PCI-CardBus Bridge> irq 19 at device 8.0 on pci2
cbb0: Found memory at f7801000
cbb0: Secondary bus is 0
cbb0: Setting primary bus to 2
cbb0: Secondary bus set to 3 subbus 4
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb0: [ITHREAD]
Status is 0x30000820
cbb0: card inserted: event=0x00000006, state=30000820
cbb0: cbb_power: 3V
cbb0: cbb_power: 0V

I saw on a forum with posts of March 2007 that to active correctly the
card, it is required to do something like : 

# pciconf -wb pci0:16:0 0x1a 8

and then, after removing and inserting the card again, everything works
correctly :

Status is 0x30000086
Status is 0x30000086
Status is 0x30000820
cbb0: card inserted: event=0x00000006, state=30000820
cbb0: cbb_power: 3V
cardbus0: CIS pointer is 0x601
cardbus0: CIS in BAR 0x10
cardbus0: Expecting link target, got 0x0
cardbus0: Warning: Bogus CIS ignored
ral0: <Ralink Technology RT2561S> mem 0xf7808000-0xf780ffff irq 19 at device 0.0 on cardbus0
ral0: MAC/BBP RT2661B, RF RT2527
ral0: Ethernet address: 00:0c:f6:1b:1f:1f
ral0: [ITHREAD]

Is there any patch available or planned to be commited in the source?
I tried using the last CURRENT release and I still get the problem.
Thanks by advance,



Here is the output of pciconf -l and dmesg :

$ pciconf -l
hostb0@pci0:0:0:        class=0x060000 card=0x00000000 chip=0x700c1022 rev=0x11 hdr=0x00
pcib1@pci0:1:0: class=0x060400 card=0x00000000 chip=0x700d1022 rev=0x00 hdr=0x01
isab0@pci0:7:0: class=0x060100 card=0x80441043 chip=0x74401022 rev=0x05 hdr=0x00
atapci0@pci0:7:1:       class=0x01018a card=0x74411022 chip=0x74411022 rev=0x04 hdr=0x00
none0@pci0:7:3: class=0x068000 card=0x80441043 chip=0x74431022 rev=0x03 hdr=0x00
ahc0@pci0:8:0:  class=0x010000 card=0xe2a09005 chip=0x00809005 rev=0x02 hdr=0x00
pcib2@pci0:16:0:        class=0x060400 card=0x00000000 chip=0x74481022 rev=0x05 hdr=0x01
vgapci0@pci1:5:0:       class=0x030000 card=0x00041049 chip=0x78008086 rev=0x21 hdr=0x00
re0@pci2:6:0:   class=0x020000 card=0x311a1385 chip=0x816910ec rev=0x10 hdr=0x00
cbb0@pci2:8:0:  class=0x060700 card=0x14101524 chip=0x14101524 rev=0x01 hdr=0x02
ral0@pci3:0:0:  class=0x028000 card=0x9072182d chip=0x03011814 rev=0x00 hdr=0x00

$ dmesg
Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-CURRENT #1: Fri Jul  6 10:59:58 UTC 2007
ACPI APIC Table: <ASUS   A7M266-D>
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(TM) MP 2000+ (1666.74-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
  AMD Features=0xc0480800<SYSCALL,MP,MMX+,3DNow!+,3DNow!>
real memory  = 805224448 (767 MB)
avail memory = 778293248 (742 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <ASUS A7M266-D> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: Sleep Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 2ff00000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <AMD 762 host to AGP bridge> on hostb0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> mem 0xfa000000-0xfaffffff,0xf9000000-0xf907ffff irq 16 at device 5.0 on pci1
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD 768 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xd800-0xd80f at device 7.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <bridge> at device 7.3 (no driver attached)
ahc0: <Adaptec 29160 Ultra160 SCSI adapter> port 0xd400-0xd4ff mem 0xf8800000-0xf8800fff irq 20 at device 8.0 on pci0
ahc0: [ITHREAD]
aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
pcib2: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci2: <ACPI PCI bus> on pcib2
re0: <RealTek 8169S Single-chip Gigabit Ethernet> port 0xc800-0xc8ff mem 0xf7800000-0xf78000ff irq 17 at device 6.0 on pci2
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re0: Ethernet address: 00:18:4d:79:72:65
re0: [FILTER]
cbb0: <ENE CB1410 PCI-CardBus Bridge> irq 19 at device 8.0 on pci2
cbb0: Found memory at f7801000
cbb0: Secondary bus is 0
cbb0: Setting primary bus to 2
cbb0: Secondary bus set to 3 subbus 4
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb0: [ITHREAD]
ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77f irq 7 drq 3 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/9 bytes threshold
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [ITHREAD]
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
sio1: [FILTER]
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc0000-0xc7fff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
ipfw2 initialized, divert enabled, rule-based forwarding disabled, default to deny, logging unlimited
Waiting 5 seconds for SCSI devices to settle
Status is 0x30000086
ad0: 9641MB <IBM DTTA-371010 T77OA73A> at ata0-master UDMA33
ad1: 117800MB <IC35L120AVV207 1 V24OA66A> at ata0-slave UDMA100
da0 at ahc0 bus 0 target 0 lun 0
da0: <IBM DDYS-T18350N S93D> Fixed Direct Access SCSI-3 device
da0: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit)
da0: Command Queueing Enabled
da0: 17357MB (35548320 512 byte sectors: 255H 63S/T 2212C)
da1 at ahc0 bus 0 target 1 lun 0
da1: <IBM DMVS09V 02B0> Fixed Direct Access SCSI-3 device
da1: 80.000MB/s transfers (40.000MHz, offset 31, 16bit)
da1: Command Queueing Enabled
da1: 8748MB (17916240 512 byte sectors: 255H 63S/T 1115C)
da3 at ahc0 bus 0 target 4 lun 0
da3: <IBMAS400 DFHSS4W 03B8> Fixed Direct Access SCSI-3 device
da3: 40.000MB/s transfers (20.000MHz, offset 15, 16bit)
da3: Command Queueing Enabled
da3: 4303MB (8813870 512 byte sectors: 255H 63S/T 548C)
SMP: AP CPU #1 Launched!
da2 at ahc0 bus 0 target 2 lun 0
da2: <IBM DNES-309170W SAH0> Fixed Direct Access SCSI-3 device
da2: 40.000MB/s transfers (20.000MHz, offset 31, 16bit)
da2: Command Queueing Enabled
da2: 8748MB (17916240 512 byte sectors: 255H 63S/T 1115C)
GEOM_LABEL: Label for provider da1s1 is ntfs/KW-S9A.
Trying to mount root from ufs:/dev/ad0s1a
re0: link state changed to UP
Status is 0x30000820
cbb0: card inserted: event=0x00000006, state=30000820
cbb0: cbb_power: 3V
cbb0: cbb_power: 0V

Comment 1 Warner Losh freebsd_committer 2008-08-27 06:15:47 UTC
State Changed
From-To: open->feedback

I believe that I've fixed this in -current.  Can you try it and see if 
it works?
Comment 2 Lars Engels 2009-04-30 18:37:06 UTC
No, this is not fixed in CURRENT.
The behaviour changed some weeks ago. Without the pciconf tweak I now
get a message:
cbb0: timed out
(or similar) when I insert the card.

Lars Engels
E-Mail: lars.engels@0x20.net 	
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2009-04-30 22:32:52 UTC
State Changed
From-To: feedback->open

Problem is confirmed to still exist.
Comment 4 John Baldwin freebsd_committer freebsd_triage 2014-08-11 18:45:20 UTC
The pciconf -w hack should be fixed for real in recent current in that we now properly assign bus numbers.
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:51:39 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

- Set Status to "Open"
Comment 6 John Baldwin freebsd_committer freebsd_triage 2018-05-21 22:12:49 UTC
I believe this is fixed in 11.0 and later at least via PCI_RES_BUS.  This can be reopened if the issue still persists, but someone will need to have hardware available for testing.