From owner-freebsd-usb@FreeBSD.ORG Sun Mar 16 20:27:37 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EFEE5FA for ; Sun, 16 Mar 2014 20:27:37 +0000 (UTC) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 61858F8C for ; Sun, 16 Mar 2014 20:27:37 +0000 (UTC) Received: by mail-pb0-f44.google.com with SMTP id rp16so4816503pbb.31 for ; Sun, 16 Mar 2014 13:27:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=zFgybgaMmN4hF+j7TyAl5YlVGbl2KTVud65qeKTRreA=; b=bSTCZ76cTGmDBvwmalYM/Q16u3Ufki4EI73wOUJkr8BLielDx8h7i6TcohE3Js79Ez EvVfHFl9nWXQL3BxwaiWcf0h3WeyQWIO9qacoNHuKzzhIyXkoxb/hvVt+LOZdBJfZc2+ DLlcEY9xLDX4YUv+Wx4wTb039khSlRvHclDT9pDy1RkjOvNlLCwMOMjp9hEAQWzyvqYO Yx1n19w3AdV33I5gMKipdZ+r9ozmXm58KC1Sh0H5jnNSIJP7aGfo5yTn8booafCSTsHM lwC9W02yGJzjMakHTPecTdom1a5sFIuivo4KILSs+JVTXUErJ+LtRBcpe0O6QM30bYIt S5Ww== X-Gm-Message-State: ALoCoQlYDZlH4l6OPWee1qQwQQNmBJPkkS9ZlIgnWlegPPi33nTyejBKnsyVFNANH3azcmbDHsd/ X-Received: by 10.66.193.202 with SMTP id hq10mr21718135pac.57.1395001650376; Sun, 16 Mar 2014 13:27:30 -0700 (PDT) Received: from lgmac-swong.corp.netflix.com (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id vg1sm36820835pbc.44.2014.03.16.13.27.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 16 Mar 2014 13:27:29 -0700 (PDT) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: VIA Cardbus USB From: Warner Losh In-Reply-To: <5322BFEA.2030507@bitfrost.no> Date: Sun, 16 Mar 2014 14:27:27 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <9AC6995B-7134-40DC-BCC1-25D99EC4D022@gmail.com> References: <5322AE1E.6020407@allunix.ru> <5322B2E0.7090905@bitfrost.no> <5322B907.6070506@allunix.ru> <5322BFEA.2030507@bitfrost.no> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1874) Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2014 20:27:37 -0000 On Mar 14, 2014, at 2:38 AM, Hans Petter Selasky = 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 >>>>=20 >>>>=20 >>>> Features2=3D0x2001 >>>> AMD = Features=3D0xea500800 >>>> AMD Features2=3D0x1f >>>> real memory =3D 3221225472 (3072 MB) >>>> avail memory =3D 2743922688 (2616 MB) >>>> Event timer "LAPIC" quality 400 >>>> ACPI APIC Table: >>>> 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 irqs 0-23 on motherboard >>>> kbd1 at kbdmux0 >>>> random: initialized >>>> acpi0: on motherboard >>>> acpi0: Power Button (fixed) >>>> acpi0: reservation of 0, 1000 (3) failed >>>> cpu0: on acpi0 >>>> cpu1: on acpi0 >>>> atrtc0: port 0x70-0x71 irq 8 on acpi0 >>>> Event timer "RTC" frequency 32768 Hz quality 0 >>>> attimer0: 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: port 0x62,0x66 on acpi0 >>>> acpi_lid0: on acpi0 >>>> acpi_button0: on acpi0 >>>> acpi_button1: on acpi0 >>>> pcib0: port 0xcf8-0xcff on acpi0 >>>> pci0: on pcib0 >>>> pcib1: at device 1.0 on pci0 >>>> pci1: on pcib1 >>>> vgapci0: port 0x9000-0x90ff mem >>>> 0xc8000000-0xcfffffff,0xc0100000-0xc010ffff irq 17 at device 5.0 on = pci1 >>>> vgapci0: Boot video device >>>> pcib2: 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: on pcib2 >>>> pcib3: 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: on pcib3 >>>> pci0: at device 20.0 (no driver attached) >>>> atapci0: port >>>> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x8410-0x841f irq 16 at device = 20.1 >>>> on pci0 >>>> ata0: at channel 0 on atapci0 >>>> ata1: at channel 1 on atapci0 >>>> hdac0: mem 0xc0000000-0xc0003fff irq 16 = at >>>> device 20.2 on pci0 >>>> hdac0: Device stuck in reset >>>> isab0: at device 20.3 on pci0 >>>> isa0: on isab0 >>>> pcib4: at device 20.4 on pci0 >>>> pci6: on pcib4 >>>> rl0: port 0xa000-0xa0ff mem >>>> 0xc0210000-0xc02100ff irq 21 at device 1.0 on pci6 >>>> miibus0: on rl0 >>>> rlphy0: PHY 0 on miibus0 >>>> rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto >>>> rl0: Ethernet address: 00:16:d4:55:3d:e8 >>>> ath0: 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: mem 0xc0211000-0xc0211fff irq 20 at = device >>>> 4.0 on pci6 >>>> cardbus0: on cbb0 >>>> pccard0: <16-bit PCCard bus> on cbb0 >>>> pci6: at device 4.1 (no driver attached) >>>> sdhci_pci0: mem 0xc0210800-0xc02108ff irq 23 at = device >>>> 4.2 on pci6 >>>> sdhci_pci0: 1 slot(s) allocated >>>> pci6: at device 4.3 (no driver attached) >>>> sdhci_pci1: at device 4.4 on pci6 >>>> sdhci_pci1: 1 slot(s) allocated >>>> acpi_tz0: on acpi0 >>>> atkbdc0: port 0x60,0x64 irq 1 on = acpi0 >>>> atkbd0: irq 1 on atkbdc0 >>>> kbd0 at atkbd0 >>>> atkbd0: [GIANT-LOCKED] >>>> psm0: irq 12 on atkbdc0 >>>> psm0: [GIANT-LOCKED] >>>> psm0: model Generic PS/2 mouse, device ID 0 >>>> battery0: on acpi0 >>>> acpi_acad0: on acpi0 >>>> pmtimer0 on isa0 >>>> orm0: at iomem 0xc0000-0xcefff,0xcf000-0xcffff = pnpid >>>> ORM0000 on isa0 >>>> sc0: at flags 0x100 on isa0 >>>> sc0: VGA <16 virtual consoles, flags=3D0x300> >>>> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff = on >>>> isa0 >>>> ppc0: parallel port not found. >>>> powernow0: on cpu0 >>>> powernow1: on cpu1 >>>> Timecounters tick every 1.000 msec >>>> random: unblocking device. >>>> cardbus0: Expecting link target, got 0xff >>>> cardbus0: Expecting link target, got 0xff >>>> uhci0: port 0xa100-0xa11f irq 20 at = device >>>> 0.0 on cardbus0 >>>> ada0 at ata0 bus 0 scbus0 target 0 lun 0 >>>> ada0: 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: 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: port 0xa120-0xa13f irq 20 at = device >>>> 0.1 on cardbus0 >>>> ugen0.1: at usbus0 >>>> uhub0: 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: mem 0xc0212000-0xc02120ff = irq 20 >>>> at device 0.2 on cardbus0 >>>> ehci0: VIA-quirk applied >>>> usbus2: EHCI version 1.0 >>>> ugen1.1: at usbus1 >>>> uhub1: 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: at usbus2 >>>> uhub2: 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=