Date: Sun, 16 Mar 2014 14:27:27 -0600 From: Warner Losh <imp@bsdimp.com> To: Hans Petter Selasky <hps@bitfrost.no> Cc: freebsd-usb@freebsd.org Subject: Re: VIA Cardbus USB Message-ID: <9AC6995B-7134-40DC-BCC1-25D99EC4D022@gmail.com> In-Reply-To: <5322BFEA.2030507@bitfrost.no> References: <5322AE1E.6020407@allunix.ru> <5322B2E0.7090905@bitfrost.no> <5322B907.6070506@allunix.ru> <5322BFEA.2030507@bitfrost.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 14, 2014, at 2:38 AM, Hans Petter Selasky <hps@bitfrost.no> = wrote: > On 03/14/14 09:08, Admin wrote: >> 14.03.2014 14:42, Hans Petter Selasky =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>> On 03/14/14 08:22, Admin wrote: >>>> Hello all. >>>>=20 >>>> I have a two-port PCMCIA USB 2.0 card exactly like this: >>>>=20 >>>> = http://i01.i.aliimg.com/wsphoto/v0/371216405/PCMCIA-to-font-b-USB-b-font-f= ont-b-2-0-b-font-font-b-Cardbus.jpg >>>>=20 >>>>=20 >>>>=20 >>>> It works in Linux for my USB mouse and keyboard, so now I am trying = to >>>> use it in FreeBSD. >>>>=20 >>>> This is how it is detected by pciconf -lv: >>>>=20 >>>> uhci0@pci0:7:0:0: class=3D0x0c0300 card=3D0x30381106 = chip=3D0x30381106 >>>> rev=3D0x61 hdr=3D0x00 >>>> vendor =3D 'VIA Technologies, Inc.' >>>> device =3D 'VT82xxxxx UHCI USB 1.1 Controller' >>>> class =3D serial bus >>>> subclass =3D USB >>>> uhci1@pci0:7:0:1: class=3D0x0c0300 card=3D0x30381106 = chip=3D0x30381106 >>>> rev=3D0x61 hdr=3D0x00 >>>> vendor =3D 'VIA Technologies, Inc.' >>>> device =3D 'VT82xxxxx UHCI USB 1.1 Controller' >>>> class =3D serial bus >>>> subclass =3D USB >>>> ehci0@pci0:7:0:2: class=3D0x0c0320 card=3D0x31041106 = chip=3D0x31041106 >>>> rev=3D0x63 hdr=3D0x00 >>>> vendor =3D 'VIA Technologies, Inc.' >>>> device =3D 'USB 2.0' >>>> class =3D serial bus >>>> subclass =3D USB >>>>=20 >>>> And this is what I see during boot: >>>>=20 >>>> Copyright (c) 1992-2013 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 10.0-RC3 #2: Wed Feb 12 16:18:02 NOVT 2014 >>>> root@AcerAspire:/usr/obj/usr/src/sys/GENERIC i386 >>>> FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 >>>> CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-50 (1596.04-MHz = 686-class >>>> CPU) >>>> Origin =3D "AuthenticAMD" Id =3D 0x40f82 Family =3D 0xf Model =3D = 0x48 >>>> Stepping =3D 2 >>>> = Features=3D0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE= ,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT> >>>>=20 >>>>=20 >>>> Features2=3D0x2001<SSE3,CX16> >>>> AMD = Features=3D0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!> >>>> AMD Features2=3D0x1f<LAHF,CMP,SVM,ExtAPIC,CR8> >>>> real memory =3D 3221225472 (3072 MB) >>>> avail memory =3D 2743922688 (2616 MB) >>>> Event timer "LAPIC" quality 400 >>>> ACPI APIC Table: <PTLTD APIC > >>>> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs >>>> FreeBSD/SMP: 1 package(s) x 2 core(s) >>>> cpu0 (BSP): APIC ID: 0 >>>> cpu1 (AP): APIC ID: 1 >>>> MADT: Forcing active-low polarity and level trigger for SCI >>>> ioapic0 <Version 2.1> irqs 0-23 on motherboard >>>> kbd1 at kbdmux0 >>>> random: <Software, Yarrow> initialized >>>> acpi0: <PTLTD RSDT> on motherboard >>>> acpi0: Power Button (fixed) >>>> acpi0: reservation of 0, 1000 (3) failed >>>> cpu0: <ACPI CPU> on acpi0 >>>> cpu1: <ACPI CPU> on acpi0 >>>> atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0 >>>> Event timer "RTC" frequency 32768 Hz quality 0 >>>> attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0 >>>> Timecounter "i8254" frequency 1193182 Hz quality 0 >>>> attimer0: Can't map interrupt. >>>> Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 >>>> acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on = acpi0 >>>> acpi_ec0: <Embedded Controller: GPE 0x10> port 0x62,0x66 on acpi0 >>>> acpi_lid0: <Control Method Lid Switch> on acpi0 >>>> acpi_button0: <Power Button> on acpi0 >>>> acpi_button1: <Sleep Button> on acpi0 >>>> pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 >>>> pci0: <ACPI PCI bus> on pcib0 >>>> pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0 >>>> pci1: <ACPI PCI bus> on pcib1 >>>> vgapci0: <VGA-compatible display> port 0x9000-0x90ff mem >>>> 0xc8000000-0xcfffffff,0xc0100000-0xc010ffff irq 17 at device 5.0 on = pci1 >>>> vgapci0: Boot video device >>>> pcib2: <ACPI PCI-PCI bridge> at device 4.0 on pci0 >>>> pcib2: failed to allocate initial I/O port window: 0-0xfff >>>> pcib2: failed to allocate initial memory window: 0-0xfffff >>>> pcib2: failed to allocate initial prefetch window: 0-0xfffff >>>> pci2: <ACPI PCI bus> on pcib2 >>>> pcib3: <ACPI PCI-PCI bridge> at device 5.0 on pci0 >>>> pcib3: failed to allocate initial I/O port window: 0-0xfff >>>> pcib3: failed to allocate initial memory window: 0-0xfffff >>>> pci4: <ACPI PCI bus> on pcib3 >>>> pci0: <serial bus, SMBus> at device 20.0 (no driver attached) >>>> atapci0: <ATI IXP400 UDMA133 controller> port >>>> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x8410-0x841f irq 16 at device = 20.1 >>>> on pci0 >>>> ata0: <ATA channel> at channel 0 on atapci0 >>>> ata1: <ATA channel> at channel 1 on atapci0 >>>> hdac0: <ATI SB450 HDA Controller> mem 0xc0000000-0xc0003fff irq 16 = at >>>> device 20.2 on pci0 >>>> hdac0: Device stuck in reset >>>> isab0: <PCI-ISA bridge> at device 20.3 on pci0 >>>> isa0: <ISA bus> on isab0 >>>> pcib4: <ACPI PCI-PCI bridge> at device 20.4 on pci0 >>>> pci6: <ACPI PCI bus> on pcib4 >>>> rl0: <RealTek 8139 10/100BaseTX> port 0xa000-0xa0ff mem >>>> 0xc0210000-0xc02100ff irq 21 at device 1.0 on pci6 >>>> miibus0: <MII bus> on rl0 >>>> rlphy0: <RealTek internal media interface> PHY 0 on miibus0 >>>> rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto >>>> rl0: Ethernet address: 00:16:d4:55:3d:e8 >>>> ath0: <Atheros 2413> mem 0xc0200000-0xc020ffff irq 22 at device 2.0 >>>> on pci6 >>>> ath0: AR2413 mac 7.8 RF2413 phy 4.5 >>>> ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0056 >>>> cbb0: <PCI-CardBus Bridge> mem 0xc0211000-0xc0211fff irq 20 at = device >>>> 4.0 on pci6 >>>> cardbus0: <CardBus bus> on cbb0 >>>> pccard0: <16-bit PCCard bus> on cbb0 >>>> pci6: <memory, flash> at device 4.1 (no driver attached) >>>> sdhci_pci0: <ENE CB712 SD> mem 0xc0210800-0xc02108ff irq 23 at = device >>>> 4.2 on pci6 >>>> sdhci_pci0: 1 slot(s) allocated >>>> pci6: <memory, flash> at device 4.3 (no driver attached) >>>> sdhci_pci1: <ENE CB712 SD 2> at device 4.4 on pci6 >>>> sdhci_pci1: 1 slot(s) allocated >>>> acpi_tz0: <Thermal Zone> on acpi0 >>>> atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on = acpi0 >>>> atkbd0: <AT Keyboard> irq 1 on atkbdc0 >>>> kbd0 at atkbd0 >>>> atkbd0: [GIANT-LOCKED] >>>> psm0: <PS/2 Mouse> irq 12 on atkbdc0 >>>> psm0: [GIANT-LOCKED] >>>> psm0: model Generic PS/2 mouse, device ID 0 >>>> battery0: <ACPI Control Method Battery> on acpi0 >>>> acpi_acad0: <AC Adapter> on acpi0 >>>> pmtimer0 on isa0 >>>> orm0: <ISA Option ROMs> at iomem 0xc0000-0xcefff,0xcf000-0xcffff = pnpid >>>> ORM0000 on isa0 >>>> sc0: <System console> at flags 0x100 on isa0 >>>> sc0: VGA <16 virtual consoles, flags=3D0x300> >>>> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff = on >>>> isa0 >>>> ppc0: parallel port not found. >>>> powernow0: <PowerNow! K8> on cpu0 >>>> powernow1: <PowerNow! K8> on cpu1 >>>> Timecounters tick every 1.000 msec >>>> random: unblocking device. >>>> cardbus0: Expecting link target, got 0xff >>>> cardbus0: Expecting link target, got 0xff >>>> uhci0: <VIA 83C572 USB controller> port 0xa100-0xa11f irq 20 at = device >>>> 0.0 on cardbus0 >>>> ada0 at ata0 bus 0 scbus0 target 0 lun 0 >>>> ada0: <ST98823A 3.06> ATA-6 device >>>> ada0: Serial Number 5PK2AD2Y >>>> ada0: 100.000MB/s transfers (UDMA5, PIO 8192bytes) >>>> ada0: 76319MB (156301488 512 byte sectors: 16H 63S/T 16383C) >>>> ada0: Previously was known as ad0 >>>> cd0 at ata0 bus 0 scbus0 target 1 lun 0 >>>> cd0: <PIONEER DVD-RW DVR-K16RS 1.35> Removable CD-ROM SCSI-0 device >>>> cd0: Serial Number FIDL384431WL >>>> cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes) >>>> cd0: cd present [1131986 x 2048 byte records] >>>> SMP: AP CPU #1 Launched! >>>> usbus0: controller did not reset >>>> usbus0 on uhci0 >>>> usbus0: 12Mbps Full Speed USB v1.0 >>>> cardbus0: Expecting link target, got 0xff >>>> cardbus0: Expecting link target, got 0xff >>>> uhci1: <VIA 83C572 USB controller> port 0xa120-0xa13f irq 20 at = device >>>> 0.1 on cardbus0 >>>> ugen0.1: <VIA> at usbus0 >>>> uhub0: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on = usbus0 >>>> usbus1: controller did not reset >>>> usbus1 on uhci1 >>>> usbus1: 12Mbps Full Speed USB v1.0 >>>> cardbus0: Expecting link target, got 0xff >>>> cardbus0: Expecting link target, got 0xff >>>> ehci0: <VIA VT6202 USB 2.0 controller> mem 0xc0212000-0xc02120ff = irq 20 >>>> at device 0.2 on cardbus0 >>>> ehci0: VIA-quirk applied >>>> usbus2: EHCI version 1.0 >>>> ugen1.1: <VIA> at usbus1 >>>> uhub1: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on = usbus1 >>>> uhci_interrupt: resume detect >>>> uhci_interrupt: host system error >>>> uhci_interrupt: host controller process error >>>> uhci_interrupt: resume detect >>>> uhci_interrupt: host system error >>>> uhci_interrupt: host controller process error >>>> usbus2 on ehci0 >>>> usbus2: 480Mbps High Speed USB v2.0 >>>> ugen2.1: <VIA> at usbus2 >>>> uhub2: <VIA EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on = usbus2 >>>> uhub0: 2 ports with 2 removable, self powered >>>> uhub1: 2 ports with 2 removable, self powered >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub2: 4 ports with 4 removable, self powered >>>> uhci_interrupt: resume detect >>>> uhci_interrupt: host system error >>>> uhci_interrupt: host controller process error >>>> uhci_interrupt: resume detect >>>> uhci_interrupt: host system error >>>> uhci_interrupt: host controller process error >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhci_interrupt: resume detect >>>> uhci_interrupt: host system error >>>> uhci_interrupt: host controller process error >>>> uhci_interrupt: resume detect >>>> uhci_interrupt: host system error >>>> uhci_interrupt: host controller process error >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> Trying to mount root from ufs:/dev/ada0p2 [rw]... >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> wlan0: Ethernet address: 00:16:cf:89:cf:e0 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>> uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT >>>> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling = port 1 >>>>=20 >>>>=20 >>>> I see that when nothing is plugged in those USB ports on the card. >>>>=20 >>>> When I plug something in (like keyboard and mouse), it is not = detected >>>> and does not work. >>>>=20 >>>> usbconfig just hangs, not reacting to ctrl+c until I unplug the = card. >>>> Then it unhags and states the right EHCI device. >>>>=20 >>>> Where should I start looking? >>>=20 >>> Hi, >>>=20 >>> This might sound like an IRQ problem, that the device is not >>> generating any interrupts. You can fake interrupts by using a >>> timer/callout to see if that is the real problem. >>>=20 >>> -- >> Thanks for the reply! >> I thought of that, yes, but... do I have to hack a scheduler or = something? >> I'm not shure how this could be done. >>=20 >>=20 >=20 > Hi, >=20 > Just hack a callout that is calling the ehci_interrupt() function = every 1ms. See for example the xhci driver which has already got such a = feature. Any updates? Warner=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9AC6995B-7134-40DC-BCC1-25D99EC4D022>