Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/dev/usb Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/2bdb96569a67
branches:  netbsd-7
changeset: 454442:2bdb96569a67
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Sep 17 18:04:15 2019 +0000

description:
Pull up following revision(s) (requested by mrg in ticket #1707):

        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

diffstat:

 sys/dev/usb/xhci.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (62 lines):

diff -r f123b02af37c -r 2bdb96569a67 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Fri Sep 06 13:50:56 2019 +0000
+++ b/sys/dev/usb/xhci.c        Tue Sep 17 18:04:15 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.23.2.8 2018/08/25 14:57:35 martin Exp $     */
+/*     $NetBSD: xhci.c,v 1.23.2.9 2019/09/17 18:04:15 martin Exp $     */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.23.2.8 2018/08/25 14:57:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.23.2.9 2019/09/17 18:04:15 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -753,6 +753,8 @@
 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);
@@ -776,6 +778,7 @@
        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;
@@ -3792,7 +3795,7 @@
                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) |
@@ -3919,7 +3922,7 @@
         */
        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) |
@@ -4026,7 +4029,7 @@
        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) |



Home | Main Index | Thread Index | Old Index