History log of /openbsd-src/sys/dev/usb/usb_mem.h (Results 1 – 18 of 18)
Revision Date Author Comments
# 98dddc57 08-Oct-2024 kettenis <kettenis@openbsd.org>

Relax DMA restrictions on ehci(4) and xhci(4) controllers that can do
64-bit DMA.

ok mpi@, mlarkin@


# c28d999f 21-Mar-2020 patrick <patrick@openbsd.org>

Instead of passing the flags as part of a struct that's supposed to be
filled by the callee, change the usb_allocmem() API to take another
argument for the flags.

ok mpi@


# 59570397 19-Mar-2020 patrick <patrick@openbsd.org>

Switch USB to use non-coherent buffers for data transfers. Since
the import in '99 all buffers allocated using usb_allocmem() have
been mapped COHERENT. On some ARM SoCs, where the USB controller
i

Switch USB to use non-coherent buffers for data transfers. Since
the import in '99 all buffers allocated using usb_allocmem() have
been mapped COHERENT. On some ARM SoCs, where the USB controller
is not coherent with the caches, this means the buffers were mapped
uncached. This drastically reduces the performance, especially on
reads.

We already added cache syncs before and after USB transfers, but so
far those have essentially been no-ops. Since other drivers make
use of the same allocation code, and those haven't been proven to
have correct syncs, we can't just remove the COHERENT flag.

This splits the allocation into coherent and non-coherent blocks.
All drivers who call usb_allocmem() themselves now pass a flag to
show they require coherent blocks. Onced verified that they also
work fine without coherent, or once they have been refactored, we
can remove this again.

On a ure(4) connected to an i.MX8MQ, the receive performance is
10x as fast as before. The Raspberry Pi's ethernet receive speed
doubled.

Debugged using dt(4)
Original diff from Marius Strobl
Feedback from kettenis@
Tested on an i.MX8MQ (arm64) by patrick@
Tested on a Raspberry Pi (arm64) by tobhe@
Tested on an ERL (octeon) by Janne Johansson
ok mpi@ gerhard@ tobhe@

show more ...


# 60f47cb3 30-Nov-2016 mpi <mpi@openbsd.org>

Do not overlay DMA fragment decriptors with free list handling.

This "cleverness" increase the risk of races due to caching and/or
prefetching between the HC and DMA engine. Many of the bug reports

Do not overlay DMA fragment decriptors with free list handling.

This "cleverness" increase the risk of races due to caching and/or
prefetching between the HC and DMA engine. Many of the bug reports
on bugs@ involving memory corruptions in usb_allocmem() should be
easier to diagnose when not avoided with this change.

From Marius Strobl, ok kettenis@

show more ...


# ab0b1be7 15-Apr-2013 mglocker <mglocker@openbsd.org>

Get rid of various 'typedef struct' definitions and use plain structure
definitions instead. We don't change usb.h for now to stay compatible
with userland.

Tested by mpi@ on macppc and myself on i

Get rid of various 'typedef struct' definitions and use plain structure
definitions instead. We don't change usb.h for now to stay compatible
with userland.

Tested by mpi@ on macppc and myself on i386.

ok mpi@

show more ...


# fdb60670 29-Sep-2010 kettenis <kettenis@openbsd.org>

Add DMA sync operations. Fixes problems on macppc with gcc4 because
apparently it reorders stores in a bad way. Mostly from NetBSD.

earlier diff tested by landry@ (who noticed the problems on macp

Add DMA sync operations. Fixes problems on macppc with gcc4 because
apparently it reorders stores in a bad way. Mostly from NetBSD.

earlier diff tested by landry@ (who noticed the problems on macppc)
ok deraadt@

show more ...


# d874cce4 26-Jun-2008 ray <ray@openbsd.org>

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code t

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@

show more ...


# b8e2b5f9 10-Jun-2005 martin <martin@openbsd.org>

remove unused code and un-ifdef

ok dlg@


# 72a11251 08-Jul-2003 nate <nate@openbsd.org>

Sync USB code with NetBSD.
This includes numerous fixes and paves the way for usb 2.0 support.


# b9553664 25-Jul-2002 nate <nate@openbsd.org>

get rid of trailing whitespace


# 591e0ca7 08-Nov-2000 aaron <aaron@openbsd.org>

Sync with NetBSD. Too many changes to mention. For now I have skipped
umass.c and ukbd.c as the diffs are a bit hairier.


# 82426cf3 04-Jul-2000 fgsch <fgsch@openbsd.org>

sync with NetBSD... well almost. someone w/ the hw should check umass.


# 5deafb75 28-Mar-2000 aaron <aaron@openbsd.org>

Much cleaner sync with NetBSD. Some #if defined() magic has been sent in the
form of a diff to augustss@netbsd.org so that future syncs will be very easy.
This commit also adds support for ADMtek AN9

Much cleaner sync with NetBSD. Some #if defined() magic has been sent in the
form of a diff to augustss@netbsd.org so that future syncs will be very easy.
This commit also adds support for ADMtek AN986 "Pegasus" based USB Ethernet,
CATC USB-EL1210A based USB Ethernet, and USB Printers (all untested).

show more ...


# eff3e1aa 26-Mar-2000 aaron <aaron@openbsd.org>

Sync with NetBSD.


# 12b76cf5 07-Nov-1999 fgsch <fgsch@openbsd.org>

sync with NetBSD.


# ce4d7038 27-Sep-1999 fgsch <fgsch@openbsd.org>

Sync with NetBSD.


# f8958cb1 27-Aug-1999 fgsch <fgsch@openbsd.org>

Sync with NetBSD;
Make sure not to call tsleep() from suspend/resume routine.
Move more of the transfer completion processing to HC independent code.
Fix some problems with transfer abort & timeout.

Sync with NetBSD;
Make sure not to call tsleep() from suspend/resume routine.
Move more of the transfer completion processing to HC independent code.
Fix some problems with transfer abort & timeout.
Merge the soft_{td,qh} with the real {td,qh}. This saves time and space.

show more ...


# 12fe8f0e 13-Aug-1999 fgsch <fgsch@openbsd.org>

From NetBSD; USB support.