Re: nick-nhusb merge coming soon
On 28 April 2016 at 06:56, Paul Goyette wrote: > On Wed, 13 Apr 2016, Paul Goyette wrote: > >> Does this include xhci support for USB3 (ie, removal of the "experimental" >> tag)? > > > FWIW, I finally got around to checking the status of USB3 on my machine. > > Firstly, let me note that I do not have any USB3 peripherals. My only USB3 > equipment is the USB3 support on the motherboard itself. > > With an older 7.99.26 kernel, USB is totally screwed if I enable the USB3 > ports. In order for _any_ USB device (ie, my mouse and keyboard) to work, I > need to disable USB3 support in the BIOS. > > I'm happy to note that this restriction no longer exists! With a kernel > built from today's sources, the system boots just fine with all USB3 BIOS > settings enabled, and the USB keyboard and mouse function normally. If you have an install image USB stick handy, does it work when plugged into a USB3 port? I keep being tripped up by that one, and for multiple OSs. Guess I should give it another go :-)
Re: nick-nhusb merge coming soon
On Wed, 13 Apr 2016, Paul Goyette wrote: Does this include xhci support for USB3 (ie, removal of the "experimental" tag)? FWIW, I finally got around to checking the status of USB3 on my machine. Firstly, let me note that I do not have any USB3 peripherals. My only USB3 equipment is the USB3 support on the motherboard itself. With an older 7.99.26 kernel, USB is totally screwed if I enable the USB3 ports. In order for _any_ USB device (ie, my mouse and keyboard) to work, I need to disable USB3 support in the BIOS. I'm happy to note that this restriction no longer exists! With a kernel built from today's sources, the system boots just fine with all USB3 BIOS settings enabled, and the USB keyboard and mouse function normally. I guess now I should go out and purchase a USB3 SSD to see if it actually works at USB3 speeds! :) I have attached the dmesg from 7.99.28 ... +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | +--+--++Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. NetBSD 7.99.28 (GENERIC) #1: Thu Apr 28 18:10:30 PHT 2016 p...@pokey.whooppee.com:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/GENERIC total memory = 8064 MB avail memory = 7809 MB cpu_rng: RDRAND timecounter: Timecounters tick every 10.000 msec Kernelized RAIDframe activated timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100 ASUS All Series (System Version) mainbus0 (root) ACPI: RSDP 0x000F0490 24 (v02 ALASKA) ACPI: XSDT 0xD8904080 7C (v01 ALASKA A M I01072009 AMI 00010013) ACPI: FACP 0xD8912858 00010C (v05 ALASKA A M I01072009 AMI 00010013) ACPI: DSDT 0xD8904198 00E6B9 (v02 ALASKA A M I0031 INTL 20091112) ACPI: FACS 0xD8E52080 40 ACPI: APIC 0xD8912968 72 (v03 ALASKA A M I01072009 AMI 00010013) ACPI: FPDT 0xD89129E0 44 (v01 ALASKA A M I01072009 AMI 00010013) ACPI: LPIT 0xD8912A28 5C (v01 ALASKA A M I AMI. 0005) ACPI: SSDT 0xD8912A88 000539 (v01 PmRef Cpu0Ist 3000 INTL 20091112) ACPI: SSDT 0xD8912FC8 000AD8 (v01 PmRef CpuPm3000 INTL 20091112) ACPI: MCFG 0xD8913AA0 3C (v01 ALASKA A M I01072009 MSFT 0097) ACPI: HPET 0xD8913AE0 38 (v01 ALASKA A M I01072009 AMI. 0005) ACPI: SSDT 0xD8913B18 00036D (v01 SataRe SataTabl 1000 INTL 20091112) ACPI: SSDT 0xD8913E88 0034E1 (v01 SaSsdt SaSsdt 3000 INTL 20091112) ACPI: BGRT 0xD89173C8 38 (v00 ALASKA A M I01072009 AMI 00010013) ACPI: 5 ACPI AML tables successfully acquired and loaded ioapic0 at mainbus0 apid 8: pa 0xfec0, version 0x20, 24 pins cpu0 at mainbus0 apid 0 cpu0: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz, id 0x306c3 cpu1 at mainbus0 apid 2 cpu1: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz, id 0x306c3 cpu2 at mainbus0 apid 4 cpu2: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz, id 0x306c3 cpu3 at mainbus0 apid 6 cpu3: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz, id 0x306c3 acpi0 at mainbus0: Intel ACPICA 20160108 acpi0: X/RSDT: OemId , AslId mpacpi: PCI bus 5 int routing already done! acpi0: MCFG: segment 0, bus 0-63, address 0xf800 ACPI: Dynamic OEM Table Load: ACPI: SSDT 0xFE810E648C10 0003D3 (v01 PmRef Cpu0Cst 3001 INTL 20091112) ACPI: Dynamic OEM Table Load: ACPI: SSDT 0xFE810E6F5810 0005AA (v01 PmRef ApIst3000 INTL 20091112) ACPI: Dynamic OEM Table Load: ACPI: SSDT 0xFE810E5F0290 000119 (v01 PmRef ApCst3000 INTL 20091112) acpi0: SCI interrupting at int 9 timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000 hpet0 at acpi0: high precision event timer (mem 0xfed0-0xfed00400) timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000 acpiec0 at acpi0 (H_EC, PNP0C09-1) acpiec0: unable to evaluate _GPE: AE_NOT_FOUND TPMX (PNP0C01) at acpi0 not configured FWHD (INT0800) at acpi0 not configured LDRC (PNP0C02) at acpi0 not configured attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0 CWDT (INT3F0D) at acpi0 not configured SIO1 (PNP0C02) at acpi0 not configured LPTE (PNP0400) at acpi0 not configured RMSC (PNP0C02) at acpi0 not configured UAR1 (PNP0501) at acpi0 not configured PDRC (PNP0C02) at acpi0 not configured acpivga0 at acpi0 (GFX0): ACPI Display Adapter acpiout0 at acpivga0 (DD01, 0x0100): ACPI Display Output Device acpiout1 at acpivga0 (DD02,
Re: nick-nhusb merge coming soon
On 2016/04/14 18:29, Takahiro Hayashi wrote: On 2016/04/14 17:40, Nick Hudson wrote: I summarise known problems: + KASSERT(sc->sc_command_addr == 0) in xhci_do_command() may fail. + My ASM1042 card does not work at all. No interrupts. It works on FreeBSD and OpenBSD. http://nxr.netbsd.org/xref/src-freebsd/sys/dev/usb/controller/xhci.c#1226 Is that relevant here? Not sure, but I'll try it. When I plug in USB drive to asm1042 port, no interrupts happen as far as I see vmstat -iv. # dmesg|grep xhci1 xhci1 at pci3 dev 0 function 0: vendor 1b21 product 1042 (rev. 0x00) xhci1: interrupting at msi2 vec 0 xhci1: xHCI version 0.96 xhci1: hcs1=4000820 hcs2=17f1 hcs3=0 xhci1: hcc=0x200f180 xhci1: xECP 800 xhci1: ECR 800: 0401 xhci1: ECR 810: 03000402 xhci1: SP: 03000402 20425355 0201 xhci1: ECR 820: 0202 xhci1: SP: 0202 20425355 00010203 xhci1: PAGESIZE 0x0001 xhci1: sc_pgsz 0x1000 xhci1: sc_maxslots 0x0020 xhci1: sc_maxports 4 xhci1: sc_maxspbuf 0 xhci1: eventst: NORMAL_COMPLETION dc3f6fc0 0x800046cb5fc0 1000 xhci1: dcbaa: NORMAL_COMPLETION dc3f8000 0x800046cb7000 1000 xhci1: setting IMOD 0 xhci1: USBCMD 0005 usb1 at xhci1: USB revision 3.0 # vmstat -iv | grep msi2 msi2 vec 000 When the drive is connected at boot, uhub detects the device by scanning all ports forcibly but xhci_new_device fails ENABLE_SLOT with command timeout. In this case total interruput counts of asm1042 is 0, too. I attach pcictl dump of this card. Thanks, -- t-hash # pcictl pci3 dump -d 0 PCI configuration registers: Common header: 0x00: 0x10421b21 0x0016 0x0c033000 0x0010 Vendor Name: ASMedia (0x1b21) Device Name: ASM1042 USB 3.0 Host Controller (0x1042) Command register: 0x0006 I/O space accesses: off Memory space accesses: on Bus mastering: on Special cycles: off MWI transactions: off Palette snooping: off Parity error checking: off Address/data stepping: off System error (SERR): off Fast back-to-back transactions: off Interrupt disable: off Status register: 0x0010 Immediate Readness: off Interrupt status: inactive Capability List support: on 66 MHz capable: off User Definable Features (UDF) support: off Fast back-to-back capable: off Data parity error detected: off DEVSEL timing: fast (0x0) Slave signaled Target Abort: off Master received Target Abort: off Master received Master Abort: off Asserted System Error (SERR): off Parity error detected: off Class Name: serial bus (0x0c) Subclass Name: USB (0x03) Interface: 0x30 Revision ID: 0x00 BIST: 0x00 Header Type: 0x00 (0x00) Latency Timer: 0x00 Cache Line Size: 64bytes (0x10) Type 0 ("normal" device) header: 0x10: 0xff84 0x 0x 0x 0x20: 0x 0x 0x 0x2104174c 0x30: 0x 0x0050 0x 0x010b Base address register at 0x10 type: 64-bit nonprefetchable memory base: 0xff80, not sized Base address register at 0x18 not implemented(?) Base address register at 0x1c not implemented(?) Base address register at 0x20 not implemented(?) Base address register at 0x24 not implemented(?) Cardbus CIS Pointer: 0x Subsystem vendor ID: 0x174c Subsystem ID: 0x2104 Expansion ROM Base Address: 0x Capability list pointer: 0x50 Reserved @ 0x38: 0x Maximum Latency: 0x00 Minimum Grant: 0x00 Interrupt pin: 0x01 (pin A) Interrupt line: 0x0b Capability register at 0x50 type: 0x05 (MSI) Capability register at 0x68 type: 0x11 (MSI-X) Capability register at 0x78 type: 0x01 (Power Management) Capability register at 0x80 type: 0x10 (PCI Express) PCI Power Management Capabilities Register Capabilities register: 0x0043 Version: 1.2 PME# clock: off Device specific initialization: off 3.3V auxiliary current: 55 mA D1 power management state support: off D2 power management state support: off PME# support D0: off PME# support D1: off PME# support D2: off PME# support D3 hot: off PME# support D3 cold: off Control/status register: 0x Power state: D0 PCI Express reserved: off No soft reset: off PME# assertion: disabled PME# status: off Bridge Support Extensions register: 0x00 B2/B3 support: off Bus Power/Clock Control Enable: off Data register: 0x00 PCI Message Signaled Interrupt Message Control register: 0x0087 MSI Enabled: on Multiple Message Capable: yes (8 vectors) Multiple Message Enabled: off (1 vector) 64 Bit Address Capable: on Per-Vector Masking Capable: off Message Address (lower) register: 0xfee00
Re: nick-nhusb merge coming soon
On 2016/04/14 17:40, Nick Hudson wrote: I summarise known problems: + KASSERT(sc->sc_command_addr == 0) in xhci_do_command() may fail. + My ASM1042 card does not work at all. No interrupts. It works on FreeBSD and OpenBSD. http://nxr.netbsd.org/xref/src-freebsd/sys/dev/usb/controller/xhci.c#1226 Is that relevant here? Not sure, but I'll try it. + Implementation of upm_abort is imcomplete. I'll try and look into this soon. I mean implementation of abort_xfer method in xhci.c is incomplete. + Link Power management is not implemented. + Isochronous transfer is not implemented. + Stream protocol is not supported. Takers? :) + Address of root hub is 0 (but it works anyway). I'll also try and look into this + On the xhci of Intel PCH: + The address assigned to device increases when reattaching device. + HS hub in 3.0 hub under 3.0 port is disconnected and reconnected every several minutes repeatedly. ENOHARDWARE Does your laptop have Intel chipset? regards, -- t-hash Thanks, Nick thanks, -- t-hash
Re: nick-nhusb merge coming soon
On 04/13/16 21:22, Takahiro Hayashi wrote: Hi, xhci(4) is still imcomplete and experimental. It needs more work. I summarise known problems: + KASSERT(sc->sc_command_addr == 0) in xhci_do_command() may fail. + My ASM1042 card does not work at all. No interrupts. It works on FreeBSD and OpenBSD. http://nxr.netbsd.org/xref/src-freebsd/sys/dev/usb/controller/xhci.c#1226 Is that relevant here? + Implementation of upm_abort is imcomplete. I'll try and look into this soon. + Link Power management is not implemented. + Isochronous transfer is not implemented. + Stream protocol is not supported. Takers? :) + Address of root hub is 0 (but it works anyway). I'll also try and look into this + On the xhci of Intel PCH: + The address assigned to device increases when reattaching device. + HS hub in 3.0 hub under 3.0 port is disconnected and reconnected every several minutes repeatedly. ENOHARDWARE regards, -- t-hash Thanks, Nick
Re: nick-nhusb merge coming soon
On 2016/04/13 16:56, Nick Hudson wrote: On 04/13/16 08:15, Paul Goyette wrote: On Wed, 13 Apr 2016, Nick Hudson wrote: Hi, I think the first phase of nick-nhusb is in a state ready to be merged. I'd like to merge it in the next few days, but in the meantime I've put some kernels for testing here: http://www.netbsd.org/~skrll/nick-nhusb Please test and report success or failure. I can provide kernels to other platforms on request. Kewl! Does this include xhci support for USB3 (ie, removal of the "experimental" tag)? There is some support for USB3 which has come with the patches from Takahiro HAYASHI. xhci(4) still needs quite a bit of love to be fully ready. xhci(4) is still imcomplete and experimental. It needs more work. I summarise known problems: + KASSERT(sc->sc_command_addr == 0) in xhci_do_command() may fail. + My ASM1042 card does not work at all. No interrupts. It works on FreeBSD and OpenBSD. + Implementation of upm_abort is imcomplete. + Link Power management is not implemented. + Isochronous transfer is not implemented. + Stream protocol is not supported. + Address of root hub is 0 (but it works anyway). + On the xhci of Intel PCH: + The address assigned to device increases when reattaching device. + HS hub in 3.0 hub under 3.0 port is disconnected and reconnected every several minutes repeatedly. regards, -- t-hash
Re: nick-nhusb merge coming soon
On Wed, Apr 13, 2016 at 11:58:16AM +0100, Dave Tyson wrote: > > Both cameras worked fine under nick-usb, but they also worked fine under > current 7.99.27 (GENERIC.201604110150Z) from a couple of days ago :-) so > something must have changed in current since PR 48308 was filed as I couldn't > reproduce it now. > > I could trigger a panic if I unplugged a camera while mplayer was running: > Gambling on the fix to PR/50467.
Re: nick-nhusb merge coming soon
On 04/13/16 11:58, Dave Tyson wrote: On Wednesday 13 Apr 2016 07:59:20 Nick Hudson wrote: Hi, I think the first phase of nick-nhusb is in a state ready to be merged. I'd like to merge it in the next few days, but in the meantime I've put some kernels for testing here: http://www.netbsd.org/~skrll/nick-nhusb Please test and report success or failure. I can provide kernels to other platforms on request. Thanks, Nick Hi Nick, I've done some testing with a couple of USB video cameras on amd64. I wanted to see if PR 48308 could be closed. The code is restructure to specifically avoid the type of problem described in PR/48308 and I intend to close it once I've merged. [snip] Both cameras worked fine under nick-usb, but they also worked fine under current 7.99.27 (GENERIC.201604110150Z) from a couple of days ago :-) so something must have changed in current since PR 48308 was filed as I couldn't reproduce it now. The problem still exists in HEAD, but is hard to trigger. I could trigger a panic if I unplugged a camera while mplayer was running: video0: detached uvideo0: detached uvideo0: at uhub4 port 6 (addr 2) disconnected audio1: detached uaudio0: detached uaudio0: at uhub4 port 6 (addr 2) disconnected usb_disconnect_port: no device panic: kernel diagnostic assertion "uvm_page_locked_p(pg)" failed: file "/wrk/nhusb/src/sys/arch/x86/x86/pmap.c", line 3315 cpu1: Begin traceback... vpanic() at netbsd:vpanic+0x13c valid_user_selector() at netbsd:valid_user_selector pmap_remove_pte() at netbsd:pmap_remove_pte+0x311 pmap_remove() at netbsd:pmap_remove+0x1ff uvm_unmap_remove() at netbsd:uvm_unmap_remove+0x210 sys_munmap() at netbsd:sys_munmap+0x8a syscall() at netbsd:syscall+0xbe --- syscall (number 73) --- 7f7feb10d80a: cpu1: End traceback... I guess a panic in this situation is not unexpected. I have the core dump if you want it. sure, I'll take a look. I'll try and get around to testing USB scanners and printers in a few days. Great. Thanks. Cheers, Dave Nick
Re: nick-nhusb merge coming soon
On Wednesday 13 Apr 2016 07:59:20 Nick Hudson wrote: > Hi, > > I think the first phase of nick-nhusb is in a state ready to be > merged. I'd like to merge it in the next few days, but in the meantime > I've put some kernels for testing here: > > http://www.netbsd.org/~skrll/nick-nhusb > > > Please test and report success or failure. > > I can provide kernels to other platforms on request. > > Thanks, > Nick Hi Nick, I've done some testing with a couple of USB video cameras on amd64. I wanted to see if PR 48308 could be closed. extract from dmesg: uvideo0 at uhub4 port 5 configuration 1 interface 0: vendor 04f2 USB2.0 2MP UVC Camera, rev 2.00/1.00, addr 2 video0 at uvideo0: vendor 04f2 USB2.0 2MP UVC Camera, rev 2.00/1.00, addr 2 uaudio0 at uhub4 port 5 configuration 1 interface 2 uaudio0: vendor 04f2 USB2.0 2MP UVC Camera, rev 2.00/1.00, addr 2 uaudio0: audio rev 1.00 audio1 at uaudio0: full duplex, playback, capture, independent uhidev0 at uhub1 port 2 configuration 1 interface 0 uhidev0: Logitech USB Receiver, rev 2.00/30.00, addr 2, iclass 3/1 ums0 at uhidev0: 16 buttons, W and Z dirs wsmouse0 at ums0 mux 0 uhidev1 at uhub1 port 2 configuration 1 interface 1 uhidev1: Logitech USB Receiver, rev 2.00/30.00, addr 2, iclass 3/0 uhidev1: 17 report ids uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0 uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0 uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0 uvideo1 at uhub4 port 6 configuration 1 interface 0: Generic USB2.0 PC CAMERA, rev 2.00/1.00, addr 3 video1 at uvideo1: Generic USB2.0 PC CAMERA, rev 2.00/1.00, addr 3 ehci0: handing over full speed device on port 7 to uhci3 Both cameras worked fine under nick-usb, but they also worked fine under current 7.99.27 (GENERIC.201604110150Z) from a couple of days ago :-) so something must have changed in current since PR 48308 was filed as I couldn't reproduce it now. I could trigger a panic if I unplugged a camera while mplayer was running: video0: detached uvideo0: detached uvideo0: at uhub4 port 6 (addr 2) disconnected audio1: detached uaudio0: detached uaudio0: at uhub4 port 6 (addr 2) disconnected usb_disconnect_port: no device panic: kernel diagnostic assertion "uvm_page_locked_p(pg)" failed: file "/wrk/nhusb/src/sys/arch/x86/x86/pmap.c", line 3315 cpu1: Begin traceback... vpanic() at netbsd:vpanic+0x13c valid_user_selector() at netbsd:valid_user_selector pmap_remove_pte() at netbsd:pmap_remove_pte+0x311 pmap_remove() at netbsd:pmap_remove+0x1ff uvm_unmap_remove() at netbsd:uvm_unmap_remove+0x210 sys_munmap() at netbsd:sys_munmap+0x8a syscall() at netbsd:syscall+0xbe --- syscall (number 73) --- 7f7feb10d80a: cpu1: End traceback... I guess a panic in this situation is not unexpected. I have the core dump if you want it. I'll try and get around to testing USB scanners and printers in a few days. Cheers, Dave -- = Phone: 07805784357 Open Source O/S: www.netbsd.org Caving: http://www.wirralcavinggroup.org.uk =
Re: nick-nhusb merge coming soon
On 04/13/16 08:15, Paul Goyette wrote: On Wed, 13 Apr 2016, Nick Hudson wrote: Hi, I think the first phase of nick-nhusb is in a state ready to be merged. I'd like to merge it in the next few days, but in the meantime I've put some kernels for testing here: http://www.netbsd.org/~skrll/nick-nhusb Please test and report success or failure. I can provide kernels to other platforms on request. Kewl! Does this include xhci support for USB3 (ie, removal of the "experimental" tag)? There is some support for USB3 which has come with the patches from Takahiro HAYASHI. xhci(4) still needs quite a bit of love to be fully ready. Thanks for all the hard work on this - it appears to have been a rather herculean effort... :) :) Nick
Re: nick-nhusb merge coming soon
On Wed, Apr 13, 2016 at 07:59:20AM +0100, Nick Hudson wrote: > Hi, > > I think the first phase of nick-nhusb is in a state ready to be > merged. I'd like to merge it in the next few days, but in the meantime > I've put some kernels for testing here: > > http://www.netbsd.org/~skrll/nick-nhusb > > > Please test and report success or failure. > > I can provide kernels to other platforms on request. > > Thanks, > Nick :D Fixes kern/50586 Thank you!
Re: nick-nhusb merge coming soon
On Wed, 13 Apr 2016, Nick Hudson wrote: Hi, I think the first phase of nick-nhusb is in a state ready to be merged. I'd like to merge it in the next few days, but in the meantime I've put some kernels for testing here: http://www.netbsd.org/~skrll/nick-nhusb Please test and report success or failure. I can provide kernels to other platforms on request. Kewl! Does this include xhci support for USB3 (ie, removal of the "experimental" tag)? Thanks for all the hard work on this - it appears to have been a rather herculean effort... :) +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | +--+--++
nick-nhusb merge coming soon
Hi, I think the first phase of nick-nhusb is in a state ready to be merged. I'd like to merge it in the next few days, but in the meantime I've put some kernels for testing here: http://www.netbsd.org/~skrll/nick-nhusb Please test and report success or failure. I can provide kernels to other platforms on request. Thanks, Nick