Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb ehci(4): fix PR kern/56574: uaudio at ehci (not ...



details:   https://anonhg.NetBSD.org/src/rev/cbccbdb57393
branches:  trunk
changeset: 1029181:cbccbdb57393
user:      nia <nia%NetBSD.org@localhost>
date:      Fri Dec 24 22:56:55 2021 +0000

description:
ehci(4): fix PR kern/56574: uaudio at ehci (not xhci) only outputs
rapid gunfire (patch from nick)

diffstat:

 sys/dev/usb/ehci.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 69f1c8a4100d -r cbccbdb57393 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Fri Dec 24 21:57:49 2021 +0000
+++ b/sys/dev/usb/ehci.c        Fri Dec 24 22:56:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.298 2021/12/23 11:03:48 skrll Exp $ */
+/*     $NetBSD: ehci.c,v 1.299 2021/12/24 22:56:55 nia Exp $ */
 
 /*
  * Copyright (c) 2004-2012,2016,2020 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.298 2021/12/23 11:03:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.299 2021/12/24 22:56:55 nia Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -4414,12 +4414,16 @@
                    EHCI_SITD_SET_LEN(xfer->ux_frlengths[i]));
 
                /* Set page0 index and offset - TP and T-offset are set below */
-               sitd->sitd.sitd_buffer[0] = htole32(DMAADDR(dma_buf, offs));
+               const bus_addr_t sba = DMAADDR(dma_buf, offs);
+               sitd->sitd.sitd_buffer[0] = htole32(BUS_ADDR_LO32(sba));
+               sitd->sitd.sitd_buffer_hi[0] = htole32(BUS_ADDR_HI32(sba));
 
                offs += xfer->ux_frlengths[i];
 
+               const bus_addr_t eba = DMAADDR(dma_buf, offs - 1);
                sitd->sitd.sitd_buffer[1] =
-                   htole32(EHCI_SITD_SET_BPTR(DMAADDR(dma_buf, offs - 1)));
+                   htole32(EHCI_SITD_SET_BPTR(BUS_ADDR_LO32(eba)));
+               sitd->sitd.sitd_buffer_hi[1] = htole32(BUS_ADDR_HI32(eba));
 
                u_int huba __diagused = dev->ud_myhsport->up_parent->ud_addr;
 



Home | Main Index | Thread Index | Old Index