The NetBSD Project

CVS log for src/sys/dev/usb/usbdivar.h

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / usb

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.138 / (download) - annotate - [select for diffs], Sun Feb 4 05:43:06 2024 UTC (7 weeks, 4 days ago) by mrg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.137: +2 -2 lines
Diff to previous 1.137 (colored) to selected 1.113.4.1 (colored)

update my email address.

Revision 1.137 / (download) - annotate - [select for diffs], Sun Mar 13 11:28:52 2022 UTC (2 years ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.136: +3 -1 lines
Diff to previous 1.136 (colored) to selected 1.113.4.1 (colored)

usb: Fix roothub ctrl xfer aborts.

No mechanism for actually aborting, but at least this now waits for
the xfer to have completed instead of blithely barging ahead whether
it's done or not.

Revision 1.136 / (download) - annotate - [select for diffs], Sun Mar 13 11:28:42 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.135: +3 -1 lines
Diff to previous 1.135 (colored) to selected 1.113.4.1 (colored)

usbdi(9): Assert no concurrent aborts on a single pipe.

It is a driver bug to try to abort a pipe at the same time in two
different threads.

HCI drivers may release the bus lock to sleep in upm_abort while
waiting for the hardware to acknowledge an abort, so it won't try to,
e.g., scribble over a DMA buffer in the xfer that we've recycled
after usbd_abort_pipe returns.

If this happens, a concurrent usbd_abort_pipe might try to apply
upm_abort to the same xfer, which HCI drivers are not prepared for
and may wreak havoc.

To avoid this, allow only one usbd_abort_pipe in flight at any given
time.

Revision 1.135 / (download) - annotate - [select for diffs], Wed Mar 9 22:17:41 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.134: +2 -2 lines
Diff to previous 1.134 (colored) to selected 1.113.4.1 (colored)

usb: Provisionally release bus lock around ubm_rhctrl.

This isn't quite correct, but it avoids a deadlock:

- *_roothub_ctrl holds bus lock, waits in usb_delay_ms for kpause
- softint waits for bus lock, holds up kpause wakeup

The deadlock is new since recent changes to hold the bus lock over
upm_start/upm_transfer.  Making this change regresses to other
problems:

- *_suspend/resume and *_roothub_ctrl often touch the same portsc
   registers

- roothub_ctrl_abort needs to wait for ubm_rhctrl to complete.

  When the bus lock was held across both, a noop served here, but we
  can't hold the bus lock across both, so that doesn't work.

However, these problems -- which we've had for a long time -- seem to
be less bad than the deadlock.  So let's avoid the deadlock for now
and then work out another way to serialize suspend/resume/rhctrl and
aborts.

Candidate fix for PR kern/56739.

Revision 1.134 / (download) - annotate - [select for diffs], Thu Mar 3 06:12:11 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.133: +4 -4 lines
Diff to previous 1.133 (colored) to selected 1.113.4.1 (colored)

usb: Hold pipe lock across upm_transfer and upm_start.

This simplifies the code and fixes races with abort.  Access to the
pipe's queue is now done exclusively while the pipe is locked.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Mar 3 06:09:20 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.132: +6 -3 lines
Diff to previous 1.132 (colored) to selected 1.113.4.1 (colored)

usb: Update tables of bus/pipe method locking rules.

No functional change.

Revision 1.132 / (download) - annotate - [select for diffs], Thu Mar 3 06:04:31 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.131: +1 -3 lines
Diff to previous 1.131 (colored) to selected 1.113.4.1 (colored)

usb: Factor usb_insert_transfer out of upm_transfer and make private.

Almost every upm_transfer function starts with:

	mutex_enter(&sc->sc_lock);
	err = usb_insert_transfer(xfer);
	mutex_exit(&sc->sc_lock);
	if (err)
		return err;

Some of them have debug messages sprinkled in here too, or assert
that err == USBD_NORMAL_COMPLETION (alternative is USBD_IN_PROGRESS,
only for pipes with up_running or up_serialise, presumably not
applicable for these types of pipes).  Some of them also assert
xfer->ux_status == USBD_NOT_STARTED, which is guaranteed on entry and
preserved by usb_insert_transer.

Exceptions:

- arch/mips/adm5120/dev/ahci.c ahci_device_isoc_transfer just returns
  USBD_NORMAL_COMPLETION, but I'm pretty sure this is and always has
  been broken anyway, so won't make anything worse (if anything, might
  make it better...)

- external/bsd/dwc2/dwc2.c dwc2_device_bulk_transfer and
  dwc2_device_isoc_transfer _also_ issue dwc2_device_start(xfer)
  under the lock.  This is probably a better way to do it, but let's
  do it uniformly across all HCIs at once.

- rump/dev/lib/libugenhc/ugenhc.c rumpusb_device_bulk_transfer
  sometimes returns USBD_IN_PROGRESS _without_ queueing the transfer,
  in the !rump_threads case.  Not really sure how this is supposed to
  work...  If it actually breaks anything, we can figure it out.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Feb 14 09:23:32 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.130: +6 -1 lines
Diff to previous 1.130 (colored) to selected 1.113.4.1 (colored)

usbdi(9): Add some missing header include guards.

Revision 1.130 / (download) - annotate - [select for diffs], Tue Sep 7 10:44:18 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.129: +4 -1 lines
Diff to previous 1.129 (colored) to selected 1.113.4.1 (colored)

usb(4): Fix xfer race between software abort and hardware completion.

This fixes a bug in the API contract of usbd_abort_pipe: with the
change, the caller is guaranteed the xfer completion callbacks have
returned; without the change, completion callbacks could still be
running on the queued xfers while the caller of usbd_abort_pipe
proceeds to concurrently issue usbd_destroy_xfer.

This also fixes the following problem for interrupt pipes, whose
xfers stay on the queue until the pipe is aborted:

Thread 1: Hardware completion interrupt calls usb_transfer_complete.
Thread 1: pipe->up_repeat is 1, so usb_transfer_complete keeps xfer
  queued.
Thread 2: Calls usbd_abort_pipe (e.g., in detach).
Thread 2: usbd_abort_pipe waits for bus lock.
Thread 1: usb_transfer_complete releases bus lock to invoke callback.
Thread 2: Sets pipe->up_repeat := 0 (too late for thread 1 to see).
Thread 1: usb_transfer_complete waits to reacquire bus lock before
  resetting xfer status to USBD_NOT_STARTED.
Thread 2: Repeatdly calls upm_abort on the same xfer, which does
  nothing because upm_abort just does usbd_abort_xfer which does
  nothing because the xfer status is (e.g.) USBD_IOERROR and not
  USBD_IN_PROGRESS.

Thread 2 is now spinning forever with the bus lock held (and possibly
the kernel lock) waiting for queue or xfer status to change, which
will never happen as long as it holds the bus lock.

The resolution is for thread 2 to notice that thread 1 is busy
invoking a callback, and to wait until thread 1 has finished invoking
the callback and updated the xfer status to reset it to
USBD_NOT_STARTED at which point thread 1 can make progress again.

XXX pullup-9

Revision 1.129 / (download) - annotate - [select for diffs], Mon Aug 2 12:56:24 2021 UTC (2 years, 7 months ago) by andvar
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-futex2-base, thorpej-futex2
Changes since 1.128: +2 -2 lines
Diff to previous 1.128 (colored) to selected 1.113.4.1 (colored)

fix various typos in comments and log messages.

Revision 1.124.6.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:31 2021 UTC (2 years, 9 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.124: +12 -4 lines
Diff to previous 1.124 (colored) next main 1.125 (colored) to selected 1.113.4.1 (colored)

Sync w/ HEAD.

Revision 1.128 / (download) - annotate - [select for diffs], Sun Jun 13 00:13:24 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.127: +7 -4 lines
Diff to previous 1.127 (colored) to selected 1.113.4.1 (colored)

usb(4): Tighten interface locking and pipe references.

- Just use a reference count, not a list of pipes.

- Take the reference in usbd_open_pipe*, before we even look up the
  endpoint by address; the endpoint is not stable until we hold the
  interface and prevent usbd_set_interface.

- Make opening pipes just fail if usbd_set_interface is in progress.
  => No need to block -- might block for a while, and this is
     essentially a driver error rather than a legitimate reason to
     block.
  => This should maybe be a kassert, but it's not clear that ugen(4)
     doesn't have a user-triggerable path to that kassert, so let's
     keep it as a graceful failure for now until someone can audit
     ugen(4) and make an informed decision.

- No need for a separate interface pipe lock; just use the bus lock.

This is a little bit longer than before, but makes the bracketed
nature of the references a little clearer and introduces more
kasserts to detect mistakes with internal API usage.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Jun 12 15:49:45 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.126: +1 -2 lines
Diff to previous 1.126 (colored) to selected 1.113.4.1 (colored)

usb(4): Nix unused struct usbd_interface::ui_priv.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Jun 12 14:43:27 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.125: +2 -1 lines
Diff to previous 1.125 (colored) to selected 1.113.4.1 (colored)

usb(4): Fix races between usbd_open_pipe* and usbd_set_interface.

Revision 1.125 / (download) - annotate - [select for diffs], Sat Jun 12 13:58:05 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.124: +6 -1 lines
Diff to previous 1.124 (colored) to selected 1.113.4.1 (colored)

usb(4): Fix racy endpoint reference counting.

Rules:

1. After usbd_setup_pipe*, must usbd_kill_pipe.
2. After usbd_open_pipe*, must usbd_close_pipe.

Still haven't merged the logic in usbd_kill_pipe and usbd_close_pipe,
but getting closer.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Jun 5 17:20:56 2020 UTC (3 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.123: +2 -1 lines
Diff to previous 1.123 (colored) to selected 1.113.4.1 (colored)

Register eight vHCI buses, and use separate KCOV mailboxes for them.

Revision 1.123 / (download) - annotate - [select for diffs], Fri May 15 12:34:52 2020 UTC (3 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.122: +9 -2 lines
Diff to previous 1.122 (colored) to selected 1.113.4.1 (colored)

Introduce KCOV remote support. This allows to collect KCOV coverage on
threads other than curlwp, which is useful when fuzzing components that
defer processing, such as the network stack (partially runs in softints)
and the USB stack (partially runs in uhub kthreads).

A subsystem that whishes to provide coverage for its threads creates a
"mailbox" via kcov_remote_register() and gives it a (subsystem, id)
identifier. There is one mailbox per "target lwp". The target lwp(s)
must then call kcov_remote_enter() and kcov_remote_leave() with the
identifier, to respectively enable and disable coverage within the
thread.

On the userland side, the fuzzer has access to the mailboxes on the
system with the KCOV_IOC_REMOTE_ATTACH and KCOV_IOC_REMOTE_DETACH ioctls.
When attached to a mailbox with a given identifier, the KCOV_IOC_ENABLE,
KCOV_IOC_DISABLE and mmap() operations will affect the mailbox.

As a demonstrator, the vHCI subsystem is changed to use KCOV mailboxes.
When the vHCI bus attaches it creates as many mailboxes as it has USB
ports, each mailbox being associated with a distinct port. Uhub is changed
to enable KCOV coverage in usbd_new_device(). With that in place, all of
the USB enumeration procedure can be traced with KCOV.

Revision 1.115.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:51 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.115.2.2: +1 -1 lines
Diff to previous 1.115.2.2 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored) to selected 1.113.4.1 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.115.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:14 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.115.2.1: +16 -3 lines
Diff to previous 1.115.2.1 (colored) to branchpoint 1.115 (colored) to selected 1.113.4.1 (colored)

Merge changes from current as of 20200406

Revision 1.118.4.1 / (download) - annotate - [select for diffs], Sun Mar 1 12:35:16 2020 UTC (4 years ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.118: +16 -1 lines
Diff to previous 1.118 (colored) next main 1.119 (colored) to selected 1.113.4.1 (colored)

Pull up following revision(s) (requested by riastradh in ticket #744):

	sys/dev/usb/uhci.c: revision 1.292
	sys/dev/usb/uhci.c: revision 1.293
	sys/dev/usb/usbdi.h: revision 1.99
	sys/dev/usb/motg.c: revision 1.26
	sys/dev/usb/motg.c: revision 1.27
	sys/dev/usb/motg.c: revision 1.28
	sys/dev/usb/motg.c: revision 1.29
	sys/external/bsd/dwc2/dwc2.c: revision 1.70
	sys/external/bsd/dwc2/dwc2.c: revision 1.71
	sys/dev/usb/usb.c: revision 1.181
	sys/arch/mips/adm5120/dev/ahci.c: revision 1.20
	sys/dev/usb/usb.c: revision 1.182
	sys/dev/usb/xhci.c: revision 1.116
	sys/dev/usb/xhci.c: revision 1.117
	sys/dev/usb/xhci.c: revision 1.118
	sys/dev/usb/uhci.c: revision 1.289
	sys/dev/usb/usbdivar.h: revision 1.121
	sys/dev/usb/usbdi.c: revision 1.190
	sys/dev/usb/usbdivar.h: revision 1.122
	sys/dev/usb/usbdi.c: revision 1.191
	sys/dev/usb/usbdi.c: revision 1.192
	sys/external/bsd/dwc2/dwc2var.h: revision 1.7
	sys/dev/usb/motg.c: revision 1.30
	sys/dev/usb/motg.c: revision 1.31
	sys/dev/usb/motg.c: revision 1.32
	sys/dev/usb/motg.c: revision 1.33
	sys/external/bsd/dwc2/dwc2.c: revision 1.67
	sys/external/bsd/dwc2/dwc2.c: revision 1.68
	sys/dev/usb/ehci.c: revision 1.270
	sys/external/bsd/dwc2/dwc2.c: revision 1.69
	sys/dev/usb/usbdi.h: revision 1.100
	sys/dev/usb/ehci.c: revision 1.271
	sys/arch/mips/adm5120/dev/ahci.c: revision 1.18
	sys/dev/usb/usbdi.h: revision 1.101
	sys/dev/usb/ehci.c: revision 1.272
	sys/dev/ic/sl811hs.c: revision 1.103
	sys/arch/mips/adm5120/dev/ahci.c: revision 1.19
	sys/dev/usb/ehci.c: revision 1.273
	sys/dev/usb/ohci.c: revision 1.293
	sys/dev/usb/uhci.c: revision 1.290
	sys/dev/usb/ohci.c: revision 1.294
	sys/dev/usb/uhci.c: revision 1.291
	sys/dev/usb/ohci.c: revision 1.295

Teach usb_rem_task to return whether removed from queue or not.

New function usb_task_pending for diagnostic assertions.
Usable only for negative diagnostic assertions:

        KASSERT(!usb_task_pending(dev, task))

If you can think of a better name for this than !usb_task_pending,
I'm all ears.

 -

Nothing guarantees xfer's timeout has completed.

Wait for it when we free the xfer.

 -


New xfer state variables ux_timeout_set and ux_timeout_reset.

These are needed because:
- The host controller interrupt cannot wait for the callout or task
  to finish running.
- Nothing in the USBD API as is waits for the callout or task to
  finish running.
- Callers expect to be able to resubmit USB xfers from xfer callbacks
  without waiting for anything to finish running.

The variable ux_timeout_set can be used by a host controller to
decide on submission whether to schedule the callout or to ask an
already-scheduled callout or already-queued task to reschedule the
callout, by setting the variable ux_timeout_reset to true.

When the callout or task runs and sees that ux_timeout_reset is true,
rather than queue the task or abort the xfer, it can instead just
schedule the callout anew.

 -

Fix steady state of timeouts in ehci.

This is complicated because:
1. There are three ways that an xfer can be completed:
   (a) hardware interrupt completes xfer
   (b) software decision aborts xfer with USBD_CANCELLED
   (c) timeout aborts xfer with USBD_TIMEOUT
2. The timeout abort can't be done in callout because ehci_sync_hc,
   called unconditionally by ehci_abort_xfer to wait until the device
   has finished using any references to the xfer, may sleep.  So we
   have to schedule a callout that, when run, will schedule a usb_task.
3. The hardware completion interrupt can't sleep waiting for a callout
   or task to finish -- can't use callout_halt or usb_rem_task_wait.
   So the callout and usb_task must be able to run _after_ the hardware
   completion interrupt, and recognize that they're late to the party.
   (Note, though, that usbd_free_xfer does wait for the callout and
   task to complete, so there's no danger they may use themselves after
   free.)
4. The xfer may resubmitted -- and the timeout may be rescheduled --
   immediately after the hardware completion interrupt, _while_ the
   callout and/or usb_task may still be scheduled.  Specifically, we
   may have the following sequence of events:
   (a) hardware completion interrupt
   (b) callout or usb_task fires
   (c) driver resubmits xfer
   (d) callout or usb_task acquires lock and looks around dazed and
       bewildered at the firehose of events like reading the news in 2019

The mechanism for sorting this out is that we have two bits of state:
- xfer->ux_timeout_set informs the driver, when submitting an xfer and
  setting up its timeout, whether either the callout or usb_task is
  already scheduled or not.
- xfer->ux_timeout_reset informs the callout or usb_task whether it
  should reschedule the callout, because the xfer got resubmitted, or
  not.

 -

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

 -

Fix steady state of root intr xfers.

Why?
- Avoid completing a root intr xfer multiple times in races.
- Avoid potential use-after-free in poll_hub callouts (uhci, ahci).

How?
- Use sc->sc_intr_xfer or equivalent to store only a pending xfer
  that has not yet completed -- whether successfully, by timeout, or
  by synchronous abort.  When any of those happens, set it to null
  under the lock, so the xfer is completed only once.
- For hci drivers that use a callout to poll the root hub (uhci, ahci):
  . Pass the softc pointer, not the xfer, to the callout, so the
    callout is not even tempted to use xfer after free -- if the
    callout fires, but the xfer is synchronously aborted before the
    callout can do anything, the xfer might be freed by the time the
    callout starts to examine it.
  . Teach the callout to do nothing if it is callout_pending after it
    has fired.  This way:
    1. completion or synchronous abort can just callout_stop
    2. start can just callout_schedule
    If the callout had already fired before (1), and doesn't acquire
    the bus lock until after (2), it may be tempted to abort the new
    root intr xfer just after submission, which would be wrong -- so
    instead we just have the callout do nothing if it notices it has
    been rescheduled, since it will fire again after the appropriate
    time has elapsed.

 -

Initialize xfer->ux_status in uhci_root_intr_start.

Otherwise, it will be USBD_NOT_STARTED, so usbd_ar_pipe will skip
calling upm_abort.
Candidate fix for PR kern/54963, same problem as reported at:
href="https://mail-index.NetBSD.org/current-users/2020/02/13/msg037740.html

 -

Set ux_isdone in uhci_poll_hub for DIAGNOSTIC.

 -

Fix mistakes in previous sloppy change with root intr xfers.
- Make sure ux_status is set to USBD_IN_PROGRESS when started.
  Otherwise, if it is still in flight when we abort the pipe,
  usbd_ar_pipe will skip calling upm_abort.
- Initialize ux_status under the lock; in principle a completion
  interrupt (or a delay) could race with the initialization.
- KASSERT that the xfer is in progress when we're about to complete
  it.

Candidate fix for PR kern/54963 for other HCI drivers than uhci.
ok nick
ok phone
(This is the change that nick evidently MEANT to ok when he ok'd the
previous one!)

 -

Fix build

 -

Fix non-DIAGNOSTIC builds.

 -

Fix wrong KASSERT in motg abort.
This has been wrong since last summer when we did the transition to
xfer->ux_status = USBD_CANCELLED earlier.
XXX pullup-9

 -

Fix mistakes in timeout/abort/completion changes in motg(4).
- Call usbd_xfer_schedule_timeout so we actually do time out.
- Don't call usbd_xfer_trycomplete until all the data have been
  transferred -- it commits to completion, not timeout.
- Use xfer->ux_status != USBD_IN_PROGRESS to test whether, after a
  partial write, an xfer has been interrupted or timed out and need
  not be continued.
- Remove wrong assertion.

 -

Fix mistake in use of usbd_xfer_schedule_timeout in motg.

This code path is used both for xfers that are new, and xfers that
are being done piece by piece and are partway done.  For the latter
case, skip usbd_xfer_schedule_timeout so we schedule it only once per
xfer.

 -

Simplify some branches and kassert some redundant assignments.

Revision 1.119.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:17 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.119: +16 -3 lines
Diff to previous 1.119 (colored) next main 1.120 (colored) to selected 1.113.4.1 (colored)

Sync with head.

Revision 1.122 / (download) - annotate - [select for diffs], Wed Feb 12 16:01:00 2020 UTC (4 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Changes since 1.121: +3 -1 lines
Diff to previous 1.121 (colored) to selected 1.113.4.1 (colored)

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

Revision 1.121 / (download) - annotate - [select for diffs], Wed Feb 12 16:00:17 2020 UTC (4 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.120: +14 -1 lines
Diff to previous 1.120 (colored) to selected 1.113.4.1 (colored)

New xfer state variables ux_timeout_set and ux_timeout_reset.

These are needed because:

- The host controller interrupt cannot wait for the callout or task
  to finish running.

- Nothing in the USBD API as is waits for the callout or task to
  finish running.

- Callers expect to be able to resubmit USB xfers from xfer callbacks
  without waiting for anything to finish running.

The variable ux_timeout_set can be used by a host controller to
decide on submission whether to schedule the callout or to ask an
already-scheduled callout or already-queued task to reschedule the
callout, by setting the variable ux_timeout_reset to true.

When the callout or task runs and sees that ux_timeout_reset is true,
rather than queue the task or abort the xfer, it can instead just
schedule the callout anew.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Feb 8 08:47:27 2020 UTC (4 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.119: +1 -3 lines
Diff to previous 1.119 (colored) to selected 1.113.4.1 (colored)

Move three functions into usbdi_util.c, where they belong. No functional
change.

Revision 1.114.6.2 / (download) - annotate - [select for diffs], Sat Nov 16 16:30:09 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.114.6.1: +3 -2 lines
Diff to previous 1.114.6.1 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored) to selected 1.113.4.1 (colored)

Pull up the following revisions, requested by msaitoh in ticket #1443:

	sys/arch/arm/nvidia/tegra_xusb.c	1.13-1.14 via patch
	sys/dev/pci/xhci_pci.c			1.13
	sys/dev/usb/usb.c			1.169
	sys/dev/usb/usbdivar.h			1.116
	sys/dev/usb/xhci.c			1.93, 1.95, 1.97
	sys/dev/usb/xhcireg.h			1.11-1.12

Detect USB 3.1

Revision 1.119 / (download) - annotate - [select for diffs], Thu Sep 26 01:35:08 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored) to selected 1.113.4.1 (colored)

subdevlen is an array length, make it unsigned

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:35 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.115: +4 -7 lines
Diff to previous 1.115 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD

Revision 1.118 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:42 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.117: +1 -2 lines
Diff to previous 1.117 (colored) to selected 1.113.4.1 (colored)

Merge the [pgoyette-compat] branch

Revision 1.114.12.5 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:06 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.114.12.4: +2 -5 lines
Diff to previous 1.114.12.4 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.107.4.3 / (download) - annotate - [select for diffs], Sat Aug 25 14:57:35 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.107.4.2: +2 -5 lines
Diff to previous 1.107.4.2 (colored) to branchpoint 1.107 (colored) next main 1.108 (colored) to selected 1.113.4.1 (colored)

Pull up following revision(s) (requested by mrg in ticket #1632):

	sys/dev/usb/usbdivar.h: revision 1.117
	sys/external/bsd/dwc2/dwc2.c: revision 1.52
	sys/dev/usb/xhcivar.h: revision 1.10
	sys/dev/usb/motg.c: revision 1.22
	sys/dev/usb/ehci.c: revision 1.260
	sys/dev/usb/ehci.c: revision 1.261
	sys/dev/usb/xhci.c: revision 1.96
	sys/dev/usb/ohci.c: revision 1.282
	sys/dev/usb/ohci.c: revision 1.283
	sys/dev/usb/ehcivar.h: revision 1.45
	sys/dev/usb/uhci.c: revision 1.281
	sys/dev/usb/uhci.c: revision 1.282
	sys/dev/usb/usbdi.c: revision 1.177
	sys/dev/usb/ohcivar.h: revision 1.60
	sys/dev/usb/uhcivar.h: revision 1.55
	(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.

among other problems, this assert should no longer trigger:

   panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
    and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
    either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
    timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
    if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
    trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused

Revision 1.114.6.1 / (download) - annotate - [select for diffs], Sat Aug 25 11:29:52 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.114: +2 -5 lines
Diff to previous 1.114 (colored) to selected 1.113.4.1 (colored)

Pull up following revision(s) (requested by mrg in ticket #980):

	sys/dev/usb/usbdivar.h: revision 1.117
	sys/external/bsd/dwc2/dwc2.c: revision 1.52
	sys/dev/usb/xhcivar.h: revision 1.10
	sys/dev/usb/motg.c: revision 1.22
	sys/dev/usb/ehci.c: revision 1.260
	sys/dev/usb/ehci.c: revision 1.261
	sys/dev/usb/xhci.c: revision 1.96
	sys/dev/usb/ohci.c: revision 1.282
	sys/dev/usb/ohci.c: revision 1.283
	sys/dev/usb/ehcivar.h: revision 1.45
	sys/dev/usb/uhci.c: revision 1.281
	sys/dev/usb/uhci.c: revision 1.282
	sys/dev/usb/usbdi.c: revision 1.177
	sys/dev/usb/ohcivar.h: revision 1.60
	sys/dev/usb/uhcivar.h: revision 1.55
	(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.
among other problems, this assert should no longer trigger:

   panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
    and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
    either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
    timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
    if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
    trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused

Revision 1.117 / (download) - annotate - [select for diffs], Thu Aug 9 06:26:47 2018 UTC (5 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Changes since 1.116: +2 -5 lines
Diff to previous 1.116 (colored) to selected 1.113.4.1 (colored)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.

among other problems, this assert should no longer trigger:

   panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.


changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
#ifdef DIAGNOSTIC -> KASSERT and add another KASSERT
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
    and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
    either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
    timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
    if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
    trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

Revision 1.114.12.4 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:59 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.114.12.3: +3 -2 lines
Diff to previous 1.114.12.3 (colored) to branchpoint 1.114 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD

Revision 1.116 / (download) - annotate - [select for diffs], Fri Jun 29 17:48:24 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0728
Changes since 1.115: +3 -2 lines
Diff to previous 1.115 (colored) to selected 1.113.4.1 (colored)

 Detect USB 3.1.

Revision 1.114.12.3 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:26 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.114.12.2: +3 -3 lines
Diff to previous 1.114.12.2 (colored) to branchpoint 1.114 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD

Revision 1.115 / (download) - annotate - [select for diffs], Thu Apr 19 21:50:09 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422
Branch point for: phil-wifi
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored) to selected 1.113.4.1 (colored)

s/static inline/static __inline/g for consistency.

Revision 1.114.12.2 / (download) - annotate - [select for diffs], Thu Mar 29 10:27:27 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.114.12.1: +1 -7 lines
Diff to previous 1.114.12.1 (colored) to branchpoint 1.114 (colored) to selected 1.113.4.1 (colored)

Revert previous.  Instead, we'll just move usbd_printBCD() to usbdi.h

Revision 1.114.12.1 / (download) - annotate - [select for diffs], Thu Mar 29 10:15:20 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.114: +6 -1 lines
Diff to previous 1.114 (colored) to selected 1.113.4.1 (colored)

Protect against multiple-inclusion

Revision 1.99.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:36 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.99.2.3: +216 -178 lines
Diff to previous 1.99.2.3 (colored) to branchpoint 1.99 (colored) next main 1.100 (colored) to selected 1.113.4.1 (colored)

update from HEAD

Revision 1.113.4.1 / (download) - annotate - [selected], Fri Apr 21 16:53:53 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.113: +12 -2 lines
Diff to previous 1.113 (colored) next main 1.114 (colored)

Sync with HEAD

Revision 1.107.4.2 / (download) - annotate - [select for diffs], Wed Apr 5 19:54:21 2017 UTC (6 years, 11 months ago) by snj
Branch: netbsd-7
Changes since 1.107.4.1: +212 -179 lines
Diff to previous 1.107.4.1 (colored) to branchpoint 1.107 (colored) to selected 1.113.4.1 (colored)

Pull up following revision(s) (requested by skrll in ticket #1395):
	share/man/man4/axe.4: netbsd-7-nhusb
	share/man/man4/axen.4: netbsd-7-nhusb
	share/man/man4/cdce.4: netbsd-7-nhusb
	share/man/man4/uaudio.4: netbsd-7-nhusb
	share/man/man4/ucom.4: netbsd-7-nhusb
	share/man/man4/uep.4: netbsd-7-nhusb
	share/man/man4/urtw.4: netbsd-7-nhusb
	share/man/man4/usb.4: netbsd-7-nhusb
	share/man/man4/uyap.4: netbsd-7-nhusb
	share/man/man4/xhci.4: netbsd-7-nhusb
	share/man/man9/usbdi.9: netbsd-7-nhusb
	sys/arch/amd64/conf/ALL: netbsd-7-nhusb
	sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
	sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
	sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
	sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
	sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
	sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
	sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
	sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
	sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
	sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
	sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
	sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
	sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
	sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
	sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
	sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
	sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
	sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
	sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
	sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
	sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
	sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
	sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
	sys/arch/i386/conf/ALL: netbsd-7-nhusb
	sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
	sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
	sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
	sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
	sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
	sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
	sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
	sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
	sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
	sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
	sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
	sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
	sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
	sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
	sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
	sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
	sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
	sys/conf/files: netbsd-7-nhusb
	sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
	sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
	sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
	sys/dev/ic/sl811hs.c: netbsd-7-nhusb
	sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
	sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
	sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
	sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
	sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
	sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
	sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
	sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
	sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
	sys/dev/usb/TODO: netbsd-7-nhusb
	sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
	sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
	sys/dev/usb/auvitek.c: netbsd-7-nhusb
	sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
	sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
	sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
	sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
	sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
	sys/dev/usb/ehci.c: netbsd-7-nhusb
	sys/dev/usb/ehcireg.h: netbsd-7-nhusb
	sys/dev/usb/ehcivar.h: netbsd-7-nhusb
	sys/dev/usb/emdtv.c: netbsd-7-nhusb
	sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
	sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
	sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
	sys/dev/usb/ezload.c: netbsd-7-nhusb
	sys/dev/usb/ezload.h: netbsd-7-nhusb
	sys/dev/usb/files.usb: netbsd-7-nhusb
	sys/dev/usb/hid.c: netbsd-7-nhusb
	sys/dev/usb/hid.h: netbsd-7-nhusb
	sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
	sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
	sys/dev/usb/if_atu.c: netbsd-7-nhusb
	sys/dev/usb/if_atureg.h: netbsd-7-nhusb
	sys/dev/usb/if_aue.c: netbsd-7-nhusb
	sys/dev/usb/if_auereg.h: netbsd-7-nhusb
	sys/dev/usb/if_axe.c: netbsd-7-nhusb
	sys/dev/usb/if_axen.c: netbsd-7-nhusb
	sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
	sys/dev/usb/if_axereg.h: netbsd-7-nhusb
	sys/dev/usb/if_cdce.c: netbsd-7-nhusb
	sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
	sys/dev/usb/if_cue.c: netbsd-7-nhusb
	sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
	sys/dev/usb/if_kue.c: netbsd-7-nhusb
	sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
	sys/dev/usb/if_otus.c: netbsd-7-nhusb
	sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
	sys/dev/usb/if_rum.c: netbsd-7-nhusb
	sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
	sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
	sys/dev/usb/if_run.c: netbsd-7-nhusb
	sys/dev/usb/if_runvar.h: netbsd-7-nhusb
	sys/dev/usb/if_smsc.c: netbsd-7-nhusb
	sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
	sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
	sys/dev/usb/if_udav.c: netbsd-7-nhusb
	sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
	sys/dev/usb/if_upgt.c: netbsd-7-nhusb
	sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
	sys/dev/usb/if_upl.c: netbsd-7-nhusb
	sys/dev/usb/if_ural.c: netbsd-7-nhusb
	sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
	sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
	sys/dev/usb/if_url.c: netbsd-7-nhusb
	sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
	sys/dev/usb/if_urndis.c: netbsd-7-nhusb
	sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
	sys/dev/usb/if_urtw.c: netbsd-7-nhusb
	sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
	sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
	sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
	sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
	sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
	sys/dev/usb/if_zyd.c: netbsd-7-nhusb
	sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
	sys/dev/usb/irmce.c: netbsd-7-nhusb
	sys/dev/usb/moscom.c: netbsd-7-nhusb
	sys/dev/usb/motg.c: netbsd-7-nhusb
	sys/dev/usb/motgvar.h: netbsd-7-nhusb
	sys/dev/usb/ohci.c: netbsd-7-nhusb
	sys/dev/usb/ohcireg.h: netbsd-7-nhusb
	sys/dev/usb/ohcivar.h: netbsd-7-nhusb
	sys/dev/usb/pseye.c: netbsd-7-nhusb
	sys/dev/usb/slurm.c: netbsd-7-nhusb
	sys/dev/usb/stuirda.c: netbsd-7-nhusb
	sys/dev/usb/u3g.c: netbsd-7-nhusb
	sys/dev/usb/uark.c: netbsd-7-nhusb
	sys/dev/usb/uatp.c: netbsd-7-nhusb
	sys/dev/usb/uaudio.c: netbsd-7-nhusb
	sys/dev/usb/uberry.c: netbsd-7-nhusb
	sys/dev/usb/ubsa.c: netbsd-7-nhusb
	sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
	sys/dev/usb/ubsavar.h: netbsd-7-nhusb
	sys/dev/usb/ubt.c: netbsd-7-nhusb
	sys/dev/usb/uchcom.c: netbsd-7-nhusb
	sys/dev/usb/ucom.c: netbsd-7-nhusb
	sys/dev/usb/ucomvar.h: netbsd-7-nhusb
	sys/dev/usb/ucycom.c: netbsd-7-nhusb
	sys/dev/usb/udl.c: netbsd-7-nhusb
	sys/dev/usb/udl.h: netbsd-7-nhusb
	sys/dev/usb/udsbr.c: netbsd-7-nhusb
	sys/dev/usb/udsir.c: netbsd-7-nhusb
	sys/dev/usb/uep.c: netbsd-7-nhusb
	sys/dev/usb/uftdi.c: netbsd-7-nhusb
	sys/dev/usb/uftdireg.h: netbsd-7-nhusb
	sys/dev/usb/ugen.c: netbsd-7-nhusb
	sys/dev/usb/ugensa.c: netbsd-7-nhusb
	sys/dev/usb/uhci.c: netbsd-7-nhusb
	sys/dev/usb/uhcireg.h: netbsd-7-nhusb
	sys/dev/usb/uhcivar.h: netbsd-7-nhusb
	sys/dev/usb/uhid.c: netbsd-7-nhusb
	sys/dev/usb/uhidev.c: netbsd-7-nhusb
	sys/dev/usb/uhidev.h: netbsd-7-nhusb
	sys/dev/usb/uhmodem.c: netbsd-7-nhusb
	sys/dev/usb/uhso.c: netbsd-7-nhusb
	sys/dev/usb/uhub.c: netbsd-7-nhusb
	sys/dev/usb/uipad.c: netbsd-7-nhusb
	sys/dev/usb/uipaq.c: netbsd-7-nhusb
	sys/dev/usb/uirda.c: netbsd-7-nhusb
	sys/dev/usb/uirdavar.h: netbsd-7-nhusb
	sys/dev/usb/ukbd.c: netbsd-7-nhusb
	sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
	sys/dev/usb/ukyopon.c: netbsd-7-nhusb
	sys/dev/usb/ukyopon.h: netbsd-7-nhusb
	sys/dev/usb/ulpt.c: netbsd-7-nhusb
	sys/dev/usb/umass.c: netbsd-7-nhusb
	sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
	sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
	sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
	sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
	sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
	sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
	sys/dev/usb/umassvar.h: netbsd-7-nhusb
	sys/dev/usb/umcs.c: netbsd-7-nhusb
	sys/dev/usb/umct.c: netbsd-7-nhusb
	sys/dev/usb/umidi.c: netbsd-7-nhusb
	sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
	sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
	sys/dev/usb/umodem.c: netbsd-7-nhusb
	sys/dev/usb/umodem_common.c: netbsd-7-nhusb
	sys/dev/usb/umodemvar.h: netbsd-7-nhusb
	sys/dev/usb/ums.c: netbsd-7-nhusb
	sys/dev/usb/uplcom.c: netbsd-7-nhusb
	sys/dev/usb/urio.c: netbsd-7-nhusb
	sys/dev/usb/urio.h: netbsd-7-nhusb
	sys/dev/usb/usb.c: netbsd-7-nhusb
	sys/dev/usb/usb.h: netbsd-7-nhusb
	sys/dev/usb/usb_mem.c: netbsd-7-nhusb
	sys/dev/usb/usb_mem.h: netbsd-7-nhusb
	sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
	sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
	sys/dev/usb/usb_subr.c: netbsd-7-nhusb
	sys/dev/usb/usbdevices.config: netbsd-7-nhusb
	sys/dev/usb/usbdevs: netbsd-7-nhusb
	sys/dev/usb/usbdevs.h: netbsd-7-nhusb
	sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
	sys/dev/usb/usbdi.c: netbsd-7-nhusb
	sys/dev/usb/usbdi.h: netbsd-7-nhusb
	sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
	sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
	sys/dev/usb/usbdivar.h: netbsd-7-nhusb
	sys/dev/usb/usbhid.h: netbsd-7-nhusb
	sys/dev/usb/usbhist.h: netbsd-7-nhusb
	sys/dev/usb/usbroothub.c: netbsd-7-nhusb
	sys/dev/usb/usbroothub.h: netbsd-7-nhusb
	sys/dev/usb/usbroothub_subr.c: delete
	sys/dev/usb/usbroothub_subr.h: delete
	sys/dev/usb/uscanner.c: netbsd-7-nhusb
	sys/dev/usb/uslsa.c: netbsd-7-nhusb
	sys/dev/usb/usscanner.c: netbsd-7-nhusb
	sys/dev/usb/ustir.c: netbsd-7-nhusb
	sys/dev/usb/uthum.c: netbsd-7-nhusb
	sys/dev/usb/utoppy.c: netbsd-7-nhusb
	sys/dev/usb/uts.c: netbsd-7-nhusb
	sys/dev/usb/uvideo.c: netbsd-7-nhusb
	sys/dev/usb/uvisor.c: netbsd-7-nhusb
	sys/dev/usb/uvscom.c: netbsd-7-nhusb
	sys/dev/usb/uyap.c: netbsd-7-nhusb
	sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
	sys/dev/usb/uyurex.c: netbsd-7-nhusb
	sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
	sys/dev/usb/xhci.c: netbsd-7-nhusb
	sys/dev/usb/xhcireg.h: netbsd-7-nhusb
	sys/dev/usb/xhcivar.h: netbsd-7-nhusb
	sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
	sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
	sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
	sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
	sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
	sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
	sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
	sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
	sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
	sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
	sys/external/bsd/drm2/include/linux/err.h: delete
	sys/external/bsd/drm2/include/linux/workqueue.h: delete
	sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
	sys/external/bsd/drm2/linux/linux_work.c: delete
	sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
	sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
	sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
	sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
	sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
	sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
	sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
	sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
	sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
	sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
	sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
	sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
	sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
	sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
	sys/sys/mbuf.h: netbsd-7-nhusb
	usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
	usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
     - kern/48308
     - uhub status notification improvements
     - umass(4) probe fix (applied to HEAD already)
     - ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
  This gives the callback a chance of running when another softint handler
  at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
  the network stack.
     - kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
       softnet_lock held across usb xfr
     - kern/50491 - unkillable wait in usbd_transfer while using usmsc0
       on raspberry pi 2
     - kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:39 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.113: +12 -2 lines
Diff to previous 1.113 (colored) next main 1.114 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD

Revision 1.107.4.1.2.2 / (download) - annotate - [select for diffs], Thu Jan 26 21:54:25 2017 UTC (7 years, 2 months ago) by skrll
Branch: netbsd-7-nhusb
Changes since 1.107.4.1.2.1: +12 -2 lines
Diff to previous 1.107.4.1.2.1 (colored) to branchpoint 1.107.4.1 (colored) next main 1.107.4.2 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD/nhusb

Revision 1.114 / (download) - annotate - [select for diffs], Thu Jan 19 16:05:00 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-base, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: pgoyette-compat, netbsd-8
Changes since 1.113: +12 -2 lines
Diff to previous 1.113 (colored) to selected 1.113.4.1 (colored)

Pull across xhci(4) improvemnts from nick-nhusb

Revision 1.109.2.28 / (download) - annotate - [select for diffs], Tue Jan 3 12:50:50 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.27: +12 -2 lines
Diff to previous 1.109.2.27 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored) to selected 1.113.4.1 (colored)

Improve handling of roothub device and free up a bus address for LS/FS/HS
controllers.

Revision 1.107.4.1.2.1 / (download) - annotate - [select for diffs], Tue Sep 6 20:33:09 2016 UTC (7 years, 6 months ago) by skrll
Branch: netbsd-7-nhusb
Changes since 1.107.4.1: +202 -179 lines
Diff to previous 1.107.4.1 (colored) to selected 1.113.4.1 (colored)

First pass at netbsd-7 updated with USB code from HEAD

Revision 1.109.2.27 / (download) - annotate - [select for diffs], Sat Apr 30 10:34:14 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.26: +2 -1 lines
Diff to previous 1.109.2.26 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Move the struct usb_task to struct usbd_xfer for everyone to use.

Revision 1.113 / (download) - annotate - [select for diffs], Sat Apr 23 10:15:32 2016 UTC (7 years, 11 months ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.112: +193 -177 lines
Diff to previous 1.112 (colored) to selected 1.113.4.1 (colored)

Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix

Revision 1.109.2.26 / (download) - annotate - [select for diffs], Tue Mar 29 08:42:41 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.25: +19 -12 lines
Diff to previous 1.109.2.25 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Whitespace

Revision 1.109.2.25 / (download) - annotate - [select for diffs], Thu Mar 17 09:04:53 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.24: +2 -1 lines
Diff to previous 1.109.2.24 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

All HCDs were fighting the seriaisation of transfers in usbdi.c for isoc
transfers.  Instead allow the HCDs to specify which pipes can handle
removing this serialisation and apply it appropriately.

dwctwo(4) can handle this for all transfer types, but only enable
bulk/isoc for now.

Revision 1.109.2.24 / (download) - annotate - [select for diffs], Sun Mar 6 10:25:31 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.23: +2 -2 lines
Diff to previous 1.109.2.23 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Whitespace

Revision 1.109.2.23 / (download) - annotate - [select for diffs], Tue Feb 16 08:02:49 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.22: +2 -6 lines
Diff to previous 1.109.2.22 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Re-enable the TT support that existed previously here as well

Revision 1.112 / (download) - annotate - [select for diffs], Tue Feb 16 07:51:13 2016 UTC (8 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.111: +2 -6 lines
Diff to previous 1.111 (colored) to selected 1.113.4.1 (colored)

Re-enable the TT support that existed previously.

Revision 1.107.4.1 / (download) - annotate - [select for diffs], Sat Feb 6 20:58:13 2016 UTC (8 years, 1 month ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Branch point for: netbsd-7-nhusb
Changes since 1.107: +6 -1 lines
Diff to previous 1.107 (colored) to selected 1.113.4.1 (colored)

Pull up following revision(s) (requested by skrll in ticket #1097):
	sys/dev/usb/usb.c: revision 1.161
	sys/dev/usb/usb_subr.c: revisions 1.207, 1.208
	sys/dev/usb/usbdivar.h: revision 1.111
	sys/dev/usb/xhci.c: revision 1.33
Get the iManufacturer, iProduct, and iSerialNumber strings before probing
for drivers and cache them for later use.  This reduces bus transactions
and fixes attachment for at least two of my umass(4)s.
--
Need sys/kmem.h

Revision 1.109.2.22 / (download) - annotate - [select for diffs], Sun Jan 10 10:33:43 2016 UTC (8 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.21: +6 -1 lines
Diff to previous 1.109.2.21 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Bring the following change from HEAD

Get the iManufacturer, iProduct, and iSerialNumber strings before probing
for drivers and cache them for later use.  This reduces bus transactions
and fixes attachment for at least two of my umass(4)s.

Revision 1.111 / (download) - annotate - [select for diffs], Wed Jan 6 22:12:49 2016 UTC (8 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.110: +6 -1 lines
Diff to previous 1.110 (colored) to selected 1.113.4.1 (colored)

Get the iManufacturer, iProduct, and iSerialNumber strings before probing
for drivers and cache them for later use.  This reduces bus transactions
and fixes attachment for at least two of my umass(4)s.

Revision 1.109.2.21 / (download) - annotate - [select for diffs], Mon Dec 28 09:26:33 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.20: +1 -2 lines
Diff to previous 1.109.2.20 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Strictly follow the sequence abort pipe, destroy xfers, and close pipe as
API now requires.  Plug some memory leaks in some drivers while doing
this.

Also, remove up_refcnt as it was broken and helped leak more memory.

Revision 1.109.2.20 / (download) - annotate - [select for diffs], Wed Oct 21 07:36:31 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.19: +5 -3 lines
Diff to previous 1.109.2.19 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Cache the usbd_bus pointer in the usbd_xfer struct for memory allocation
and softc access.  This removes a level of indirection for memory
allocation.

Also cache the xfer pipe methods for later (temporary?) use.

Revision 1.109.2.19 / (download) - annotate - [select for diffs], Mon Oct 12 10:18:54 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.18: +3 -1 lines
Diff to previous 1.109.2.18 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Provide init/fini methods for HCDs

Revision 1.109.2.18 / (download) - annotate - [select for diffs], Sun Oct 11 09:17:51 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.17: +2 -2 lines
Diff to previous 1.109.2.17 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Update ubm_allocx with the isoc frame count parameter and use it in
dwctwo(4)

Revision 1.110 / (download) - annotate - [select for diffs], Sun Aug 23 11:12:01 2015 UTC (8 years, 7 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.109: +11 -1 lines
Diff to previous 1.109 (colored) to selected 1.113.4.1 (colored)

Expose usbd_xfer_isread

Revision 1.109.2.17 / (download) - annotate - [select for diffs], Sat Jun 6 15:26:15 2015 UTC (8 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.16: +2 -1 lines
Diff to previous 1.109.2.16 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Read Binary Object Store descriptor and store to ud_bdesc.

From t-hash

Revision 1.109.2.16 / (download) - annotate - [select for diffs], Thu Mar 19 17:26:43 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.15: +40 -40 lines
Diff to previous 1.109.2.15 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Do the same as OpenBSD and get rid of the *_handle typedefs and use
plain structures insteads

Revision 1.109.2.15 / (download) - annotate - [select for diffs], Wed Mar 18 15:45:45 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.14: +11 -1 lines
Diff to previous 1.109.2.14 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Expose usbd_xfer_isread

Revision 1.109.2.14 / (download) - annotate - [select for diffs], Thu Mar 5 09:06:20 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.13: +0 -1 lines
Diff to previous 1.109.2.13 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

What was I thinking... usbd_free_xfer handles the buffer free.

Need more coffee

Revision 1.109.2.13 / (download) - annotate - [select for diffs], Thu Mar 5 08:48:07 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.12: +2 -1 lines
Diff to previous 1.109.2.12 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Don't leak memory in previous

Revision 1.109.2.12 / (download) - annotate - [select for diffs], Thu Mar 5 08:34:47 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.11: +1 -2 lines
Diff to previous 1.109.2.11 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Kill URQ_AUTO_BUFFER

Revision 1.109.2.11 / (download) - annotate - [select for diffs], Sun Feb 22 14:50:07 2015 UTC (9 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.10: +2 -2 lines
Diff to previous 1.109.2.10 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Simplify #ifdef.

USB_DEBUG is defined if either of EHCI_DEBUG or OHCI_DEBUG (or others)
are defined.

Revision 1.109.2.10 / (download) - annotate - [select for diffs], Fri Dec 19 09:52:35 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.9: +9 -9 lines
Diff to previous 1.109.2.9 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Update a comment

Revision 1.109.2.9 / (download) - annotate - [select for diffs], Sun Dec 14 11:16:29 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.8: +9 -8 lines
Diff to previous 1.109.2.8 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Match comment to code

Revision 1.109.2.8 / (download) - annotate - [select for diffs], Sat Dec 6 08:27:23 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.7: +14 -14 lines
Diff to previous 1.109.2.7 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

KNF. Remove argument name from function declarations.

No functional change.

Revision 1.109.2.7 / (download) - annotate - [select for diffs], Thu Dec 4 08:04:31 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.6: +6 -1 lines
Diff to previous 1.109.2.6 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Rework roothub control transfers so that much of the code is shared
across HCDs.

I have retained the vendor/product reporting for each HCD for now,
but it maybe get removed later.

ahci(4) now reports a language table and uses the usb_makestrdesc
function instead of rolling its own version.

Revision 1.109.2.6 / (download) - annotate - [select for diffs], Wed Dec 3 22:19:50 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.5: +14 -13 lines
Diff to previous 1.109.2.5 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Rearrange the usbd_bus struct member to match the comments about who
fills them.

Revision 1.109.2.5 / (download) - annotate - [select for diffs], Wed Dec 3 12:52:07 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.4: +107 -107 lines
Diff to previous 1.109.2.4 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

The grand renaming of structure members.

No functional change.

Revision 1.109.2.4 / (download) - annotate - [select for diffs], Tue Dec 2 09:00:34 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.3: +7 -8 lines
Diff to previous 1.109.2.3 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Step #1 of memory allocation re-organisation.

Centralised the buffer allocation routine which now supports DMA
and non-DMA capable host controllers.  Remove the
ubm_{alloc,free}m methods from usbd_bus_methods.

The buffer allocation is only allowed in thread context and,
therefore, negates the usefulness of the reserve dma code which
is removed in this change.

USBD_NO_COPY is also no longer required as usbd_transfer and
usbd_transfer_complete now track buffer usage and handle any
copying.

Revision 1.109.2.3 / (download) - annotate - [select for diffs], Mon Dec 1 12:38:39 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.2: +17 -17 lines
Diff to previous 1.109.2.2 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Add prefixes to method structures member names. No functional change.

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Mon Dec 1 08:12:09 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109.2.1: +1 -2 lines
Diff to previous 1.109.2.1 (colored) to branchpoint 1.109 (colored) to selected 1.113.4.1 (colored)

Remove usbd_bus no_intrs member it was (virtually) unused.

Revision 1.109.2.1 / (download) - annotate - [select for diffs], Sun Nov 30 12:18:58 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.109: +22 -22 lines
Diff to previous 1.109 (colored) to selected 1.113.4.1 (colored)

Use C99 types. u_int{8,16,32,64}_t to uint{8,16,32,64}_t.

No functional change.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Sep 6 10:54:04 2014 UTC (9 years, 6 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored) to selected 1.113.4.1 (colored)

Trailing whitespace.

Revision 1.99.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:51 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.99.2.2: +15 -19 lines
Diff to previous 1.99.2.2 (colored) to branchpoint 1.99 (colored) to selected 1.113.4.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.108 / (download) - annotate - [select for diffs], Tue Aug 12 13:36:40 2014 UTC (9 years, 7 months ago) by skrll
Branch: MAIN
Changes since 1.107: +3 -2 lines
Diff to previous 1.107 (colored) to selected 1.113.4.1 (colored)

Some USB3 / SS support - baby steps.  From Takahiro HAYASHI.

Revision 1.93.4.4 / (download) - annotate - [select for diffs], Thu May 22 11:40:37 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.93.4.3: +20 -24 lines
Diff to previous 1.93.4.3 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored) to selected 1.113.4.1 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.103.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:48 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.103: +16 -20 lines
Diff to previous 1.103 (colored) next main 1.104 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.88.12.1 / (download) - annotate - [select for diffs], Tue Nov 5 18:36:31 2013 UTC (10 years, 4 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.88: +55 -1 lines
Diff to previous 1.88 (colored) next main 1.89 (colored) to selected 1.113.4.1 (colored)

Pull down xhci support from HEAD

Revision 1.107 / (download) - annotate - [select for diffs], Thu Oct 3 19:04:00 2013 UTC (10 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Branch point for: netbsd-7
Changes since 1.106: +2 -2 lines
Diff to previous 1.106 (colored) to selected 1.113.4.1 (colored)

Update a comment. Thanks mrg@

Revision 1.106 / (download) - annotate - [select for diffs], Thu Oct 3 07:35:37 2013 UTC (10 years, 5 months ago) by skrll
Branch: MAIN
Changes since 1.105: +3 -18 lines
Diff to previous 1.105 (colored) to selected 1.113.4.1 (colored)

Simply the code now that all (real) HCDs provide a get_lock method.

Revision 1.105 / (download) - annotate - [select for diffs], Sat Sep 14 00:40:31 2013 UTC (10 years, 6 months ago) by jakllsch
Branch: MAIN
Changes since 1.104: +12 -1 lines
Diff to previous 1.104 (colored) to selected 1.113.4.1 (colored)

Add work-in-progress xhci(4) driver code.  Currently (mostly) supports
interrupt-driven control, interrupt and bulk transfers at the three USB
2.0 speeds on root hub ports.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Sep 7 16:47:23 2013 UTC (10 years, 6 months ago) by skrll
Branch: MAIN
Changes since 1.103: +2 -2 lines
Diff to previous 1.103 (colored) to selected 1.113.4.1 (colored)

Some lock comments.

Revision 1.99.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:22 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.99.2.1: +2 -2 lines
Diff to previous 1.99.2.1 (colored) to branchpoint 1.99 (colored) to selected 1.113.4.1 (colored)

resync from head

Revision 1.103 / (download) - annotate - [select for diffs], Sun Mar 24 22:38:45 2013 UTC (11 years ago) by skrll
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored) to selected 1.113.4.1 (colored)

Add || defined(OHCI_DEBUG) to pick up usbd_dump_pipe

Fixes kern/47690

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:42 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.99: +11 -5 lines
Diff to previous 1.99 (colored) to selected 1.113.4.1 (colored)

resync with head

Revision 1.102 / (download) - annotate - [select for diffs], Wed Jan 23 06:53:30 2013 UTC (11 years, 2 months ago) by skrll
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.101: +4 -4 lines
Diff to previous 1.101 (colored) to selected 1.113.4.1 (colored)

Whitespace

Revision 1.93.4.3 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:16 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.93.4.2: +8 -2 lines
Diff to previous 1.93.4.2 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.101 / (download) - annotate - [select for diffs], Tue Jan 22 12:40:44 2013 UTC (11 years, 2 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base8
Changes since 1.100: +7 -1 lines
Diff to previous 1.100 (colored) to selected 1.113.4.1 (colored)

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
  before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
  present, acquire KERNEL_LOCK before invoking the task callback.

Revision 1.100 / (download) - annotate - [select for diffs], Tue Jan 8 06:50:07 2013 UTC (11 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (colored) to selected 1.113.4.1 (colored)

Fix the IPL level of the HC lock in a comment.

Revision 1.93.4.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:12 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.93.4.1: +74 -5 lines
Diff to previous 1.93.4.1 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.99 / (download) - annotate - [select for diffs], Sat Aug 11 21:54:18 2012 UTC (11 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.98: +4 -4 lines
Diff to previous 1.98 (colored) to selected 1.113.4.1 (colored)

minor correction to some comments.

Revision 1.98 / (download) - annotate - [select for diffs], Sun Jul 15 21:13:31 2012 UTC (11 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.97: +2 -1 lines
Diff to previous 1.97 (colored) to selected 1.113.4.1 (colored)

commit my workaround for PR 46648 for now, as the more involved
fix is not ready yet:

move the clear endpoint stall async call into the task thread,
to avoid trying to call kmem_alloc() from a softint thread.

XXX ideally moving callbacks into the task thread (or perhaps
a different high priority task thread) would be better than this
workaround, once that method is working.

Revision 1.97 / (download) - annotate - [select for diffs], Sun Jun 10 06:15:55 2012 UTC (11 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.96: +73 -5 lines
Diff to previous 1.96 (colored) to selected 1.113.4.1 (colored)

merge the jmcneill-usbmp branch.  many thanks to jared for the
initial work, and every one else who has tested things for me.
this is largely my fault at this point :-)

the main changes are something like:

        - usbd_bus_methods{} gains a get_lock() to enable the
          host controller to provide a lock for the USB code.
          if the lock isn't provided, old-style protection is
          (partially) applied.

        - ehci/ohci/uhci have been converted to the new
          interfaces, including mutex/cv/etc conversion.

        - usbdivar.h contains a discussion about locking and
          what locks are held for which method calls.  more
          to come for usbdi(9) here.

        - audio drivers (uaudio, umidi, auvitek) have been
          properly SMPified now that USB is ready.

        - scsi drivers have been modified to take the kernel
          lock explicitly before calling into scsi code.

        - usb pipes are associated with a lock, that is the
          same as the controller lock.  (this could be split
          up further in the future.)

        - several usbfoo_locked() or usbfoo_unlocked()
          functions have been added to the usbdi(9) to
          enable functionality with or without the USB
          lock (per controller) already being held.

the TODO.usbmp file has specific details on what is left to
do, including what device-specific changes should be done now
that the whole framework is ready.

Revision 1.93.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:10 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.93: +3 -16 lines
Diff to previous 1.93 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.93.8.13 / (download) - annotate - [select for diffs], Sun Mar 11 01:52:29 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.12: +5 -5 lines
Diff to previous 1.93.8.12 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored) to selected 1.113.4.1 (colored)

sync to latest -current

Revision 1.96 / (download) - annotate - [select for diffs], Sun Mar 11 01:06:07 2012 UTC (12 years ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base10
Changes since 1.95: +3 -1 lines
Diff to previous 1.95 (colored) to selected 1.113.4.1 (colored)

minor cleanups from usbmp:
- move usbd_delay_ms() into usbdivar.h in the usb_subr.c section
- minor rcsid fixes
- copyright maintenence

Revision 1.95 / (download) - annotate - [select for diffs], Sun Mar 11 00:34:45 2012 UTC (12 years ago) by mrg
Branch: MAIN
Changes since 1.94: +1 -2 lines
Diff to previous 1.94 (colored) to selected 1.113.4.1 (colored)

pull down from usbmp branch:
- remove usbd_bus{} intr_context member, and replace the checks against
  it with cpu_intr_p() and cpu_softintr_p().

Revision 1.93.8.12 / (download) - annotate - [select for diffs], Tue Mar 6 18:26:48 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.11: +1 -2 lines
Diff to previous 1.93.8.11 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

sync to -current

Revision 1.94 / (download) - annotate - [select for diffs], Tue Mar 6 02:36:46 2012 UTC (12 years ago) by mrg
Branch: MAIN
CVS Tags: jmcneill-usbmp-base6
Changes since 1.93: +1 -15 lines
Diff to previous 1.93 (colored) to selected 1.113.4.1 (colored)

pull down from usbmp branch:

- remove SPLUSBCHECK.  it has been broken and disabled for ages.

Revision 1.93.8.11 / (download) - annotate - [select for diffs], Sun Feb 26 06:59:38 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.10: +5 -1 lines
Diff to previous 1.93.8.10 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

use kpause() in usb{d,}_delay_ms(), and add a version that takes a mutex

Revision 1.93.8.10 / (download) - annotate - [select for diffs], Sat Feb 25 20:46:34 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.9: +3 -3 lines
Diff to previous 1.93.8.9 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

replace the (diagnostic-only) intr_context with checks against LP_INTR
and cpu_intr_p().

XXX: there's one check that changes behaviour

Revision 1.93.8.9 / (download) - annotate - [select for diffs], Sat Feb 25 10:26:24 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.8: +3 -3 lines
Diff to previous 1.93.8.8 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

copyright maintenence.

Revision 1.93.8.8 / (download) - annotate - [select for diffs], Thu Feb 23 09:25:03 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.7: +9 -11 lines
Diff to previous 1.93.8.7 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

update a bunch of comments for reality.  usb lock isn't a "thread lock",
which is terminology we copied from the audiomp code.

Revision 1.93.8.7 / (download) - annotate - [select for diffs], Mon Feb 20 22:43:12 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.6: +3 -2 lines
Diff to previous 1.93.8.6 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

expand a command slightly

Revision 1.93.8.6 / (download) - annotate - [select for diffs], Mon Feb 20 06:50:21 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.5: +23 -26 lines
Diff to previous 1.93.8.5 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

remove the intr_lock from the mp usb api, it wasn't used.

Revision 1.93.8.5 / (download) - annotate - [select for diffs], Mon Feb 20 02:12:24 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.4: +8 -3 lines
Diff to previous 1.93.8.4 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

several changes to the MP usb apis, and other misc changes:

- usb_transfer_complete()/usb_insert_transfer()/usb_start_next() all
  must have the thread lock held

- (*soft_intr) now is called with the thread lock held unless we are
  in polling mode.  add a usb_soft_intr() to deal with this

- XXX usbd_set_polling() api exists to increase/decrease the polling
  count, but only ukbd uses.  everyone else open codes it, but this
  should probably be changed

- (*abort) is now called with the thread lock held

- update several comments to not refer to splusb() anymore

- add many more asserts

- use more c99 struct initialisers

Revision 1.93.8.4 / (download) - annotate - [select for diffs], Fri Dec 9 01:53:00 2011 UTC (12 years, 3 months ago) by mrg
Branch: jmcneill-usbmp
CVS Tags: jmcneill-usbmp-pre-base2
Changes since 1.93.8.3: +15 -8 lines
Diff to previous 1.93.8.3 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

- make pipe->close method take the thread lock

- convert usb_taskq to use mutex/cv

- convert needs_explore usage into a cv on the thread lock

- remove KERNEL_*LOCK from uaudio and umidi, since we're supposedly
  MPSAFE here now

- use IPL_SCHED instead of IPL_USB (aka biglocked) interrupts

- drop the audio thread lock when calling into usb when it may sleep,
  avoiding a deadlock between audiowrite and audioioctl.  this fixes
  mixerctl -a vs. playing hanging the system
  XXX probably need to check this in a bunch more places.

Revision 1.93.8.3 / (download) - annotate - [select for diffs], Thu Dec 8 22:38:47 2011 UTC (12 years, 3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.2: +2 -2 lines
Diff to previous 1.93.8.2 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

make ohci mostly work again.

Revision 1.93.8.1.2.3 / (download) - annotate - [select for diffs], Thu Dec 8 22:04:56 2011 UTC (12 years, 3 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.93.8.1.2.2: +1 -6 lines
Diff to previous 1.93.8.1.2.2 (colored) to branchpoint 1.93.8.1 (colored) next main 1.93.8.2 (colored) to selected 1.113.4.1 (colored)

sync usb_subr.c and usbdivar.h with the branch entirely, and most of
usbdi.c as well.

Revision 1.93.8.1.2.2 / (download) - annotate - [select for diffs], Thu Dec 8 10:41:28 2011 UTC (12 years, 3 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.93.8.1.2.1: +19 -2 lines
Diff to previous 1.93.8.1.2.1 (colored) to branchpoint 1.93.8.1 (colored) to selected 1.113.4.1 (colored)

merge a few more changes from the main branch.

Revision 1.93.8.1.2.1 / (download) - annotate - [select for diffs], Thu Dec 8 10:22:40 2011 UTC (12 years, 3 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.93.8.1: +36 -15 lines
Diff to previous 1.93.8.1 (colored) to selected 1.113.4.1 (colored)

merge a few more things from the main branch.  uaudio@ohci still works.

Revision 1.93.8.2 / (download) - annotate - [select for diffs], Thu Dec 8 02:51:08 2011 UTC (12 years, 3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.93.8.1: +54 -21 lines
Diff to previous 1.93.8.1 (colored) to branchpoint 1.93 (colored) to selected 1.113.4.1 (colored)

- convert usbd_bus_methods{} and usbd_pipe_methods{} to use
  c99 struct initialisers

- move the locks from the pipe to the bus, since we'll need
  access to them from bus-level ops

- remove dead-for-years SPLUSBCHECK and replaced it with
  asserts that the thread lock is held

- begin to document the locking scheme

- convert usbd_*lock_pipe() into real function-like macros

Revision 1.93.8.1 / (download) - annotate - [select for diffs], Sun Dec 4 13:23:17 2011 UTC (12 years, 3 months ago) by jmcneill
Branch: jmcneill-usbmp
CVS Tags: mrg-ohci-jmcneill-usbmp-base
Branch point for: mrg-ohci-jmcneill-usbmp
Changes since 1.93: +12 -1 lines
Diff to previous 1.93 (colored) to selected 1.113.4.1 (colored)

Make ehci mpsafe.

Revision 1.92.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:08:45 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored) next main 1.93 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.91.4.2 / (download) - annotate - [select for diffs], Tue May 31 03:04:56 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.91.4.1: +1 -0 lines
Diff to previous 1.91.4.1 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.93 / (download) - annotate - [select for diffs], Fri May 27 17:19:18 2011 UTC (12 years, 10 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored) to selected 1.113.4.1 (colored)

remember the data toggle bit per (bulk) endpoint rather than per
pipe, as required by the spec
This helps in cases where pipes are opened/closed without reconfiguring
the device in between, eg with the ugen driver.
only for UHCI/EHCI, don't have an OHCI to test

Revision 1.91.4.1 / (download) - annotate - [select for diffs], Sat Mar 5 20:54:17 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.92 / (download) - annotate - [select for diffs], Mon Dec 20 18:49:12 2010 UTC (13 years, 3 months ago) by phx
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored) to selected 1.113.4.1 (colored)

usbd_dump_*() functions are also needed when just EHCI_DEBUG is defined,
without USB_DEBUG.

Revision 1.83.4.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:08 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83.4.3: +4 -4 lines
Diff to previous 1.83.4.3 (colored) to branchpoint 1.83 (colored) next main 1.84 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.91 / (download) - annotate - [select for diffs], Thu Nov 12 20:11:35 2009 UTC (14 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211
Branch point for: rmind-uvmplock
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored) to selected 1.113.4.1 (colored)

Re-order operations in usb_detach() so that if a usb(4) instance's
children will not detach, the instance is not left in an inconsistent
state.

If uhub(4) port is disconnected, forcefully detach the children on
that port.

Simplify detachment hooks.  (sc_dying must die!)

Pass along and respect detachment flags, esp. DETACH_FORCE,
throughout.

Revision 1.80.12.5 / (download) - annotate - [select for diffs], Thu Nov 12 08:17:31 2009 UTC (14 years, 4 months ago) by uebayasi
Branch: itohy-usb1
Changes since 1.80.12.4: +17 -4 lines
Diff to previous 1.80.12.4 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored) to selected 1.113.4.1 (colored)

Sort members in struct usbd_bus_methods.  Comments.

Revision 1.90 / (download) - annotate - [select for diffs], Thu Nov 12 08:16:50 2009 UTC (14 years, 4 months ago) by uebayasi
Branch: MAIN
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored) to selected 1.113.4.1 (colored)

Indent.

Revision 1.83.4.3 / (download) - annotate - [select for diffs], Wed Sep 16 13:37:58 2009 UTC (14 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83.4.2: +12 -8 lines
Diff to previous 1.83.4.2 (colored) to branchpoint 1.83 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.89 / (download) - annotate - [select for diffs], Fri Sep 4 17:53:12 2009 UTC (14 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, jym-xensuspend-nbase
Changes since 1.88: +12 -8 lines
Diff to previous 1.88 (colored) to selected 1.113.4.1 (colored)

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).

Revision 1.83.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:22 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83.4.1: +7 -47 lines
Diff to previous 1.83.4.1 (colored) to branchpoint 1.83 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.86.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:10 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.86: +5 -1 lines
Diff to previous 1.86 (colored) next main 1.87 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.82.6.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:34 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.82.6.2: +4 -0 lines
Diff to previous 1.82.6.2 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.84.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:35:12 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.84.2.1: +5 -1 lines
Diff to previous 1.84.2.1 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored) to selected 1.113.4.1 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.88 / (download) - annotate - [select for diffs], Mon Aug 18 18:03:21 2008 UTC (15 years, 7 months ago) by kent
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, nick-hppapmap, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: matt-nb5-mips64
Changes since 1.87: +4 -1 lines
Diff to previous 1.87 (colored) to selected 1.113.4.1 (colored)

Implement uhub_rescan().  After this change, "modload uaudio.kmod"
configures an audio device correctly for a device which is already
plugged.

* usb_subr.c
 Add locators parameter to usbd_attachinterfaces()
 Add usbd_reatach_device()

* usbdivar.h
 Export usbd_reatach_device()

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Thu Jul 31 04:51:02 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.86: +2 -1 lines
Diff to previous 1.86 (colored) next main 1.87 (colored) to selected 1.113.4.1 (colored)

Sync with head.

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jul 28 15:22:01 2008 UTC (15 years, 8 months ago) by drochner
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.86: +2 -1 lines
Diff to previous 1.86 (colored) to selected 1.113.4.1 (colored)

-in usbd_probe_and_attach(), split out the code for per-device and
 per-interface attachment into individual functions, to ease
 maintainance and allow easier plugin of new attachment functions
-keep a counter of USB interfaces in use on a device, and try to
 keep track of interfaces claimed by drivers behind the framework's
 back

Revision 1.84.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:38 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.84: +3 -47 lines
Diff to previous 1.84 (colored) to selected 1.113.4.1 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.83.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:21 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.83.2.1: +3 -47 lines
Diff to previous 1.83.2.1 (colored) to branchpoint 1.83 (colored) next main 1.84 (colored) to selected 1.113.4.1 (colored)

sync with head

Revision 1.82.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:23:56 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.82.6.1: +2 -53 lines
Diff to previous 1.82.6.1 (colored) to branchpoint 1.82 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.86 / (download) - annotate - [select for diffs], Mon May 26 18:00:33 2008 UTC (15 years, 10 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl, haad-dm
Changes since 1.85: +1 -46 lines
Diff to previous 1.85 (colored) to selected 1.113.4.1 (colored)

some cleanup:
-unifdef
-since the roothub attach doesn't use locators, don't call
 config_stdsubmatch() -- it is a no-op in that case
-ifsubmatch has configuration and interface always set to useful values,
 remove unnecessary checks
-remove now unused locator definitions from shared header

Revision 1.85 / (download) - annotate - [select for diffs], Sun May 25 21:41:35 2008 UTC (15 years, 10 months ago) by drochner
Branch: MAIN
Changes since 1.84: +3 -2 lines
Diff to previous 1.84 (colored) to selected 1.113.4.1 (colored)

-make the list of USB child devices a (possibly sparse) array rather
 than a zero-terminated list; this makes the code simpler and also
 hopefully fixes the recent "childdet" botch, see PR kern/38528
-handle the root hub specially a bit earlier, this allows to kick out
 the "submatch" functions completely which needed to second-guess
 from the port number (where "0" meant root hub")
 (we could handle the root hub specially even earlier, but as done
 now big parts of the hub emulation code are exercised regularely,
 this would bitrot otherwise)

Revision 1.80.12.4 / (download) - annotate - [select for diffs], Wed May 21 05:04:03 2008 UTC (15 years, 10 months ago) by itohy
Branch: itohy-usb1
Changes since 1.80.12.3: +2 -1 lines
Diff to previous 1.80.12.3 (colored) to branchpoint 1.80 (colored) to selected 1.113.4.1 (colored)

Hold mbuf chain in struct usbd_xfer.

Revision 1.83.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:34:52 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.83: +1 -8 lines
Diff to previous 1.83 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.83.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:12 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83: +1 -8 lines
Diff to previous 1.83 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:01 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.83: +1 -8 lines
Diff to previous 1.83 (colored) to selected 1.113.4.1 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.82.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:58 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.82: +3 -5 lines
Diff to previous 1.82 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Mar 28 17:14:46 2008 UTC (16 years ago) by drochner
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.82: +3 -5 lines
Diff to previous 1.82 (colored) to selected 1.113.4.1 (colored)

split device/softc for USB host controllers and the usb (control)
device,
this is hairy stuff, and I've only tested with uhci/ehci at pci,
please test the rest and report problems

Revision 1.81.8.1 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:54 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) next main 1.82 (colored) to selected 1.113.4.1 (colored)

sync with HEAD

Revision 1.74.2.4 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:48 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.74.2.3: +2 -2 lines
Diff to previous 1.74.2.3 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.81.14.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:26 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) next main 1.82 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Feb 18 05:24:24 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) to selected 1.113.4.1 (colored)

Use device_t and its accessor functions.

Register _childdetached methods with drivers that attach children.
Wait to set child references to NULL there, instead of doing that
in the detach method.

Replace many uses of USB_DECLARE_DRIVER() with CFATTACH_DECL2().

Revision 1.74.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:39:26 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.74.2.2: +3 -10 lines
Diff to previous 1.74.2.2 (colored) to branchpoint 1.74 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.80.6.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:08:50 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.80: +1 -8 lines
Diff to previous 1.80 (colored) next main 1.81 (colored) to selected 1.113.4.1 (colored)

Sync with head.

Revision 1.81 / (download) - annotate - [select for diffs], Mon Jul 9 21:01:25 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-base, jmcneill-pm-base, jmcneill-pm, jmcneill-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-armv6
Changes since 1.80: +1 -8 lines
Diff to previous 1.80 (colored) to selected 1.113.4.1 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.80.4.1 / (download) - annotate - [select for diffs], Sun Jul 1 21:49:03 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.80: +1 -8 lines
Diff to previous 1.80 (colored) next main 1.81 (colored) to selected 1.113.4.1 (colored)

Adapt to callout API change.

Revision 1.80.12.3 / (download) - annotate - [select for diffs], Fri Jun 22 10:12:25 2007 UTC (16 years, 9 months ago) by itohy
Branch: itohy-usb1
Changes since 1.80.12.2: +1 -1 lines
Diff to previous 1.80.12.2 (colored) to branchpoint 1.80 (colored) to selected 1.113.4.1 (colored)

- Introduce USBD_CALLBACK_AS_TASK flag, which causes the callback function
  is called as a USB_TASKQ_DRIVER task, with thread context.
  This makes sharing Ethernet drivers with FreeBSD (that requires context
  for some network-related code) much easier.
  The flag is not used by NetBSD/OpenBSD for now.

- Rename xfer->async_task as xfer->task, now used by both async xfer and the
  callback above.

- Use 0 as idle task queue ID (definition USB_TASKQ_IDLE added), and
  increase USB_TASKQ_HC and USB_TASKQ_DRIVER accordingly.
  This makes passing zero-initialized (but not initialized by usb_init_task())
  usb_task to usb_rem_task() be ignored, rather than panic the system.

Revision 1.80.12.2 / (download) - annotate - [select for diffs], Thu May 31 23:15:19 2007 UTC (16 years, 10 months ago) by itohy
Branch: itohy-usb1
Changes since 1.80.12.1: +3 -1 lines
Diff to previous 1.80.12.1 (colored) to branchpoint 1.80 (colored) to selected 1.113.4.1 (colored)

usbdi(9): Change usbd_map_buffer_mbuf to return the result, since
	mbuf(9) chain may be fragmented and mapping failure will happen.
-void usbd_map_buffer_mbuf(usbd_xfer_handle xfer, struct mbuf *chain)
+usbd_status usbd_map_buffer_mbuf(usbd_xfer_handle xfer, struct mbuf *chain)

usbdi(9): Add more diagnostic assertions.
uhci(4): fix aux dma for mbuf mapping.
slhci(4): fix repeated interrupt transfer (not tested).
ehci/slhci/ohci/uhci: Add checks where mbuf(4) transfer is not supported.

usb_port.h: Add some compat macros for FreeBSD.
usb_mem_nodma.c: Fix typos.

Revision 1.80.12.1 / (download) - annotate - [select for diffs], Tue May 22 14:57:50 2007 UTC (16 years, 10 months ago) by itohy
Branch: itohy-usb1
Changes since 1.80: +46 -25 lines
Diff to previous 1.80 (colored) to selected 1.113.4.1 (colored)

Overhaul of USB stack, mostly DMA related

This applies to NetBSD 4.99.13 (March 1, 2007)

usbdi(9) interface is based on FreeBSD version, excluding
 - removal of portability code

Patch most NetBSD changes, excluding
 - DMA memory "reserve", since we don't need contiguous buffers any longer
 - volatiles in DMA structure, since it should not be needed
   with proper bus_dmamap_sync(9)s

DMA/non-DMA memory management overhaul
 - Move all DMA related code to usb_mem.[ch]
   (add usb_alloc_buffer_dma(), usb_free_buffer_dma(), etc.).
   XXX Should usb_mem.[ch] be renamed as usb_mem_dma.[ch] ?
 - Add corresponding non-DMA code to usb_mem_nodma.[ch] .
   Currently just use malloc(9).
 - Above files are conditionally used by config framework (added
   attributes to conf/files and dev/usb/files.usb).
 - Add diagnostic panics when resource allocation is requested
   on interrupt context.
 - Change memory allocations (that require context) from NOWAIT to WAITOK.

Allocate DMA/non-DMA buffer per host interface, not globally.
 advantage:	Buffers can be freed on detaching host interface.
		Activity of a host interface does not affect others.
 disadvantages:	It possibly consumes more memory.

API changes
 - usbd_alloc_xfer() is changed:
    old: usbd_xfer_handle usbd_alloc_xfer(usbd_device_handle dev);
    new: usbd_xfer_handle usbd_alloc_xfer(usbd_device_handle dev,
		usbd_pipe_handle pipe);
 - pipe argument of usbd_setup_*xfer() are now unused
   XXX the pipe argument should be removed?
 - add mapping APIs
 - async request will be processed as a task (kernel thread context),
   and delayed to some extent
 - usbdivar.h: struct usbd_xfer: renamed a member "allocbuf" to "hcbuffer"
   (mapped/allocated/refered buffer for HCI driver)
 - usb_port.h: change usb_proc_ptr from  struct ptoc *  to struct lwp *
 - usb_port.h: add usb_sigproc_ptr for psignal(9) (struct proc *)
 - usb.h: add UE_MAXPKTSZ(ep) and UE_MAXPKTSZ_MASK macros for USB 2.0

changes to USB device drivers
 - atu, aue, axe, cdce, cue, kue, rum, udav, upl, ural, url,
   uaudio, ubt, ucom, ugen, uhidev, uirda, ulpt, umidi, urio,
   uscanner, ustir, utoppy:
    * catch up API change of usbd_alloc_xfer()
 - umass, usscanner:
    * catch up API change of usbd_alloc_xfer()
    * eliminate memory copy for large transfer

ohci
 - free resources on detach
 - add lots of bus_dmamap_sync() operations
 - simplify the code of loading std chain
 - rewrite code of looking up TD/ITD from DMA addr by using allocation chunk
 - add workaround for CMD Tech 670 and 673 chipsets
 - make sure resources are not allocated in interrupt context
 - add support for mapping buffer and mbuf

slhci
 - allocate xfer and slhci_xfer at once, and simplify relevant code
 - add slhci_detach()
 - remove second arg of slhci_attach() since it is the same as the first arg.
 - add support for "mapping" (no, it doesn't map since it doesn't do DMA)
   buffer and mbuf
 - add pcmcia frontend
 - NOT TESTED, missing hardware

ehci
 - add lots of bus_dmamap_sync() operations, possibly too many
 - make sure resources are not allocated in interrupt context
 - add support for mapping buffer and mbuf
 - done only simple test

uhci
 - add lots of bus_dmamap_sync() operations, possibly too many
 - make sure resources are not allocated in interrupt context
 - add support for mapping buffer and mbuf

To do
 - review, test, debug
 - rewrite network drivers to utilize usbd_map_buffer_mbuf()
 - rewrite uaudio(4) to eliminate memcpy
 - "pipe" argument of usbd_setup_*xfer() should eventually be removed

Revision 1.79.4.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:10 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) next main 1.80 (colored) to selected 1.113.4.1 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.80 / (download) - annotate - [select for diffs], Mon Feb 26 13:23:59 2007 UTC (17 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, itohy-usb1-base, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, mjf-ufs-trans, itohy-usb1
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.113.4.1 (colored)

allow the bus/pipes methods tables to be const

Revision 1.77.20.2 / (download) - annotate - [select for diffs], Fri Jan 12 00:57:49 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.77.20.1: +5 -1 lines
Diff to previous 1.77.20.1 (colored) to branchpoint 1.77 (colored) next main 1.78 (colored) to selected 1.113.4.1 (colored)

Sync with head.

Revision 1.74.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:49:39 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.74.2.1: +17 -13 lines
Diff to previous 1.74.2.1 (colored) to branchpoint 1.74 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.77.22.1 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:18 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.77: +17 -13 lines
Diff to previous 1.77 (colored) next main 1.78 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Dec 1 20:48:50 2006 UTC (17 years, 3 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Changes since 1.78: +5 -1 lines
Diff to previous 1.78 (colored) to selected 1.113.4.1 (colored)

-comment out transaction translator support for now, it doesn't do more
 than allocating memory, and it does wrongly use the hub's capabilities
 but not the actual setting
-switch a high-speed hub to "multiple TTs" but ignore errors; since
 we don't care whether there is one or multiple this is a "best effort"
 thing

Revision 1.77.20.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:52 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.77: +13 -13 lines
Diff to previous 1.77 (colored) to selected 1.113.4.1 (colored)

Sync with head.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Oct 24 21:03:30 2006 UTC (17 years, 5 months ago) by drochner
Branch: MAIN
Changes since 1.77: +13 -13 lines
Diff to previous 1.77 (colored) to selected 1.113.4.1 (colored)

clean up the USB attachment stuff a bit: use a dedicated interface
attribute ("usbdevif") to attach USB devices, be it a plain device or
a hub, and remove some strangeness caused by the former usb/uhub mess

Revision 1.73.8.1 / (download) - annotate - [select for diffs], Fri Aug 11 04:24:51 2006 UTC (17 years, 7 months ago) by riz
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE
Changes since 1.73: +5 -2 lines
Diff to previous 1.73 (colored) next main 1.74 (colored) to selected 1.113.4.1 (colored)

Pull up following revision(s) (requested by abs in ticket #1459):
	sys/dev/usb/ehci.c: revision 1.96
	sys/dev/usb/uhci.c: revision 1.188
	sys/dev/usb/ohci.c: revision 1.159
	sys/dev/usb/usbdivar.h: revision 1.74
Fix a race condition in xfer abort.  Derived from a FreeBSD patch.
An xfer could be aborted twice (which means that the second abort might
access deallocated memory).  This happened when an xfer timed out and
the timeout started an abort.  While that abort was taking place the
xfer could be cancelled (usually by closing the pipe), causing a second
abort to begin.
This is now handled by having flags indicating the abort state of an xfer.
Hopefully this will fix the occasional crashes when printing.

Revision 1.73.6.1 / (download) - annotate - [select for diffs], Fri Aug 11 04:22:21 2006 UTC (17 years, 7 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.73: +5 -2 lines
Diff to previous 1.73 (colored) next main 1.74 (colored) to selected 1.113.4.1 (colored)

Pull up following revision(s) (requested by abs in ticket #1459):
	sys/dev/usb/ehci.c: revision 1.96
	sys/dev/usb/uhci.c: revision 1.188
	sys/dev/usb/ohci.c: revision 1.159
	sys/dev/usb/usbdivar.h: revision 1.74
Fix a race condition in xfer abort.  Derived from a FreeBSD patch.
An xfer could be aborted twice (which means that the second abort might
access deallocated memory).  This happened when an xfer timed out and
the timeout started an abort.  While that abort was taking place the
xfer could be cancelled (usually by closing the pipe), causing a second
abort to begin.
This is now handled by having flags indicating the abort state of an xfer.
Hopefully this will fix the occasional crashes when printing.

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:07:45 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.74: +6 -8 lines
Diff to previous 1.74 (colored) to selected 1.113.4.1 (colored)

sync with head.

Revision 1.77 / (download) - annotate - [select for diffs], Tue Dec 27 04:06:45 2005 UTC (18 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.76: +6 -8 lines
Diff to previous 1.76 (colored) to selected 1.113.4.1 (colored)

changes for making DIAGNOSTIC not change the kernel ABI:
 - for structure fields that are conditionally present,
   make those fields always present.
 - for functions which are conditionally inline, make them never inline.
 - remove some other functions which are conditionally defined but
   don't actually do anything anymore.
 - make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.

Revision 1.76 / (download) - annotate - [select for diffs], Sat Dec 24 20:27:52 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored) to selected 1.113.4.1 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:01 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.74: +1 -1 lines
Diff to previous 1.74 (colored) to selected 1.113.4.1 (colored)

merge ktrace-lwp.

Revision 1.70.6.6 / (download) - annotate - [select for diffs], Thu Nov 10 14:08:06 2005 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.70.6.5: +5 -2 lines
Diff to previous 1.70.6.5 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD. Here we go again...

Revision 1.74 / (download) - annotate - [select for diffs], Sat Apr 30 14:38:40 2005 UTC (18 years, 11 months ago) by augustss
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.73: +5 -2 lines
Diff to previous 1.73 (colored) to selected 1.113.4.1 (colored)

Fix a race condition in xfer abort.  Derived from a FreeBSD patch.

An xfer could be aborted twice (which means that the second abort might
access deallocated memory).  This happened when an xfer timed out and
the timeout started an abort.  While that abort was taking place the
xfer could be cancelled (usually by closing the pipe), causing a second
abort to begin.
This is now handled by having flags indicating the abort state of an xfer.

Hopefully this will fix the occasional crashes when printing.

Revision 1.72.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:19 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored) next main 1.73 (colored) to selected 1.113.4.1 (colored)

sync with -current

Revision 1.70.6.5 / (download) - annotate - [select for diffs], Mon Jan 24 08:35:36 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.70.6.4: +3 -1 lines
Diff to previous 1.70.6.4 (colored) to branchpoint 1.70 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Jan 24 01:30:38 2005 UTC (19 years, 2 months ago) by joff
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-1-RELEASE, kent-audio2-base
Branch point for: netbsd-3-0, netbsd-3
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored) to selected 1.113.4.1 (colored)

Implementation requirements of usb_needs_reattach(), from OpenBSD and required
for atu(4) to do a USB reconnect after firmware upload.

Revision 1.70.6.4 / (download) - annotate - [select for diffs], Tue Nov 2 07:53:04 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.70.6.3: +7 -2 lines
Diff to previous 1.70.6.3 (colored) to branchpoint 1.70 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Oct 23 16:17:56 2004 UTC (19 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Changes since 1.71: +7 -2 lines
Diff to previous 1.71 (colored) to selected 1.113.4.1 (colored)

Keep track of what high speed port (if any) a device belongs to so we can
set the transaction translator fields for the transfer.
Add a gross hack for split transaction completion in the ehci driver that
allows control transfers to be translated.  Interrupt transfers do not work.
Warn when any low/full speed device is opened.

Revision 1.70.6.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:33:53 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.70.6.2: +1 -1 lines
Diff to previous 1.70.6.2 (colored) to branchpoint 1.70 (colored) to selected 1.113.4.1 (colored)

Fix the sync with head I botched.

Revision 1.70.6.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:51:47 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.70.6.1: +0 -0 lines
Diff to previous 1.70.6.1 (colored) to branchpoint 1.70 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.70.6.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:51:43 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.70: +8 -11 lines
Diff to previous 1.70 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Fri Apr 23 17:25:26 2004 UTC (19 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.70: +8 -11 lines
Diff to previous 1.70 (colored) to selected 1.113.4.1 (colored)

use bounded string ops (snprintf, strl*)

Revision 1.63.4.2 / (download) - annotate - [select for diffs], Fri Sep 6 08:47:21 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.63.4.1: +3 -3 lines
Diff to previous 1.63.4.1 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored) to selected 1.113.4.1 (colored)

sync kqueue branch with HEAD

Revision 1.63.2.3 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:11 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.63.2.2: +3 -3 lines
Diff to previous 1.63.2.2 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored) to selected 1.113.4.1 (colored)

Catch up to -current.

Revision 1.69.8.1 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:22 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored) next main 1.70 (colored) to selected 1.113.4.1 (colored)

catch up with -current.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Jul 11 21:14:36 2002 UTC (21 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, fvdl_fs64_base
Branch point for: ktrace-lwp
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored) to selected 1.113.4.1 (colored)

Get rid of trailing white space.

Revision 1.63.4.1 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:10 2002 UTC (22 years, 2 months ago) by thorpej
Branch: kqueue
Changes since 1.63: +15 -6 lines
Diff to previous 1.63 (colored) to selected 1.113.4.1 (colored)

Sync kqueue branch with -current.

Revision 1.63.2.2 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:22 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.63.2.1: +9 -4 lines
Diff to previous 1.63.2.1 (colored) to branchpoint 1.63 (colored) to selected 1.113.4.1 (colored)

Catch up to -current.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Dec 27 18:43:46 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored) to selected 1.113.4.1 (colored)

Change some DIAGNOSTIC #defines.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Dec 24 21:36:16 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored) to selected 1.113.4.1 (colored)

Add some more DIAGNOSTIC tests.
Make usb_match_device() match on USB_PRODUCT_ANY.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Nov 21 13:44:47 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.66: +3 -1 lines
Diff to previous 1.66 (colored) to selected 1.113.4.1 (colored)

Wrap dump routine prototypes in #ifdef USB_DEBUG

Revision 1.66 / (download) - annotate - [select for diffs], Tue Nov 20 13:48:04 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.65: +5 -3 lines
Diff to previous 1.65 (colored) to selected 1.113.4.1 (colored)

Keep track of device speed for USB 2.0.

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:23 2001 UTC (22 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.63: +7 -3 lines
Diff to previous 1.63 (colored) to selected 1.113.4.1 (colored)

Catch up to -current.

Revision 1.63.8.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:39 2001 UTC (22 years, 4 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.63: +7 -3 lines
Diff to previous 1.63 (colored) next main 1.64 (colored) to selected 1.113.4.1 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Nov 10 17:11:38 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.64: +1 -3 lines
Diff to previous 1.64 (colored) to selected 1.113.4.1 (colored)

Get rid of unused abort_handle.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Nov 10 16:54:56 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.63: +7 -1 lines
Diff to previous 1.63 (colored) to selected 1.113.4.1 (colored)

Add some dump routines for debugging.

Revision 1.37.2.4 / (download) - annotate - [select for diffs], Sun Feb 11 19:16:34 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.37.2.3: +13 -5 lines
Diff to previous 1.37.2.3 (colored) next main 1.38 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Jan 21 19:00:06 2001 UTC (23 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, nathanw_sa, kqueue
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored) to selected 1.113.4.1 (colored)

Change the operation of the USB event thread.  Before it only performed
USB device discovery, now it can also perform (short) tasks for device
drivers that need a process context, but don't have one.
This is not pretty, but better than using busy-wait in an interrupt context.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Jan 21 02:39:53 2001 UTC (23 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.61: +11 -3 lines
Diff to previous 1.61 (colored) to selected 1.113.4.1 (colored)

Add code to use soft interrupt to handle USB interrupt processing.
Don't enable the code since it doesn't work with the kludgy Ethernet drivers.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jan 18 20:28:23 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored) to selected 1.113.4.1 (colored)

constify

Revision 1.37.2.3 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:35 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.37.2.2: +1 -0 lines
Diff to previous 1.37.2.2 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD

Revision 1.60 / (download) - annotate - [select for diffs], Thu Dec 28 10:40:36 2000 UTC (23 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored) to selected 1.113.4.1 (colored)

#define for USB_2_0

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:18 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.37.2.1: +1 -2 lines
Diff to previous 1.37.2.1 (colored) to selected 1.113.4.1 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.59 / (download) - annotate - [select for diffs], Wed Dec 13 04:05:15 2000 UTC (23 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.58: +1 -2 lines
Diff to previous 1.58 (colored) to selected 1.113.4.1 (colored)

Don't try to access a device that is being disconnected when generating
the detach event.  Fixes (I hope) PR 11713 from itohy@netbsd.org (ITOH Yasufumi).

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 11:43:32 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.37: +93 -70 lines
Diff to previous 1.37 (colored) to selected 1.113.4.1 (colored)

Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Tue Jun 27 19:28:19 2000 UTC (23 years, 9 months ago) by thorpej
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Changes since 1.57: +5 -2 lines
Diff to previous 1.57 (colored) next main 1.58 (colored) to selected 1.113.4.1 (colored)

Pull up rev. 1.58:
Kill SPLUSBCHECK -- it's not portable, and quite annoying on some
platforms which otherwise function just fine.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jun 24 04:12:53 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +5 -2 lines
Diff to previous 1.57 (colored) to selected 1.113.4.1 (colored)

Kill SPLUSBCHECK -- it's not portable, and quite annoying on some
platforms which otherwise function just fine.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:08:49 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.56: +41 -44 lines
Diff to previous 1.56 (colored) next main 1.57 (colored) to selected 1.113.4.1 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Jun 1 14:29:03 2000 UTC (23 years, 10 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.56: +41 -44 lines
Diff to previous 1.56 (colored) to selected 1.113.4.1 (colored)

Bring the coding style into the 80s, i.e., get rid of __P and use
ANSI prototypes and declarations.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Apr 27 15:26:52 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored) to selected 1.113.4.1 (colored)

Change my email address.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Mar 30 00:18:18 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.54: +3 -1 lines
Diff to previous 1.54 (colored) to selected 1.113.4.1 (colored)

Afew more OpenBSD portability fixes.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Mar 29 03:59:43 2000 UTC (24 years ago) by simonb
Branch: MAIN
Changes since 1.53: +1 -2 lines
Diff to previous 1.53 (colored) to selected 1.113.4.1 (colored)

Remove redundant decl of cold - it's in <sys/kernel.h>.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Mar 29 01:45:21 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored) to selected 1.113.4.1 (colored)

Do not accept new xfers for queuing while a pipe is aborting.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Mar 25 18:02:33 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.51: +4 -3 lines
Diff to previous 1.51 (colored) to selected 1.113.4.1 (colored)

Rename and move around callout handles to make it more sane.
Add some DIAGNOSTIC.
Fix buglet in isoc abort on UHCI.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Mar 25 07:13:05 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.50: +4 -2 lines
Diff to previous 1.50 (colored) to selected 1.113.4.1 (colored)

More DIAGNOSTIC.
Initialize a callout handle I forgot.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Mar 25 00:10:19 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.49: +4 -2 lines
Diff to previous 1.49 (colored) to selected 1.113.4.1 (colored)

GC an unsued field and add some DIAGNOSTIC in xfer.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Mar 24 22:03:33 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.48: +3 -8 lines
Diff to previous 1.48 (colored) to selected 1.113.4.1 (colored)

Some cleanup and renaming of the callouts used in USB drivers.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Mar 23 07:01:46 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.47: +8 -2 lines
Diff to previous 1.47 (colored) to selected 1.113.4.1 (colored)

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Feb 22 11:30:56 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.46: +3 -2 lines
Diff to previous 1.46 (colored) to selected 1.113.4.1 (colored)

Prepare a little for having USB interrupt processing done outside the hard
interrupt level (in a thread or a softintr).
No real soft processing done yet.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jan 19 01:16:40 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.45: +2 -1 lines
Diff to previous 1.45 (colored) to selected 1.113.4.1 (colored)

Fix typos.
Never, never, never commit without compiling first.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jan 19 00:23:59 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored) to selected 1.113.4.1 (colored)

Add an argument to usbd_open_pipe_intr() to specify the polling interval
for an interrupt pipe in case we don't what what the descriptor suggests.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Jan 18 20:11:01 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.43: +4 -1 lines
Diff to previous 1.43 (colored) to selected 1.113.4.1 (colored)

Turn xfer allocation into a method in the HC driver.  The reason is that
an HC driver may want to subclass the xfer to have additional private fields.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Jan 16 09:43:43 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.42: +19 -19 lines
Diff to previous 1.42 (colored) to selected 1.113.4.1 (colored)

Add comments.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:46 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.35: +26 -14 lines
Diff to previous 1.35 (colored) next main 1.36 (colored) to selected 1.113.4.1 (colored)

Pull up to last week's -current.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Nov 20 00:57:10 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.41: +8 -1 lines
Diff to previous 1.41 (colored) to selected 1.113.4.1 (colored)

Propagate the USB revision number to the usb driver.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 18 23:32:37 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored) to selected 1.113.4.1 (colored)

Cosmetic changes and some small improvements.  From FreeBSD and Nick Hibma.

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:41:42 1999 UTC (24 years, 4 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.37: +15 -13 lines
Diff to previous 1.37 (colored) next main 1.38 (colored) to selected 1.113.4.1 (colored)

Sync with -current

Revision 1.40 / (download) - annotate - [select for diffs], Fri Nov 12 00:34:58 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: fvdl-softdep-base
Changes since 1.39: +12 -12 lines
Diff to previous 1.39 (colored) to selected 1.113.4.1 (colored)

A number of stylistic changes to increase readability (many suggested
by Nick Hibma):
	use NULL not 0
	declare all local definitions static
	rename s/usbd_request/usbd_xfer/ s/reqh/xfer/
	rename s/r/err/
	use implicit test for no err
	KNF

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Wed Nov 10 04:20:00 1999 UTC (24 years, 4 months ago) by mycroft
Branch: comdex-fall-1999
Changes since 1.39.2.1: +278 -0 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored) to selected 1.113.4.1 (colored)

Fix an obvious bug is some diagnostic code; we must lower our spl again...

Revision 1.39.2.1, Wed Nov 10 04:19:59 1999 UTC (24 years, 4 months ago) by mycroft
Branch: comdex-fall-1999
Changes since 1.39: +0 -278 lines
FILE REMOVED

file usbdivar.h was added on branch comdex-fall-1999 on 1999-11-10 04:20:00 +0000

Revision 1.39 / (download) - annotate - [select for diffs], Wed Nov 10 04:19:59 1999 UTC (24 years, 4 months ago) by mycroft
Branch: MAIN
CVS Tags: comdex-fall-1999-base
Branch point for: comdex-fall-1999
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored) to selected 1.113.4.1 (colored)

Fix an obvious bug is some diagnostic code; we must lower our spl again...

Revision 1.38 / (download) - annotate - [select for diffs], Mon Oct 25 10:51:46 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.37: +3 -2 lines
Diff to previous 1.37 (colored) to selected 1.113.4.1 (colored)

Make the SPLUSBCHECK diagnostic test silent durning cold boot.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Oct 12 20:02:48 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored) to selected 1.113.4.1 (colored)

Fix some bugs in USB controller detach code.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Oct 12 11:54:57 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored) to selected 1.113.4.1 (colored)

Add an event mechanism so that a userland process can watch devices come
and go.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Sep 15 21:08:19 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored) to selected 1.113.4.1 (colored)

Change SPLUSBCHECK diagnostic macro a little.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Sep 15 10:25:32 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored) to selected 1.113.4.1 (colored)

Add preliminary (untested) code for detaching the USB host controller
(needed for CardBus based controllers).

Revision 1.33 / (download) - annotate - [select for diffs], Mon Sep 13 21:33:25 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.32: +11 -1 lines
Diff to previous 1.32 (colored) to selected 1.113.4.1 (colored)

* Make sure an aborted pipe is marked as not running.
* Start queued request in the right order.
* Insert some more DIAGNOSTIC sanity checks.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Sep 13 19:49:41 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored) to selected 1.113.4.1 (colored)

Make sure timeouts count as interrupt context too.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 13 19:18:18 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.30: +6 -1 lines
Diff to previous 1.30 (colored) to selected 1.113.4.1 (colored)

Rearrange the code a little so we can decide if we are in process
or interrupt context in a reliable way.  Mainly used for DIAGNOSTIC.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Sep 11 08:19:27 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.29: +5 -13 lines
Diff to previous 1.29 (colored) to selected 1.113.4.1 (colored)

* Move DMA buffer allocation to HC independent code.
* Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Sep 9 12:26:48 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.28: +39 -12 lines
Diff to previous 1.28 (colored) to selected 1.113.4.1 (colored)

Change the internal API to allow DMA buffers to be pre-allocated by
the device driver instead of happening automagically in the HC driver.
This affects both the HC-USBD interface as well as the USBD-device
interface.
This change will allow DMA buffers to be reused e.g. in isochronous
traffic.

Add isochronous support to the UHCI driver (not for OHCI yet).

Revision 1.28 / (download) - annotate - [select for diffs], Sun Sep 5 19:32:19 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored) to selected 1.113.4.1 (colored)

Change the way the `struct device' base part of all driver softc are
declared and accessed to make it more portable.  Idea from Nick Hibma, FreeBSD.
No functional changes.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Aug 29 17:57:25 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored) to selected 1.113.4.1 (colored)

Since we poll around the `done' member of a usbd_request, make it volatile.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Aug 28 21:42:35 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.113.4.1 (colored)

Change some 'struct device' to 'bdevice'.  From FreeBSD.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Aug 22 20:12:40 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.24: +6 -8 lines
Diff to previous 1.24 (colored) to selected 1.113.4.1 (colored)

Move more of the transfer completion processing to HC independent code.
Fix some problems with transfer abort & timeout.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Aug 17 20:59:04 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored) to selected 1.113.4.1 (colored)

Redo the UHCI data toggle handling.
Make sure data toggles get synchronized on open and
when clearing an endpoint stall.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 17 16:06:21 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.22: +11 -2 lines
Diff to previous 1.22 (colored) to selected 1.113.4.1 (colored)

Make some small changes to make it compile on OpenBSD.

Revision 1.17.2.1.2.2 / (download) - annotate - [select for diffs], Thu Jul 1 23:40:24 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.17.2.1.2.1: +4 -5 lines
Diff to previous 1.17.2.1.2.1 (colored) to branchpoint 1.17.2.1 (colored) next main 1.18 (colored) to selected 1.113.4.1 (colored)

Sync w/ -current.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jun 30 06:44:23 1999 UTC (24 years, 9 months ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.21: +4 -5 lines
Diff to previous 1.21 (colored) to selected 1.113.4.1 (colored)

Totally redo the way device detach is done.  It now uses a kernel event
thread and the config detach method.
Squish a number of space leaks on detach.

Revision 1.17.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:19:31 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.17.2.1: +11 -7 lines
Diff to previous 1.17.2.1 (colored) to selected 1.113.4.1 (colored)

Sync w/ -current.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jun 14 17:09:58 1999 UTC (24 years, 9 months ago) by augustss
Branch: MAIN
Changes since 1.20: +2 -6 lines
Diff to previous 1.20 (colored) to selected 1.113.4.1 (colored)

Get rid of a bunch of code that was part of an old USBDI proposal, but that
is unused in our USB stack.

Once upon a time, when I started writing the USB stack for NetBSD, there
was an effort to make a standard for how USB device drivers should interact
with the rest of the USB stack.  This effort had contributors from just
about all Un*x camps (but not Micro$oft :).  I based my design on one of their
early proposals since I thought it would be a good idea if we could all
share device drivers with a minimum effort.  Shortly after I started my work
all the free Un*x people were thrown out of the USBDI work since we did not
pay the USB membership fee.  Well, some time has passed now and the work of
the standardization group is almost public again.  But alas, the new standard
has grown to be a monster!  I do not want to have this as the basis for the
*BSD USB stack; it is far too complicated.
So, since we are not even close to being compilant with the standard, I've
thrown out some old baggage.

Revision 1.20 / (download) - annotate - [select for diffs], Sun May 16 13:51:05 1999 UTC (24 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.19: +10 -1 lines
Diff to previous 1.19 (colored) to selected 1.113.4.1 (colored)

Add vendor/product/release locators.  Added in frustration as my HID
devices appeared as different devices after some plugging and unplugging. :-)

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 13 23:34:38 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.18: +1 -2 lines
Diff to previous 1.18 (colored) to selected 1.113.4.1 (colored)

Rework the way ukbd attaches itself as the console (again).  We now allow
the code to pick the first USB keyboard instance as the console, ignoring
which USB controller it's on.  Should eventually allow detaching of the
console keyboard.

From Jason Thorpe <thorpej@nas.nasa.gov>

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Thu May 6 19:32:00 1999 UTC (24 years, 10 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored) next main 1.18 (colored) to selected 1.113.4.1 (colored)

pullup 1.17->1.18 (thorpej)

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 6 19:12:23 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored) to selected 1.113.4.1 (colored)

Add a way for machine-dependent code to tell a USB controller that it
has the console input device.  The USB keyboard driver uses this to
attach the first USB keyboard instance as the console keyboard.

Unfortunately, this must still be deferred to autoconfiguration time,
but there's not much we can do about that right now.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jan 10 19:13:16 1999 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.16: +4 -2 lines
Diff to previous 1.16 (colored) to selected 1.113.4.1 (colored)

Some minor updates from FreeBSD.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 8 11:58:26 1999 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.15: +10 -8 lines
Diff to previous 1.15 (colored) to selected 1.113.4.1 (colored)

Various little fixes from the FreeBSD version.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jan 7 02:22:51 1999 UTC (25 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored) to selected 1.113.4.1 (colored)

Fix some FreeBSD compiler warnings.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Dec 30 18:06:25 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored) to selected 1.113.4.1 (colored)

Split usbd_delay_ms() into two functions, one can be used in
device drivers.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Dec 29 16:02:55 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored) to selected 1.113.4.1 (colored)

Do not blindly assume that a device supports language id 0, instead
ask it what languages it supports.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 28 20:14:00 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.11: +4 -2 lines
Diff to previous 1.11 (colored) to selected 1.113.4.1 (colored)

Change the host controller internal API a little and add some incomplete
support for isochronous transfers.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 26 12:53:04 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.10: +23 -7 lines
Diff to previous 1.10 (colored) to selected 1.113.4.1 (colored)

Merge changes to make the USB stack work with FreeBSD.  The original
diffs from Nick Hibma <n_hibma@freebsd.org>, but with substantial
changes from me.
XXX Not tested on FreeBSD yet.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Dec 9 00:18:12 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.9: +5 -8 lines
Diff to previous 1.9 (colored) to selected 1.113.4.1 (colored)

Improvement to the ugen driver.
Better error checking.
Some code rearrengment.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Dec 2 22:57:08 1998 UTC (25 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.8: +7 -3 lines
Diff to previous 1.8 (colored) to selected 1.113.4.1 (colored)

Add configuration and interface locators.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Nov 25 22:32:05 1998 UTC (25 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored) to selected 1.113.4.1 (colored)

Make the copyright header conform to the NetBSD template.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Aug 2 22:30:53 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored) to selected 1.113.4.1 (colored)

Improve some error messages.
Make some preparations for isochronous transfers.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 1 18:16:20 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored) to selected 1.113.4.1 (colored)

Switch from a global flag to tell if the host controller should use
polling to a local one for each controller.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jul 26 17:42:49 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored) to selected 1.113.4.1 (colored)

A first stab att supporting console access with a USB keyboard.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jul 25 15:22:11 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored) to selected 1.113.4.1 (colored)

Add an ioctl() to get host controller statistics.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jul 24 21:02:51 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored) to selected 1.113.4.1 (colored)

Make sure requests are aborted properly when the pipe is aborted.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jul 22 12:22:09 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored) to selected 1.113.4.1 (colored)

Loop over all configurations when trying to probe for interface drivers.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jul 12 19:52:01 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Diff to selected 1.113.4.1 (colored)

Add USB support.  Supported so far:
* UHCI and OHCI host controllers on PCI
* Hubs
* HID devices withe special drivers for mouse and keyboard
* Printers

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>