More usb_syncmem tweaks. The main one is sync'ing the entire last TD
returned from ohci_reset_std_chain in control transfers.
This commit is contained in:
parent
7dd016e517
commit
1ca2f96664
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ohci.c,v 1.272 2017/01/31 07:34:02 skrll Exp $ */
|
||||
/* $NetBSD: ohci.c,v 1.273 2017/02/04 08:03:40 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.272 2017/01/31 07:34:02 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.273 2017/02/04 08:03:40 skrll Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_usb.h"
|
||||
|
@ -2760,9 +2760,7 @@ ohci_device_ctrl_start(struct usbd_xfer *xfer)
|
|||
end->td.td_nexttd = HTOO32(stat->physaddr);
|
||||
end->nexttd = stat;
|
||||
|
||||
usb_syncmem(&end->dma,
|
||||
end->offs + offsetof(ohci_td_t, td_nexttd),
|
||||
sizeof(end->td.td_nexttd),
|
||||
usb_syncmem(&end->dma, end->offs, sizeof(end->td),
|
||||
BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
|
||||
|
||||
usb_syncmem(&xfer->ux_dmabuf, 0, len,
|
||||
|
@ -3005,7 +3003,7 @@ ohci_device_bulk_start(struct usbd_xfer *xfer)
|
|||
tail->nexttd = NULL;
|
||||
tail->xfer = NULL;
|
||||
usb_syncmem(&tail->dma, tail->offs, sizeof(tail->td),
|
||||
BUS_DMASYNC_PREWRITE);
|
||||
BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
|
||||
xfer->ux_hcpriv = data;
|
||||
|
||||
DPRINTFN(8, "xfer %p data %p tail %p", xfer, ox->ox_stds[0], tail, 0);
|
||||
|
@ -3202,7 +3200,7 @@ ohci_device_intr_start(struct usbd_xfer *xfer)
|
|||
tail->nexttd = NULL;
|
||||
tail->xfer = NULL;
|
||||
usb_syncmem(&tail->dma, tail->offs, sizeof(tail->td),
|
||||
BUS_DMASYNC_PREWRITE);
|
||||
BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
|
||||
xfer->ux_hcpriv = data;
|
||||
|
||||
DPRINTFN(8, "data %p tail %p", ox->ox_stds[0], tail, 0, 0);
|
||||
|
@ -3536,6 +3534,7 @@ ohci_device_isoc_enter(struct usbd_xfer *xfer)
|
|||
ncur = 0;
|
||||
}
|
||||
sitd->itd.itd_offset[ncur] = HTOO16(OHCI_ITD_MK_OFFS(offs));
|
||||
/* XXX Sync */
|
||||
offs = noffs;
|
||||
}
|
||||
KASSERT(j <= ox->ox_nsitd);
|
||||
|
|
Loading…
Reference in New Issue