History log of /openbsd-src/sys/dev/usb/usb_mem.c (Results 1 – 25 of 36)
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@


# 81508fe3 23-May-2024 jsg <jsg@openbsd.org>

remove unneeded includes; ok mpi@


# 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 ...


# 7d03a16b 05-Dec-2018 gerhard <gerhard@openbsd.org>

usb_block_allocmem() won't sleep.

ok mpi@


# 3f45959c 18-Nov-2018 mpi <mpi@openbsd.org>

Use "%s", __func__ in DPRINTF() to reduce grep noise.


# 6eab4333 07-Mar-2018 jmatthew <jmatthew@openbsd.org>

Replace non-functioning checks for use of the usb memory block allocator in
interrupt context with assertwaitok(), which does work.

ok dlg@


# 234dfda1 08-Apr-2017 deraadt <deraadt@openbsd.org>

A pile of sizes to free(9). In test for a few days in snapshots.
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.


# 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 ...


# 12ce7bf0 31-Oct-2014 mpi <mpi@openbsd.org>

Even in interrupt context curproc is not NULL.

ok miod@


# df2ac69f 12-Jul-2014 tedu <tedu@openbsd.org>

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.


# 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 ...


# b047b92c 28-Mar-2013 tedu <tedu@openbsd.org>

proc.h is way too much header for usb to handle.


# d9c3e9c1 05-Apr-2011 jasper <jasper@openbsd.org>

- use nitems() no binary change on amd64

"reads OK" claudio@


# 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 ...


# f537c582 15-Jun-2007 deraadt <deraadt@openbsd.org>

more (*&@#$ timeout.h fallout


# 78315254 05-Jun-2007 mbalmer <mbalmer@openbsd.org>

Remove the "Static" declaration of many functions. It was defined to be empty
and it was not consistently used. It was confusing as it suggested these
functions were static, which they were not.

d

Remove the "Static" declaration of many functions. It was defined to be empty
and it was not consistently used. It was confusing as it suggested these
functions were static, which they were not.

discussed with dlg and jsg, ok jsg.

show more ...


# 000788eb 04-Jun-2007 mbalmer <mbalmer@openbsd.org>

Last part of FreeBSD/NetBSD sepcific code removal.

ok jsg@


# 695146ce 21-May-2007 jsg <jsg@openbsd.org>

Remove logprintf macro


# fcfe4ff8 08-Jul-2004 deraadt <deraadt@openbsd.org>

put "do { } while (0)" wrappers on all the debug maroc functions


# fa9cf2ff 06-Aug-2003 millert <millert@openbsd.org>

Fix a memleak on error in usb_block_allocmem(); Patrick Latifi
deraadt@ OK


# 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


# e8320ea1 05-May-2002 nate <nate@openbsd.org>

Use correct $NetBSD$


12