Go to file
riastradh 87858756ca Factor out HCI-independent xfer completion logic.
New API for HCI drivers to synchronize hardware completion
interrupts, synchronous aborts, and asynchronous timeouts:

- When submitting an xfer to hardware, call
  usbd_xfer_schedule_timeout(xfer).

- On HCI completion interrupt for xfer completion:

	if (!usbd_xfer_trycomplete(xfer))
		return;		/* timed out or aborted, ignore it */

- In upm_abort methods, call usbd_xfer_abort(xfer).

For HCI drivers that use this API (not needed in drivers that don't,
or for xfers like root intr xfers that don't use it):

- New ubm_abortx method serves role of former *hci_abort_xfer, but
  without any logic for wrangling timeouts/callouts/tasks -- caller
  in usbd_xfer_abort has already handled them.

- New ubm_dying method, returns true if the device is in the process
  of detaching, used by the timeout logic.

Converted and tested:
- ehci
- ohci

Converted and compile-tested:
- ahci (XXX did this ever work?)
- dwc2
- motg (XXX missing usbd_xfer_schedule_timeout in motg_*_start?)
- uhci
- xhci

Not changed:

- slhci (sys/dev/ic/sl811hs.c) -- doesn't use a separate per-xfer
  callout for timeouts (XXX but maybe should?)

- ugenhc (sys/rump/dev/lib/libugenhc/ugenhc.c) -- doesn't manage its
  own transfer timeouts

- vhci -- times transfers out only on detach; could be adapted easily
  if we wanted to use the xfer->ux_callout
2020-02-12 16:01:00 +00:00
bin Avoid a core dump if a child process that is not one of our 2020-02-07 02:06:12 +00:00
common Some boot blocks too big now, only compare in big chunks if !_STANDALONE. 2020-01-29 09:18:26 +00:00
compat 1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and 2019-10-24 18:46:20 +00:00
crypto regen 2020-01-23 17:37:03 +00:00
dist/pf
distrib PR misc/46937: add modules package, from Lloyd Parkes. 2020-02-11 11:36:52 +00:00
doc Retire azalia(4). 2020-02-09 16:06:17 +00:00
etc Install LLVM sanitizers to /usr/lib/clang/9.0.0 2020-02-07 18:48:58 +00:00
external Switch from db_write_bytes to using direct-mapping. 2020-02-12 06:05:31 +00:00
extsrc
games games/hack: Suppress -Werror=stringop-truncation error. 2020-02-08 00:59:55 +00:00
include move P_tmpdir from "/var/tmp/" to "/tmp/". 2019-12-13 20:25:16 +00:00
lib Change types of DUP2ALIAS and DUP2FDMASK bit masks to unsigned 2020-02-10 23:21:42 +00:00
libexec Specify NOLIBCSANITIZER for the ELF loader 2020-02-09 09:11:59 +00:00
regress Redo previous differently. 2019-11-23 20:37:49 +00:00
rescue 1. Remove all the special handling of variables (-d -p -P -s -S) that 2019-12-29 18:26:16 +00:00
sbin Fix a thinko 2020-02-12 09:43:19 +00:00
share Add description on hw.alps.touchpad_movement_threshold 2020-02-10 16:13:48 +00:00
sys Factor out HCI-independent xfer completion logic. 2020-02-12 16:01:00 +00:00
tests Add sentinel to the testtable[] array. 2020-02-12 07:02:21 +00:00
tools don't try to include the library if we are building it. 2020-01-17 16:50:51 +00:00
usr.bin use asprintf(). 2020-02-10 04:54:01 +00:00
usr.sbin Finish conversion to generic partitioning backend 2020-02-10 16:08:58 +00:00
build.sh
BUILDING
Makefile
Makefile.inc
README.md Use first-level heading for "NetBSD" title in README.md 2020-01-10 12:33:28 +00:00
UPDATING catch-up with more ports switched to gcc-8 2019-11-18 15:42:26 +00:00

NetBSD

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Building

You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:

./build.sh -U -u -j4 -m amd64 -O ~/obj release

Additional build information available in the BUILDING file.

Binaries

Testing

On a running NetBSD system:

cd /usr/tests; atf-run | atf-report

Troubleshooting

Latest sources

To fetch the main CVS repository:

cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src

To work in the Git mirror, which is updated every few hours from CVS:

git clone https://github.com/NetBSD/src.git