Module Name: src Committed By: martin Date: Tue Sep 17 18:53:52 UTC 2019
Modified Files: src/sys/dev/usb [netbsd-8]: xhci.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1377): sys/dev/usb/xhci.c: revision 1.113 sys/dev/usb/xhci.c: revision 1.109 match xhci version 3.10. allows properly finding all the USB busses on new ryzen 3 based systems. unfortunately, the USB busses are still non-functional. - fix ryzen usb issue: we set TD size to '1', where has xhci spec 4.11.2.4 says final TRB for a TD should have this set to '0'. since we currently only generate sinel TRB TDs, set this to 0. XXX: pullup-all from sc.dying To generate a diff of this commit: cvs rdiff -u -r1.72.2.10 -r1.72.2.11 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.72.2.10 src/sys/dev/usb/xhci.c:1.72.2.11 --- src/sys/dev/usb/xhci.c:1.72.2.10 Fri Jan 4 14:55:40 2019 +++ src/sys/dev/usb/xhci.c Tue Sep 17 18:53:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.72.2.10 2019/01/04 14:55:40 martin Exp $ */ +/* $NetBSD: xhci.c,v 1.72.2.11 2019/09/17 18:53:52 martin Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.10 2019/01/04 14:55:40 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.11 2019/09/17 18:53:52 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -755,6 +755,8 @@ hexdump(const char *msg, const void *bas static void xhci_id_protocols(struct xhci_softc *sc, bus_size_t ecp) { + XHCIHIST_FUNC(); XHCIHIST_CALLED(); + /* XXX Cache this lot */ const uint32_t w0 = xhci_read_4(sc, ecp); @@ -778,6 +780,7 @@ xhci_id_protocols(struct xhci_softc *sc, case 0x0200: case 0x0300: case 0x0301: + case 0x0310: aprint_debug_dev(sc->sc_dev, " %s ports %d - %d\n", major == 3 ? "ss" : "hs", cpo, cpo + cpc -1); break; @@ -3832,7 +3835,7 @@ xhci_device_ctrl_start(struct usbd_xfer parameter = DMAADDR(dma, 0); KASSERTMSG(len <= 0x10000, "len %d", len); status = XHCI_TRB_2_IRQ_SET(0) | - XHCI_TRB_2_TDSZ_SET(1) | + XHCI_TRB_2_TDSZ_SET(0) | XHCI_TRB_2_BYTES_SET(len); control = (isread ? XHCI_TRB_3_DIR_IN : 0) | XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE) | @@ -3963,7 +3966,7 @@ xhci_device_bulk_start(struct usbd_xfer */ KASSERTMSG(len <= 0x10000, "len %d", len); status = XHCI_TRB_2_IRQ_SET(0) | - XHCI_TRB_2_TDSZ_SET(1) | + XHCI_TRB_2_TDSZ_SET(0) | XHCI_TRB_2_BYTES_SET(len); control = XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL) | (usbd_xfer_isread(xfer) ? XHCI_TRB_3_ISP_BIT : 0) | @@ -4075,7 +4078,7 @@ xhci_device_intr_start(struct usbd_xfer parameter = DMAADDR(dma, 0); KASSERTMSG(len <= 0x10000, "len %d", len); status = XHCI_TRB_2_IRQ_SET(0) | - XHCI_TRB_2_TDSZ_SET(1) | + XHCI_TRB_2_TDSZ_SET(0) | XHCI_TRB_2_BYTES_SET(len); control = XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL) | (usbd_xfer_isread(xfer) ? XHCI_TRB_3_ISP_BIT : 0) |