The NetBSD Project

CVS log for src/sys/dev/usb/uhci.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.318.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 2 05:57:05 2025 UTC (15 months, 2 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.318: preferred, colored; next MAIN 1.319: preferred, colored
Changes since revision 1.318: +5 -9 lines
Sync with HEAD

Revision 1.320: download - view: text, markup, annotated - select for diffs
Sat Apr 26 07:06:53 2025 UTC (18 months, 3 weeks ago) by skrll
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, perseant-exfatfs-base-20250801, netbsd-11-base, netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1, netbsd-11, HEAD
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +3 -3 lines
A USBHIST (aka KERNHIST) fix from sc.dying on current-users.

Revision 1.319: download - view: text, markup, annotated - select for diffs
Sun Oct 6 14:08:58 2024 UTC (2 years, 1 month ago) by jakllsch
Branches: MAIN
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +4 -8 lines
Simplify/optimize usb_syncmem() in uhci_device_isoc_done()

Matches ohci(4)

Revision 1.318: download - view: text, markup, annotated - select for diffs
Fri Apr 5 18:57:10 2024 UTC (2 years, 7 months ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base
Branch point for: perseant-exfatfs
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +4 -4 lines
usb *hci: Always set ux_status before usbd_xfer_schedule_timeout.

Add an assert to usbd_xfer_schedule_timeout to enforce this.

Since access to ux_status is serialized by the bus lock, and nothing
releases the bus lock in the interim, this doesn't make a functional
change.  But it does reduce confusion by readers, who no longer have
to worry if some callers got the order wrong.  It could also now
potentially be factored out in a subsequent commit.

Revision 1.317: download - view: text, markup, annotated - select for diffs
Sun Feb 4 05:43:06 2024 UTC (2 years, 9 months ago) by mrg
Branches: MAIN
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +3 -3 lines
update my email address.

Revision 1.316: download - view: text, markup, annotated - select for diffs
Wed Aug 17 20:03:05 2022 UTC (4 years, 3 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, 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
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +3 -3 lines
uhci(4): Fix wrong lock in callout_halt in uhci_suspend.

Maybe this should just be unconditional and outside the lock to make
it simpler.

Found by code inspection.  Maybe someone should test uhci suspend
resume...

Revision 1.315: download - view: text, markup, annotated - select for diffs
Sun Mar 13 11:29:46 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +3 -6 lines
uhci(4): Stop taking the intr lock in uhci_run.

Not needed for anything here.

Revision 1.314: download - view: text, markup, annotated - select for diffs
Sun Mar 13 11:29:38 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +11 -14 lines
uhci(4): Simplify uhci_run.

`locked' is always 0 now.

No functional change intended.

Revision 1.313: download - view: text, markup, annotated - select for diffs
Sun Mar 13 11:29:31 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +20 -24 lines
uhci(4): Fix synchronization between suspend/resume and poll hub.

- sc_intr_lock is not relevant to anything here -- stop using it.
- Never schedule the callout while suspended.
- Don't futz with usepolling; it makes sense only when all other CPUs
  and threads are quiesced, which is not the case here.

Revision 1.312: download - view: text, markup, annotated - select for diffs
Wed Mar 9 22:17:41 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +2 -4 lines
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.311: download - view: text, markup, annotated - select for diffs
Thu Mar 3 06:12:11 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +17 -33 lines
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.310: download - view: text, markup, annotated - select for diffs
Thu Mar 3 06:08:50 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +2 -7 lines
usb: Factor usb_transfer_complete out of ubm_abortx method.

Revision 1.309: download - view: text, markup, annotated - select for diffs
Thu Mar 3 06:04:31 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +6 -62 lines
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.308: download - view: text, markup, annotated - select for diffs
Tue Dec 21 09:51:22 2021 UTC (4 years, 10 months ago) by skrll
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +7 -7 lines
Change the usb_mem API to take a bus_dma_tag_t in usb_allocmem instead of
a struct usbd_bus *.

This allows an HCD to use more than one tag.

Revision 1.307: download - view: text, markup, annotated - select for diffs
Mon Oct 4 21:02:39 2021 UTC (5 years, 1 month ago) by andvar
Branches: MAIN
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +3 -3 lines
remove duplicate the article in comments.

Revision 1.304.2.2: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:28:50 2021 UTC (5 years, 7 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.304.2.1: preferred, colored; next MAIN 1.305: preferred, colored
Changes since revision 1.304.2.1: +6 -10 lines
Sync with HEAD.

Revision 1.306: download - view: text, markup, annotated - select for diffs
Tue Jan 5 18:00:21 2021 UTC (5 years, 10 months ago) by skrll
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +6 -10 lines
More converstion from usbd_status to int for function error reporting.
This time it's the turn of usb_allocmem.

Revision 1.304.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 3 16:35:02 2021 UTC (5 years, 10 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +2 -3 lines
Sync w/ HEAD.

Revision 1.288.4.3: download - view: text, markup, annotated - select for diffs
Wed Dec 23 12:34:38 2020 UTC (5 years, 10 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-5-RELEASE, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Diff to: previous 1.288.4.2: preferred, colored; branchpoint 1.288: preferred, colored; next MAIN 1.289: preferred, colored
Changes since revision 1.288.4.2: +2 -3 lines
Pull up following revision(s) (requested by riastradh in ticket #1159):

	sys/dev/usb/ohci.c: revision 1.314
	sys/external/bsd/dwc2/dwc2.c: revision 1.75
	sys/dev/usb/ehci.c: revision 1.284
	sys/dev/usb/uhci.c: revision 1.305
	sys/dev/usb/xhci.c: revision 1.136

usb: Omit bogus assertions about struct usbd_pipe::up_intrxfer.

These assertions were only valid for pipes at UE_IN_DIR, UE_INTERRUPT
endpoints created with usbd_open_pipe_intr, which uses up_intrxfer to
pass the struct usbd_xfer object to usbd_close_pipe to free later.

In contrast, for pipes at UE_OUT_DIR, UE_INTERRUPT endpoints,
up_intrxfer is never initialized, so the assertion cannot be right.
In principle we might even have more than one outstanding interrupt
transfer at a time, rendering the point of the assertion moot anyway.

Found by interrupting a uhidev write to a u2f device.

ok nick

Revision 1.305: download - view: text, markup, annotated - select for diffs
Tue Dec 22 01:07:23 2020 UTC (5 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +2 -3 lines
usb: Omit bogus assertions about struct usbd_pipe::up_intrxfer.

These assertions were only valid for pipes at UE_IN_DIR, UE_INTERRUPT
endpoints created with usbd_open_pipe_intr, which uses up_intrxfer to
pass the struct usbd_xfer object to usbd_close_pipe to free later.

In contrast, for pipes at UE_OUT_DIR, UE_INTERRUPT endpoints,
up_intrxfer is never initialized, so the assertion cannot be right.
In principle we might even have more than one outstanding interrupt
transfer at a time, rendering the point of the assertion moot anyway.

Found by interrupting a uhidev write to a u2f device.

ok nick

Revision 1.304: download - view: text, markup, annotated - select for diffs
Tue Jul 7 10:02:17 2020 UTC (6 years, 4 months ago) by skrll
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +11 -10 lines
KASSERT polling or holding sc_lock in a few more places.

kern/52569: Entering ddb using USB keyboard panics with "locking against myself"

Revision 1.303: download - view: text, markup, annotated - select for diffs
Tue May 26 07:03:22 2020 UTC (6 years, 5 months ago) by skrll
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +5 -5 lines
Copyright maintenance

Revision 1.302: download - view: text, markup, annotated - select for diffs
Mon May 25 13:55:31 2020 UTC (6 years, 5 months ago) by skrll
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +32 -7 lines
Be more careful with transfer descriptors and crossing page boundaries

Enable USBMALLOC_MULTISEG

Revision 1.301: download - view: text, markup, annotated - select for diffs
Fri May 15 06:15:42 2020 UTC (6 years, 6 months ago) by skrll
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +5 -4 lines
Update ux_length in usbd_setup_isoc_xfer and use this to usb_syncmem
in the HCDs

Revision 1.280.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:13 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.280.2.1: preferred, colored; branchpoint 1.280: preferred, colored; next MAIN 1.281: preferred, colored
Changes since revision 1.280.2.1: +140 -151 lines
Merge changes from current as of 20200406

Revision 1.300: download - view: text, markup, annotated - select for diffs
Sun Apr 5 20:59:38 2020 UTC (6 years, 7 months ago) by skrll
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +10 -8 lines
Switch USB to use non-coherent buffers for data transfers in the
same way as OpenBSD.

The use of coherent (uncacheable on ARM and other arches) mappings
for transfer buffers impacts performance, espcially where memcpys
are involved.

Audit the necessary usb_syncmem operations - a few were missing.

Revision 1.299: download - view: text, markup, annotated - select for diffs
Sun Mar 15 15:00:14 2020 UTC (6 years, 8 months ago) by skrll
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +3 -3 lines
Fix a comment

Revision 1.298: download - view: text, markup, annotated - select for diffs
Sun Mar 15 14:58:54 2020 UTC (6 years, 8 months ago) by skrll
Branches: MAIN
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +6 -4 lines
Move some comments

Revision 1.297: download - view: text, markup, annotated - select for diffs
Sun Mar 15 13:59:20 2020 UTC (6 years, 8 months ago) by skrll
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +4 -4 lines
Use howmany.  NFCI.

Revision 1.296: download - view: text, markup, annotated - select for diffs
Sat Mar 14 02:35:33 2020 UTC (6 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +17 -17 lines
revert the 0x% -> %# change for fixed width formats pointed out by uwe.

Revision 1.295: download - view: text, markup, annotated - select for diffs
Fri Mar 13 18:17:40 2020 UTC (6 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +19 -19 lines
PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log

Revision 1.288.4.2: download - view: text, markup, annotated - select for diffs
Sun Mar 1 12:35:16 2020 UTC (6 years, 8 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-1-RELEASE
Diff to: previous 1.288.4.1: preferred, colored; branchpoint 1.288: preferred, colored
Changes since revision 1.288.4.1: +123 -139 lines
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.288.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:16 2020 UTC (6 years, 8 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.288: preferred, colored; next MAIN 1.289: preferred, colored
Changes since revision 1.288: +124 -139 lines
Sync with head.

Revision 1.275.2.6: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:52:44 2020 UTC (6 years, 8 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.275.2.5: preferred, colored; branchpoint 1.275: preferred, colored; next MAIN 1.276: preferred, colored
Changes since revision 1.275.2.5: +3 -2 lines
Pull up following revision(s) (requested by skrll in ticket #1507):

	sys/dev/usb/ohci.c: revision 1.296
	sys/dev/usb/uhci.c: revision 1.294
	sys/external/bsd/dwc2/dwc2.c: revision 1.72
	sys/arch/mips/adm5120/dev/ahci.c: revision 1.21
	sys/dev/usb/ehci.c: revision 1.274

Fix a memory leak.  Spotted by nat@

Revision 1.288.4.1: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:50:29 2020 UTC (6 years, 8 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +3 -2 lines
Pull up following revision(s) (requested by skrll in ticket #718):

	sys/dev/usb/ohci.c: revision 1.296
	sys/dev/usb/uhci.c: revision 1.294
	sys/external/bsd/dwc2/dwc2.c: revision 1.72
	sys/arch/mips/adm5120/dev/ahci.c: revision 1.21
	sys/dev/usb/ehci.c: revision 1.274

Fix a memory leak.  Spotted by nat@

Revision 1.294: download - view: text, markup, annotated - select for diffs
Fri Feb 21 12:41:29 2020 UTC (6 years, 8 months ago) by skrll
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +3 -2 lines
Fix a memory leak.  Spotted by nat@

Revision 1.293: download - view: text, markup, annotated - select for diffs
Sat Feb 15 01:21:56 2020 UTC (6 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +5 -4 lines
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!)

Revision 1.292: download - view: text, markup, annotated - select for diffs
Fri Feb 14 16:47:28 2020 UTC (6 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +5 -4 lines
Set ux_isdone in uhci_poll_hub for DIAGNOSTIC.

Revision 1.291: download - view: text, markup, annotated - select for diffs
Fri Feb 14 16:47:11 2020 UTC (6 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +5 -3 lines
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:
https://mail-index.NetBSD.org/current-users/2020/02/13/msg037740.html

Revision 1.290: download - view: text, markup, annotated - select for diffs
Wed Feb 12 16:02:01 2020 UTC (6 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +93 -23 lines
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.

Revision 1.289: download - view: text, markup, annotated - select for diffs
Wed Feb 12 16:01:00 2020 UTC (6 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +28 -118 lines
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.280.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:34 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +120 -100 lines
Sync with HEAD

Revision 1.288: download - view: text, markup, annotated - select for diffs
Sun Feb 17 04:17:52 2019 UTC (7 years, 9 months ago) by rin
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: netbsd-9, ad-namecache
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +7 -5 lines
Fix assertion failures triggered by usbdi.c,v 1.182, when devices
are detached.

This is because xfers of USBD_NOT_STARTED can be removed from queue
in an invisible way to host controller drivers.

Discussed on tech-kern.

Revision 1.287: download - view: text, markup, annotated - select for diffs
Thu Feb 7 12:35:43 2019 UTC (7 years, 9 months ago) by skrll
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +5 -8 lines
join lines. NFC.

Revision 1.286: download - view: text, markup, annotated - select for diffs
Tue Jan 22 15:02:33 2019 UTC (7 years, 9 months ago) by skrll
Branches: MAIN
CVS tags: pgoyette-compat-20190127
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +2 -3 lines
Revert the KASSERT

Revision 1.285: download - view: text, markup, annotated - select for diffs
Tue Jan 22 06:42:33 2019 UTC (7 years, 9 months ago) by skrll
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +3 -2 lines
Add a KASSERT

Revision 1.279.2.3: download - view: text, markup, annotated - select for diffs
Sun Sep 30 01:45:51 2018 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.279.2.2: preferred, colored; branchpoint 1.279: preferred, colored; next MAIN 1.280: preferred, colored
Changes since revision 1.279.2.2: +18 -11 lines
Ssync with HEAD

Revision 1.275.2.5: download - view: text, markup, annotated - select for diffs
Thu Sep 27 14:52:26 2018 UTC (8 years, 1 month ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.275.2.4: preferred, colored; branchpoint 1.275: preferred, colored
Changes since revision 1.275.2.4: +19 -10 lines
Pull up following revision(s) (requested by mrg in ticket #1037):

	sys/dev/usb/uhub.c: revision 1.139
	sys/external/bsd/dwc2/dwc2.c: revision 1.55
	sys/ddb/db_output.c: revision 1.34
	sys/ddb/db_command.c: revision 1.160
	sys/dev/usb/ehci.c: revision 1.264
	sys/dev/usb/xhci.c: revision 1.99
	sys/dev/usb/ehci.c: revision 1.265
	sys/kern/subr_userconf.c: revision 1.27
	sys/dev/usb/ehcivar.h: revision 1.46
	sys/dev/usb/ohci.c: revision 1.287
	sys/dev/usb/uhci.c: revision 1.284
	sys/dev/usb/usbdi.c: revision 1.178
	sys/dev/usb/usb.c: revision 1.172
	sys/dev/pci/xhci_pci.c: revision 1.14
	sys/dev/usb/usb.c: revision 1.173
	sys/dev/usb/usb.c: revision 1.174
	share/man/man4/usb.4: revision 1.110
	sys/ddb/db_command.c: revision 1.159
	sys/dev/usb/usb_subr.c: revision 1.227
	sys/dev/usb/uhcivar.h: revision 1.56
	(all via patch)

consolidate the handling of polling across HC drivers, and generic USB:
- don't take mutexes if polling
- normalise the code across all drivers
- add some not yet code to block discovery to/from polling
- minor CSE
- adjust comment for usbd_set_polling() to reality now i properly
  understand what it is used for and why.

this, with a hack to make RB_ASKNAME to wait 5 seconds allows boot -a
work with USB keyboards.  there are still multiple issues remaining:
- discovery and polling need to be mutually exclusive
- attachment of ukbd and wskbd is not handled by config_pending, and
  the 5 second delay isn't going to always be enough.

call cnpollc(1) and cnpollc(0) around cngetc().
(christos has a good idea to add a function that does all 3,
and we should switch all the callers in this sequence to use
it (and fix the MD ones missing it still).  not all can, as
eg, line-grabbing functions can use cngetsn(), which only
calls cnpollc() twice.)


When this file is used when not building the kernel (eg: /usr/sbin/crash)
make cnpollc() go away.


reorder some struct members to remove holes.


add config_pending usage to uhub and general USB device attachment.
- call config_pending_incr() and config_pending_decr() around attaching
  devices against "usbdevif" attribute.

uhub:
- convert sc_explorepending and sc_running to bool.  add new sc_first_explore.
- call config_pending_incr() at the start of uhub_attach().  dropped in
  uhub_explore(), if this is the first explore.


implement a gross hack to fix "boot -a" on systems with usb keyboards on
systems with ehci handover to uhci (and maybe ohci), and fix a similar
problem for "boot -s".

there is effort to ensure that all devices attached via USB are probed
before RB_ASKNAME or RB_SINGLE attempts to ask any questions on the console,
and largely this works, often by chance, today, for USB disks and root.
i've recently pushed this more into uhub and general USB device attachment
as well, and kept a config_pending reference across the first explore of
a bus.  these fix many issues with directly attached hubs.

however, on systems where devices connected to ehci ports are handed over
to a companion uhci or ohci port, it may not be the first, or even second,
bus explore that finds the device finally before attachment, and at this
point all config_pending references are dropped.

there is no direct communication between drivers, the potentials are
looked up but their device_t is only used for generic things like the name,
so informing the correct companion to expect a device and deal with the
config_pending references is not possible without some fairly ugly layer
violations or multi-level callbacks (eg, we have "ehci0", and usually an
the relevant companion, eg, "uhci2", but it is the uhub that uhci2 has
attached that will deal with the device attachment.)

with the above fixes to generic USB code, the disown happens during the
first explore.  the hack works by, at this point, checking if (a) root
is not mounted, (b) single user or ask name are set, and (c) if the hack
as not been triggered already.  if all 3 conditions are true, then a
config_pending_incr() is called and a callback is triggered for (default)
5 seconds to call config_pending_decr().  ehci detach pauses waiting for
this callback if scheduled.

this allows enough time for the uhub and the ukbd/wskbd to attach before
the RK_ASKROOT prompts appear.  testing shows it takes between 1.5 and
2 seconds for the keyboard to appear after the disown occurs.

Index: dev/usb/ehcivar.c
- new sc_compcallout, sc_compcallout, sc_complock, and a state for th
  handover hack.

Index: dev/usb/ehci.c
ehci_init():
- use aprint_normal_dev() instead of manual device_xname().
- initialise sc_compcallout, sc_compcallout, sc_complock, and sc_comp_state.
ehci_detach():
- if there are companion controllers, tear own the above, including waiting
  if there is a callback scheduled.
ehci_disown_callback():
- new callout to call config_pending_decr() in the the future.
  schedule this ca
ehci_disown_sched_callback():
- if booting to single user or asking names, call config_pending_incr() and
  schedule the callout above, default 5 second delay.
ehci_disown():
- if disowning a port call ehci_disown_sched_callback().
deal with partial attach failures in usb_attach vs usb_detach aka PR 53598.
- make sure xhci's sc->sc_ios is NULL if failure happens.
- rearrange usb_attach() / usb_doattach() to make it simpler to clean up.
- move usb_async_intr softint into usb_once_init().  previously, each USB
  controller would start a new one, and leave the old one leaked.
- handle controller interrupts without a bus attached


remove usb(4)'s "flags 1" code.  it has been dead for a while,
as it runs during the interrupts part of configuration now,
and all the devices try attach as early as possible, including
any root or boot required disk or keyboard device, which is
what this flag was for.

Revision 1.284: download - view: text, markup, annotated - select for diffs
Sun Sep 16 20:21:56 2018 UTC (8 years, 2 months ago) by mrg
Branches: MAIN
CVS tags: pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +18 -11 lines
consolidate the handling of polling across HC drivers, and generic USB:
- don't take mutexes if polling
- normalise the code across all drivers
- add some not yet code to block discovery to/from polling
- minor CSE
- adjust comment for usbd_set_polling() to reality now i properly
  understand what it is used for and why.

this, with a hack to make RB_ASKNAME to wait 5 seconds allows boot -a
work with USB keyboards.  there are still multiple issues remaining:
- discovery and polling need to be mutually exclusive
- attachment of ukbd and wskbd is not handled by config_pending, and
  the 5 second delay isn't going to always be enough.

Revision 1.279.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:04 2018 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.279.2.1: preferred, colored; branchpoint 1.279: preferred, colored
Changes since revision 1.279.2.1: +97 -83 lines
Sync with HEAD

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

Revision 1.283: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:29:34 2018 UTC (8 years, 2 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-compat-0906
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +4 -4 lines
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.264.2.4: download - view: text, markup, annotated - select for diffs
Sat Aug 25 14:57:35 2018 UTC (8 years, 2 months ago) by martin
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.264.2.3: preferred, colored; branchpoint 1.264: preferred, colored; next MAIN 1.265: preferred, colored
Changes since revision 1.264.2.3: +92 -79 lines
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.275.2.4: download - view: text, markup, annotated - select for diffs
Sat Aug 25 11:29:52 2018 UTC (8 years, 2 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.275.2.3: preferred, colored; branchpoint 1.275: preferred, colored
Changes since revision 1.275.2.3: +92 -79 lines
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.282: download - view: text, markup, annotated - select for diffs
Thu Aug 9 21:16:43 2018 UTC (8 years, 3 months ago) by prlw1
Branches: MAIN
CVS tags: jdolecek-ncqfixes-base, jdolecek-ncqfixes
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +3 -3 lines
Sprinkle __diagused

Revision 1.281: download - view: text, markup, annotated - select for diffs
Thu Aug 9 06:26:47 2018 UTC (8 years, 3 months ago) by mrg
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +95 -81 lines
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.279.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 16 02:00:02 2018 UTC (8 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +2 -15 lines
Sync with HEAD, resolve some conflicts

Revision 1.280: download - view: text, markup, annotated - select for diffs
Mon Apr 9 16:21:11 2018 UTC (8 years, 7 months ago) by jakllsch
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415
Branch point for: phil-wifi
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +2 -15 lines
Stop potential misuse of vendor names and USB vendor IDs in root hub
device and string descriptors.

Firstly: Few vendors have identical PCI-SIG vendor IDs and USB-IF vendor
IDs.  As such, using the PCI vendor ID as a USB vendor ID may trample
on whomever is allocated that USB vendor ID.

Secondly: The vendor of the host controller hardware implementation has
little to nothing to do with our usbroothub implementation.  Thus we
should not potentially associate any problems therewith to such third
party.

This change will result in root hubs being identified by USB Vendor ID
0x0000.  Root hub vendor string will now be "NetBSD" (or, specifically:
ostype). Product ID (0x0000) and product strings remain unchanged.

Revision 1.264.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 3 20:02:37 2018 UTC (8 years, 10 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.264.2.2: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.2: +3 -3 lines
Pull up following revision(s) (requested by skrll in ticket #1529):
	sys/dev/usb/ehci.c: revision 1.257
	sys/dev/usb/motg.c: revision 1.19
	sys/dev/usb/ohci.c: revision 1.276
	sys/dev/usb/uhci.c: revision 1.279
	sys/dev/usb/xhci.c: revision 1.77
	sys/external/bsd/dwc2/dwc2.c: revision 1.47
s/PR_NOWAIT/PR_WAITOK/ in HCD allocx (allocate xfer) method

Revision 1.249.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:34 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.249.2.3: preferred, colored; branchpoint 1.249: preferred, colored; next MAIN 1.250: preferred, colored
Changes since revision 1.249.2.3: +1557 -1600 lines
update from HEAD

Revision 1.275.2.3: download - view: text, markup, annotated - select for diffs
Thu Nov 23 13:29:32 2017 UTC (8 years, 11 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.275.2.2: preferred, colored; branchpoint 1.275: preferred, colored
Changes since revision 1.275.2.2: +3 -3 lines
Pull up following revision(s) (requested by skrll in ticket #385):
	sys/dev/usb/xhci.c: revision 1.77
	sys/external/bsd/dwc2/dwc2.c: revision 1.47
	sys/dev/usb/motg.c: revision 1.19
	sys/dev/usb/ehci.c: revision 1.257
	sys/dev/usb/ohci.c: revision 1.276
	sys/dev/usb/uhci.c: revision 1.279

s/PR_NOWAIT/PR_WAITOK/ in HCD allocx (allocate xfer) method

Revision 1.279: download - view: text, markup, annotated - select for diffs
Fri Nov 17 08:22:02 2017 UTC (9 years ago) by skrll
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +3 -3 lines
s/PR_NOWAIT/PR_WAITOK/ in HCD allocx (allocate xfer) method

Revision 1.278: download - view: text, markup, annotated - select for diffs
Thu Nov 16 21:54:51 2017 UTC (9 years ago) by christos
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +6 -4 lines
don't lock if we are polling because we are already holding a spin lock
from uhci_poll().

Revision 1.275.2.2: download - view: text, markup, annotated - select for diffs
Thu Nov 2 21:29:52 2017 UTC (9 years ago) by snj
Branches: netbsd-8
CVS tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.275.2.1: preferred, colored; branchpoint 1.275: preferred, colored
Changes since revision 1.275.2.1: +100 -93 lines
Pull up following revision(s) (requested by pgoyette in ticket #335):
	share/man/man9/kernhist.9: 1.5-1.8
	sys/arch/acorn26/acorn26/pmap.c: 1.39
	sys/arch/arm/arm32/fault.c: 1.105 via patch
	sys/arch/arm/arm32/pmap.c: 1.350, 1.359
	sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7
	sys/arch/arm/omap/if_cpsw.c: 1.20
	sys/arch/arm/omap/tiotg.c: 1.7
	sys/arch/evbarm/conf/RPI2_INSTALL: 1.3
	sys/dev/ic/sl811hs.c: 1.98
	sys/dev/usb/ehci.c: 1.256
	sys/dev/usb/if_axe.c: 1.83
	sys/dev/usb/motg.c: 1.18
	sys/dev/usb/ohci.c: 1.274
	sys/dev/usb/ucom.c: 1.119
	sys/dev/usb/uhci.c: 1.277
	sys/dev/usb/uhub.c: 1.137
	sys/dev/usb/umass.c: 1.160-1.162
	sys/dev/usb/umass_quirks.c: 1.100
	sys/dev/usb/umass_scsipi.c: 1.55
	sys/dev/usb/usb.c: 1.168
	sys/dev/usb/usb_mem.c: 1.70
	sys/dev/usb/usb_subr.c: 1.221
	sys/dev/usb/usbdi.c: 1.175
	sys/dev/usb/usbdi_util.c: 1.67-1.70
	sys/dev/usb/usbroothub.c: 1.3
	sys/dev/usb/xhci.c: 1.75
	sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34
	sys/kern/kern_history.c: 1.15
	sys/kern/kern_xxx.c: 1.74
	sys/kern/vfs_bio.c: 1.275-1.276
	sys/miscfs/genfs/genfs_io.c: 1.71
	sys/sys/kernhist.h: 1.21
	sys/ufs/ffs/ffs_balloc.c: 1.63
	sys/ufs/lfs/lfs_vfsops.c: 1.361
	sys/ufs/lfs/ulfs_inode.c: 1.21
	sys/ufs/lfs/ulfs_vnops.c: 1.52
	sys/ufs/ufs/ufs_inode.c: 1.102
	sys/ufs/ufs/ufs_vnops.c: 1.239
	sys/uvm/pmap/pmap.c: 1.37-1.39
	sys/uvm/pmap/pmap_tlb.c: 1.22
	sys/uvm/uvm_amap.c: 1.108
	sys/uvm/uvm_anon.c: 1.64
	sys/uvm/uvm_aobj.c: 1.126
	sys/uvm/uvm_bio.c: 1.91
	sys/uvm/uvm_device.c: 1.66
	sys/uvm/uvm_fault.c: 1.201
	sys/uvm/uvm_km.c: 1.144
	sys/uvm/uvm_loan.c: 1.85
	sys/uvm/uvm_map.c: 1.353
	sys/uvm/uvm_page.c: 1.194
	sys/uvm/uvm_pager.c: 1.111
	sys/uvm/uvm_pdaemon.c: 1.109
	sys/uvm/uvm_swap.c: 1.175
	sys/uvm/uvm_vnode.c: 1.103
	usr.bin/vmstat/vmstat.c: 1.219
Reorder to test for null before null deref in debug code
--
Reorder to test for null before null deref in debug code
--
KNF
--
No need for '\n' in UVMHIST_LOG
--
normalise a BIOHIST log message
--
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in
   the kernel and in the structures used for exporting the history data
   to userland via sysctl(9).  This avoids problems on some architectures
   where passing a 64-bit (or larger) value to printf(3) can cause it to
   process the value as multiple arguments.  (This can be particularly
   problematic when printf()'s format string is not a literal, since in
   that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to
   include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings
   updated.  Each format specifier now includes an explicit length
   modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings
   updated to replace uses of "%p" with "%#jx", and the pointer
   arguments are now cast to (uintptr_t) before being subsequently cast
   to (uintmax_t).  This is needed to avoid compiler warnings about
   casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or
   "%c" format strings replaced with numeric formats; several instances
   of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the
   history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with
   the -u option does not exist (previously, this condition was silently
   ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the
   data exported via sysctl(9) and exits if they do not match the values
   with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional
   requirements imposed on the format strings, along with several other
   minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example,
     uint64_t) for the history arguments.  But that would require another
     "rototill" of all the users in the future when we add support for an
     architecture that supports a larger size.  Also, the printf(3)
format
     specifiers for explicitly-sized values, such as "%"PRIu64, are much
     more verbose (and less aesthetically appealing, IMHO) than simply
     using "%ju".
[2] I've tried very hard to find "all [the] existing users of
kernhist(9)"
     but it is possible that I've missed some of them.  I would be glad
to
     update any stragglers that anyone identifies.
--
For some reason this single kernel seems to have outgrown its declared
size as a result of the kernhist(9) changes.  Bump the size.
XXX The amount of increase may be excessive - anyone with more detailed
XXX knowledge please feel free to further adjust the value
appropriately.
--
Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit
--
And yet another one.  :(
--
Use correct mark-up for NetBSD version.
--
More improvements in grammar and readability.
--
Remove a stray '"' (obvious typo) and add a couple of casts that are
probably needed.
--
And replace an instance of "%p" conversion with "%#jx"
--
Whitespace fix. Give Bl tag table a width. Fix Xr.

Revision 1.277: download - view: text, markup, annotated - select for diffs
Sat Oct 28 00:37:12 2017 UTC (9 years ago) by pgoyette
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +100 -93 lines
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
  the kernel and in the structures used for exporting the history data
  to userland via sysctl(9).  This avoids problems on some architectures
  where passing a 64-bit (or larger) value to printf(3) can cause it to
  process the value as multiple arguments.  (This can be particularly
  problematic when printf()'s format string is not a literal, since in
  that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
  include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
  updated.  Each format specifier now includes an explicit length
  modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
  updated to replace uses of "%p" with "%#jx", and the pointer
  arguments are now cast to (uintptr_t) before being subsequently cast
  to (uintmax_t).  This is needed to avoid compiler warnings about
  casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
  "%c" format strings replaced with numeric formats; several instances
  of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
  history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
  the -u option does not exist (previously, this condition was silently
  ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
  data exported via sysctl(9) and exits if they do not match the values
  with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
  requirements imposed on the format strings, along with several other
  minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
    uint64_t) for the history arguments.  But that would require another
    "rototill" of all the users in the future when we add support for an
    architecture that supports a larger size.  Also, the printf(3) format
    specifiers for explicitly-sized values, such as "%"PRIu64, are much
    more verbose (and less aesthetically appealing, IMHO) than simply
    using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
    but it is possible that I've missed some of them.  I would be glad to
    update any stragglers that anyone identifies.

Revision 1.264.4.80: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:28 2017 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.79: preferred, colored; branchpoint 1.264: preferred, colored; next MAIN 1.265: preferred, colored
Changes since revision 1.264.4.79: +16 -14 lines
Sync with HEAD

Revision 1.275.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 25 01:39:41 2017 UTC (9 years, 3 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +16 -12 lines
Pull up following revision(s) (requested by skrll in ticket #136):
	sys/dev/usb/uhci.c: revision 1.276
Only call uhci_free_stds if there are TDs to free.
In uhci_alloc_std_chain ensure we fill the TD array correctly and note
the number of allocated TDs so that uhci_free_stds will do the right thing
Fixes a problem seen by anon

Revision 1.264.2.2: download - view: text, markup, annotated - select for diffs
Sun Jul 23 06:11:47 2017 UTC (9 years, 3 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.264.2.1: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.1: +16 -12 lines
Pull up following revision(s) (requested by skrll in ticket #1456):
	sys/dev/usb/uhci.c: revision 1.276
Only call uhci_free_stds if there are TDs to free.
In uhci_alloc_std_chain ensure we fill the TD array correctly and note
the number of allocated TDs so that uhci_free_stds will do the right thing
Fixes a problem seen by anon

Revision 1.276: download - view: text, markup, annotated - select for diffs
Fri Jul 14 10:37:05 2017 UTC (9 years, 4 months ago) by skrll
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +16 -12 lines
Only call uhci_free_stds if there are TDs to free.

In uhci_alloc_std_chain ensure we fill the TD array correctly and note
the number of allocated TDs so that uhci_free_stds will do the right thing

Fixes a problem seen by anon

Revision 1.275: download - view: text, markup, annotated - select for diffs
Thu Jun 1 02:45:12 2017 UTC (9 years, 5 months ago) by chs
Branches: MAIN
CVS tags: netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +2 -4 lines
remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.264.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 5 19:54:20 2017 UTC (9 years, 7 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +1543 -1597 lines
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.273.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:42 2017 UTC (9 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.273: preferred, colored; next MAIN 1.274: preferred, colored
Changes since revision 1.273: +3 -3 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.264.4.79: download - view: text, markup, annotated - select for diffs
Wed Dec 28 10:25:06 2016 UTC (9 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.78: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.78: +59 -43 lines
Improve transfer abort

Revision 1.264.4.78: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:18 2016 UTC (9 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.77: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.77: +3 -3 lines
Sync with HEAD

Revision 1.274: download - view: text, markup, annotated - select for diffs
Sun Dec 4 10:12:35 2016 UTC (9 years, 11 months ago) by skrll
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, nick-nhusb-base-20170204, nick-nhusb-base-20161204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +3 -3 lines
Whitespace

Revision 1.264.8.1: download - view: text, markup, annotated - select for diffs
Tue Sep 6 20:33:09 2016 UTC (10 years, 2 months ago) by skrll
Branches: netbsd-7-nhusb
Diff to: previous 1.264: preferred, colored; next MAIN 1.265: preferred, colored
Changes since revision 1.264: +1543 -1597 lines
First pass at netbsd-7 updated with USB code from HEAD

Revision 1.264.4.77: download - view: text, markup, annotated - select for diffs
Mon May 30 06:51:21 2016 UTC (10 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.76: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.76: +5 -8 lines
Unwrap some lines

Revision 1.264.4.76: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:31 2016 UTC (10 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.75: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.75: +10 -62 lines
Sync with HEAD

Revision 1.273: download - view: text, markup, annotated - select for diffs
Tue May 10 15:14:03 2016 UTC (10 years, 6 months ago) by pooka
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +4 -2 lines
sprinkle _KERNEL_OPT

Revision 1.272: download - view: text, markup, annotated - select for diffs
Fri May 6 20:12:54 2016 UTC (10 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +5 -6 lines
- don't require the lock if we are polling (early autoconf)
- unfold a line

Revision 1.271: download - view: text, markup, annotated - select for diffs
Fri May 6 13:03:06 2016 UTC (10 years, 6 months ago) by skrll
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +2 -55 lines
usb is attached with config_interrupts so we can G/C the code to support
transfers when this wasn't the case.

Revision 1.264.4.75: download - view: text, markup, annotated - select for diffs
Sat Apr 30 10:34:14 2016 UTC (10 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.74: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.74: +4 -4 lines
Move the struct usb_task to struct usbd_xfer for everyone to use.

Revision 1.270: download - view: text, markup, annotated - select for diffs
Mon Apr 25 20:06:51 2016 UTC (10 years, 6 months ago) by joerg
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +3 -3 lines
Don't use uninitialized data variable when len == 0.

Revision 1.269: download - view: text, markup, annotated - select for diffs
Sat Apr 23 13:14:52 2016 UTC (10 years, 6 months ago) by skrll
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +4 -4 lines
Fix non-DIAGNOSTIC build

Revision 1.268: download - view: text, markup, annotated - select for diffs
Sat Apr 23 10:15:32 2016 UTC (10 years, 6 months ago) by skrll
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +1559 -1560 lines
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.264.4.74: download - view: text, markup, annotated - select for diffs
Sat Apr 16 16:02:42 2016 UTC (10 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.73: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.73: +8 -8 lines
Fix usbd_status vs int in *_alloc_*_chain

Revision 1.264.4.73: download - view: text, markup, annotated - select for diffs
Sat Apr 16 15:39:36 2016 UTC (10 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.72: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.72: +4 -2 lines
Don't leak memory in *_alloc_*td_chain if allocation fails.

Revision 1.264.4.72: download - view: text, markup, annotated - select for diffs
Mon Apr 11 08:02:25 2016 UTC (10 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.71: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.71: +7 -6 lines
more build fixes

Revision 1.264.4.71: download - view: text, markup, annotated - select for diffs
Mon Apr 11 07:36:21 2016 UTC (10 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.70: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.70: +3 -4 lines
Fix non UHCI_DEBUG build

Revision 1.264.4.70: download - view: text, markup, annotated - select for diffs
Mon Apr 4 07:43:12 2016 UTC (10 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.69: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.69: +73 -147 lines
Rework {alloc,reset}_*_chain functions to perform all of TD setup in
reset chain.  The initial motivation for this was to fix ZLP.

Revision 1.264.4.69: download - view: text, markup, annotated - select for diffs
Fri Mar 25 17:44:00 2016 UTC (10 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.68: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.68: +3 -4 lines
More __BIT conversion.  No functional change.

Revision 1.264.4.68: download - view: text, markup, annotated - select for diffs
Thu Mar 17 09:04:53 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.67: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.67: +11 -62 lines
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.264.4.67: download - view: text, markup, annotated - select for diffs
Thu Mar 17 07:59:45 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.66: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.66: +3 -3 lines
Protect read of isoc->next with bus lock

Revision 1.264.4.66: download - view: text, markup, annotated - select for diffs
Sun Mar 13 08:09:00 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.65: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.65: +4 -2 lines
KASSERTMSG

Revision 1.267: download - view: text, markup, annotated - select for diffs
Sun Mar 13 07:01:43 2016 UTC (10 years, 8 months ago) by skrll
Branches: MAIN
CVS tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +12 -12 lines
KNF

Revision 1.264.4.65: download - view: text, markup, annotated - select for diffs
Sun Feb 28 16:23:57 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.64: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.64: +12 -12 lines
Use __func__ in printfs

Revision 1.264.4.64: download - view: text, markup, annotated - select for diffs
Sun Feb 28 16:18:15 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.63: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.63: +3 -3 lines
Use __func__ in printf

Revision 1.264.4.63: download - view: text, markup, annotated - select for diffs
Sun Feb 28 09:16:20 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.62: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.62: +6 -46 lines
Centralise the up_repeat handling and use the standard pipe method to
start the next transfer.  This allows the removal of a bunch of code
in the upm_done methods for interrupt transfers which had copies of
the upm_start method code.

At the same time we can perform the upm_done method before calling the
transfer callback allowing correct bus_dma(9) operations before
using the transfer DMA buffer.

Revision 1.264.4.62: download - view: text, markup, annotated - select for diffs
Sat Feb 27 16:07:01 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.61: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.61: +4 -3 lines
In uhci_device_isoc_enter define

	struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);

and use it.  No functionaly change.

Revision 1.264.4.61: download - view: text, markup, annotated - select for diffs
Tue Feb 16 21:17:27 2016 UTC (10 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.60: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.60: +56 -48 lines
Make interrupt handling MP safe by not dropping the bus lock while
traversing the active transfer list.  Instead move the complete transfers
from the active list to a complete list while holding the bus lock.

Once the interrupt list has been traversed we can do callbacks on the
complete list.  usbd_transfer_complete can safely drop the bus lock while
traversing this private list.

Revision 1.264.4.60: download - view: text, markup, annotated - select for diffs
Tue Feb 16 07:30:46 2016 UTC (10 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.59: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.59: +4 -5 lines
Use TAILQ_FOREACH.  No functional change.

Revision 1.264.4.59: download - view: text, markup, annotated - select for diffs
Mon Feb 15 17:00:27 2016 UTC (10 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.58: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.58: +4 -3 lines
KF

Revision 1.264.4.58: download - view: text, markup, annotated - select for diffs
Mon Feb 8 11:16:02 2016 UTC (10 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.57: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.57: +9 -10 lines
Remove the fstd argument from uhci_reset_std_chain as it is always
ux_stds[0]

Revision 1.264.4.57: download - view: text, markup, annotated - select for diffs
Sat Feb 6 08:52:26 2016 UTC (10 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.56: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.56: +2 -4 lines
Remove uhci_device_request declaration as it doesn't exist anymore

Revision 1.264.4.56: download - view: text, markup, annotated - select for diffs
Fri Nov 20 12:49:59 2015 UTC (10 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.55: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.55: +17 -17 lines
Rename interrupt list macros s/intr_info/intr_list/

No functional change

Revision 1.264.4.55: download - view: text, markup, annotated - select for diffs
Tue Nov 10 08:44:09 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.54: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.54: +679 -313 lines
Restructure the xfer methods so that (close to) minimal work in done in softint
context.  Now all memory allocation is done in thread context.

Addresses kern/48308 for uhci(4), fixes a bunch of locking bugs around the
*TD free lists, and plugs some memory leaks on error conditions.

Revision 1.264.4.54: download - view: text, markup, annotated - select for diffs
Mon Nov 9 08:35:23 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.53: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.53: +8 -8 lines
KNF (whitespace)

Revision 1.264.4.53: download - view: text, markup, annotated - select for diffs
Sun Nov 8 21:02:31 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.52: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.52: +4 -2 lines
Improve debug output

Revision 1.264.4.52: download - view: text, markup, annotated - select for diffs
Sun Nov 8 15:19:29 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.51: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.51: +4 -4 lines
s/0/NULL/ for pointer return value

Revision 1.264.4.51: download - view: text, markup, annotated - select for diffs
Sun Nov 8 15:15:50 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.50: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.50: +9 -2 lines
Perform required DMA operation on bulk transfers

Revision 1.264.4.50: download - view: text, markup, annotated - select for diffs
Sun Nov 8 14:56:21 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.49: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.49: +21 -21 lines
Provide and use UHCI_PIPE2UPIPE

Revision 1.264.4.49: download - view: text, markup, annotated - select for diffs
Sun Nov 8 14:38:38 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.48: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.48: +4 -4 lines
Whitespace

Revision 1.264.4.48: download - view: text, markup, annotated - select for diffs
Sun Nov 8 13:33:49 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.47: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.47: +4 -4 lines
Whitespace

Revision 1.264.4.47: download - view: text, markup, annotated - select for diffs
Sat Nov 7 08:05:30 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.46: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.46: +27 -18 lines
Debug consistency / standard output

Revision 1.264.4.46: download - view: text, markup, annotated - select for diffs
Sun Nov 1 12:09:48 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.45: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.45: +3 -3 lines
Missed a s:uhcidebug >:uhcidebug >=: in the consistency with USBHIST_LOGN
commit

Revision 1.264.4.45: download - view: text, markup, annotated - select for diffs
Sun Nov 1 10:45:42 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.44: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.44: +9 -9 lines
Print 0 or 1 and not bit value

Revision 1.264.4.44: download - view: text, markup, annotated - select for diffs
Sun Nov 1 10:36:52 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.43: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.43: +4 -4 lines
Prefix hex values in debug output with "0x"

Revision 1.264.4.43: download - view: text, markup, annotated - select for diffs
Sun Nov 1 10:18:43 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.42: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.42: +15 -15 lines
Consistency with USBHIST_LOGN

Revision 1.264.4.42: download - view: text, markup, annotated - select for diffs
Sun Nov 1 10:14:18 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.41: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.41: +6 -5 lines
Whitespace

Revision 1.264.4.41: download - view: text, markup, annotated - select for diffs
Tue Oct 27 15:28:22 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.40: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.40: +69 -69 lines
Rename uhci_xfer struct members.

No funciotnal change.

Revision 1.264.4.40: download - view: text, markup, annotated - select for diffs
Tue Oct 27 14:22:38 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.39: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.39: +14 -20 lines
Make the previous compile with other options.

Revision 1.264.4.39: download - view: text, markup, annotated - select for diffs
Tue Oct 27 14:05:29 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.38: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.38: +143 -156 lines
Collapse uhcl_intr_info into uhci_xfer and use TAILQ for list of
transfers that are active.

Revision 1.264.4.38: download - view: text, markup, annotated - select for diffs
Tue Oct 27 08:02:31 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.37: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.37: +5 -6 lines
Remove barely used softc copy in uhci_intr_info_t

Revision 1.264.4.37: download - view: text, markup, annotated - select for diffs
Tue Oct 20 15:31:21 2015 UTC (11 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.36: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.36: +54 -61 lines
Consistently providei/use *_{XFER,PIPE,BUS}2SC, etc macros

Revision 1.264.4.36: download - view: text, markup, annotated - select for diffs
Sun Oct 11 09:17:51 2015 UTC (11 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.35: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.35: +5 -4 lines
Update ubm_allocx with the isoc frame count parameter and use it in
dwctwo(4)

Revision 1.264.4.35: download - view: text, markup, annotated - select for diffs
Tue Sep 29 11:38:29 2015 UTC (11 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.34: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.34: +8 -8 lines
sizeof KNF

Revision 1.264.4.34: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:01 2015 UTC (11 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.33: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.33: +3 -3 lines
Sync with HEAD

Revision 1.266: download - view: text, markup, annotated - select for diffs
Wed Aug 19 06:23:35 2015 UTC (11 years, 3 months ago) by skrll
Branches: MAIN
CVS tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +3 -3 lines
More IPL_SCHED -> IPL_USB

Revision 1.264.4.33: download - view: text, markup, annotated - select for diffs
Mon Apr 6 08:58:44 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.32: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.32: +86 -86 lines
Use anonymous unions in various structs and rename the ctl/iso members of
the pipe structs to ctrl/isoc.

No functional change intended.

Revision 1.264.4.32: download - view: text, markup, annotated - select for diffs
Sun Apr 5 07:26:31 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.31: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.31: +3 -3 lines
Fix inverted logic.  Spotted by Takahiro HAYASHI.  Thanks.

Revision 1.264.4.31: download - view: text, markup, annotated - select for diffs
Fri Apr 3 21:33:23 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.30: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.30: +51 -99 lines
Various readability changes.

#ifdef DIAGNOSTIC -> KASSERT / __diagused

Revision 1.264.4.30: download - view: text, markup, annotated - select for diffs
Wed Apr 1 05:39:51 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.29: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.29: +4 -2 lines
Include opt_usb.h

Revision 1.264.4.29: download - view: text, markup, annotated - select for diffs
Sun Mar 29 11:40:36 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.28: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.28: +3 -4 lines
Unwrap short lines.

Revision 1.264.4.28: download - view: text, markup, annotated - select for diffs
Sun Mar 29 11:40:00 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.27: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.27: +3 -3 lines
Typo in comment

Revision 1.264.4.27: download - view: text, markup, annotated - select for diffs
Sun Mar 29 11:33:15 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.26: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.26: +45 -44 lines
DPRINTFN(1, ...) -> DPRINTF(...)

No functional change

Revision 1.264.4.26: download - view: text, markup, annotated - select for diffs
Sun Mar 29 08:08:01 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.25: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.25: +3 -3 lines
s/0/NULL/ for pointers

Revision 1.264.4.25: download - view: text, markup, annotated - select for diffs
Thu Mar 19 17:26:43 2015 UTC (11 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.24: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.24: +94 -94 lines
Do the same as OpenBSD and get rid of the *_handle typedefs and use
plain structures insteads

Revision 1.264.4.24: download - view: text, markup, annotated - select for diffs
Tue Mar 10 05:59:10 2015 UTC (11 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.23: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.23: +5 -5 lines
Whitespace

Revision 1.264.4.23: download - view: text, markup, annotated - select for diffs
Tue Mar 10 05:57:15 2015 UTC (11 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.22: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.22: +2 -3 lines
usb_quirks.h isn't needed here

Revision 1.264.4.22: download - view: text, markup, annotated - select for diffs
Tue Mar 3 06:23:43 2015 UTC (11 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.21: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.21: +2 -3 lines

Whitespace.

Revision 1.265: download - view: text, markup, annotated - select for diffs
Sun Mar 1 08:10:57 2015 UTC (11 years, 8 months ago) by skrll
Branches: MAIN
CVS tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +2 -3 lines
Whitespace.

Revision 1.264.4.21: download - view: text, markup, annotated - select for diffs
Fri Feb 20 09:17:17 2015 UTC (11 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.20: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.20: +310 -195 lines
Convert to USBHIST

Revision 1.264.4.20: download - view: text, markup, annotated - select for diffs
Fri Feb 20 09:16:49 2015 UTC (11 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.19: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.19: +10 -7 lines
KNF

Revision 1.264.4.19: download - view: text, markup, annotated - select for diffs
Sun Feb 1 12:08:15 2015 UTC (11 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.18: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.18: +2 -3 lines
Remove unused #includes

Revision 1.264.4.18: download - view: text, markup, annotated - select for diffs
Sun Feb 1 11:54:29 2015 UTC (11 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.17: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.17: +6 -4 lines
KNF

Revision 1.264.4.17: download - view: text, markup, annotated - select for diffs
Sun Feb 1 11:13:46 2015 UTC (11 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.16: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.16: +6 -4 lines
KNF

Revision 1.264.4.16: download - view: text, markup, annotated - select for diffs
Sun Feb 1 08:16:31 2015 UTC (11 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.15: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.15: +3 -3 lines
Return success when clearing port reset.

Revision 1.264.4.15: download - view: text, markup, annotated - select for diffs
Sat Dec 6 08:27:23 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.14: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.14: +13 -13 lines
KNF. Remove argument name from function declarations.

No functional change.

Revision 1.264.4.14: download - view: text, markup, annotated - select for diffs
Fri Dec 5 13:23:38 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.13: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.13: +8 -8 lines
Use int for return type for [eou]chi_init and motg_init.

Revision 1.264.4.13: download - view: text, markup, annotated - select for diffs
Fri Dec 5 09:37:49 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.12: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.12: +65 -65 lines
KNF. Remove ( ) from return statements.

Revision 1.264.4.12: download - view: text, markup, annotated - select for diffs
Thu Dec 4 08:04:31 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.11: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.11: +69 -293 lines
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.264.4.11: download - view: text, markup, annotated - select for diffs
Wed Dec 3 23:05:06 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.10: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.10: +3 -3 lines
Rename usbroothub_subr.[ch] to usbroothub.[ch]

Revision 1.264.4.10: download - view: text, markup, annotated - select for diffs
Wed Dec 3 22:40:55 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.9: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.9: +8 -12 lines
Provide a USETWD macro for use with USB words designated
initialisers.

Revision 1.264.4.9: download - view: text, markup, annotated - select for diffs
Wed Dec 3 13:19:38 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.8: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.8: +40 -35 lines
Use designated initializers for more descriptors.

Revision 1.264.4.8: download - view: text, markup, annotated - select for diffs
Wed Dec 3 13:09:00 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.7: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.7: +16 -12 lines
Use designated initialisers for usb_device_descriptor_t structs.

Revision 1.264.4.7: download - view: text, markup, annotated - select for diffs
Wed Dec 3 12:52:07 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.6: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.6: +224 -224 lines
The grand renaming of structure members.

No functional change.

Revision 1.264.4.6: download - view: text, markup, annotated - select for diffs
Tue Dec 2 09:00:34 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.5: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.5: +5 -60 lines
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.264.4.5: download - view: text, markup, annotated - select for diffs
Mon Dec 1 12:38:39 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.4: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.4: +47 -47 lines
Add prefixes to method structures member names. No functional change.

Revision 1.264.4.4: download - view: text, markup, annotated - select for diffs
Mon Dec 1 08:12:09 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.3: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.3: +2 -4 lines
Remove usbd_bus no_intrs member it was (virtually) unused.

Revision 1.264.4.3: download - view: text, markup, annotated - select for diffs
Sun Nov 30 16:38:45 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.2: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.2: +3 -5 lines
Use ASSERT_SLEEPABLE.

Revision 1.264.4.2: download - view: text, markup, annotated - select for diffs
Sun Nov 30 13:14:11 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264.4.1: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.4.1: +23 -23 lines
Whitespace

Revision 1.264.4.1: download - view: text, markup, annotated - select for diffs
Sun Nov 30 12:18:58 2014 UTC (11 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +21 -21 lines
Use C99 types. u_int{8,16,32,64}_t to uint{8,16,32,64}_t.

No functional change.

Revision 1.249.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:51 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.249.2.2: preferred, colored; branchpoint 1.249: preferred, colored
Changes since revision 1.249.2.2: +84 -52 lines
Rebase to HEAD as of a few days ago.

Revision 1.263.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:54:59 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.263: preferred, colored; next MAIN 1.264: preferred, colored
Changes since revision 1.263: +5 -10 lines
Rebase.

Revision 1.264: download - view: text, markup, annotated - select for diffs
Tue Aug 5 06:35:24 2014 UTC (12 years, 3 months ago) by skrll
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-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, 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: nick-nhusb, netbsd-7-nhusb, netbsd-7
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +5 -10 lines
Simplify the freeing of the interrupt pipe transfer.  Inspired by OpenBSD.

Revision 1.240.2.4: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:37 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.240.2.3: preferred, colored; branchpoint 1.240: preferred, colored; next MAIN 1.241: preferred, colored
Changes since revision 1.240.2.3: +114 -80 lines
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.257.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:47 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.257: preferred, colored; next MAIN 1.258: preferred, colored
Changes since revision 1.257: +83 -46 lines
sync with head

Revision 1.263: download - view: text, markup, annotated - select for diffs
Sun Dec 1 07:28:48 2013 UTC (12 years, 11 months ago) by skrll
Branches: MAIN
CVS tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +3 -3 lines
Adjust KASSERT in device_ctrl_done to polling case.

PR/48213: ehci assertion failure during boot

Revision 1.262: download - view: text, markup, annotated - select for diffs
Mon Oct 28 17:40:43 2013 UTC (13 years ago) by matt
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +3 -2 lines
Add an explicit initialization of .new_device = NULL

Revision 1.261: download - view: text, markup, annotated - select for diffs
Sun Sep 29 07:28:20 2013 UTC (13 years, 1 month ago) by skrll
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +3 -3 lines
Really dump all by calling uhci_dump_qhs and not uhci_dump_qh

Revision 1.242.8.1: download - view: text, markup, annotated - select for diffs
Thu Sep 26 01:57:22 2013 UTC (13 years, 1 month ago) by riz
Branches: netbsd-6-1
CVS tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE
Diff to: previous 1.242: preferred, colored; next MAIN 1.243: preferred, colored
Changes since revision 1.242: +99 -50 lines
Pull up following revision(s) (requested by skrll in ticket #950):
	sys/dev/usb/uhci.c: revision 1.255
	sys/dev/usb/uhci.c: revision 1.256
	sys/dev/usb/ehci.c: revision 1.205
	sys/dev/usb/uhci.c: revision 1.258
Add missed byteswap ops for BE machines in block added in rev 1.223.
Call usb_syncmem() against descriptors more strictly.
(not sure if the previous ones were fatal though)
Deal with control transfers better by
	- removing the UHCI_PTR_VF flag for the setup and status stages
	  which means they are scheduled less aggressively.  Some devices
	  appear to require this (blymn@ has one).  The flag was
	  introduced as a performance improvement for bulk transfers.
	- Checking for short reads and making sure the status stage runs
	  if they're encountered.
PR/47522 Enumeration of LUFA/Atmel devices on UHCI fails
Thanks to jak@ and blymn@ for testing and mlelstv@ for comments.

Revision 1.242.6.1: download - view: text, markup, annotated - select for diffs
Thu Sep 26 01:55:49 2013 UTC (13 years, 1 month ago) by riz
Branches: netbsd-6-0
CVS tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE
Diff to: previous 1.242: preferred, colored; next MAIN 1.243: preferred, colored
Changes since revision 1.242: +99 -50 lines
Pull up following revision(s) (requested by skrll in ticket #950):
	sys/dev/usb/uhci.c: revision 1.255
	sys/dev/usb/uhci.c: revision 1.256
	sys/dev/usb/ehci.c: revision 1.205
	sys/dev/usb/uhci.c: revision 1.258
Add missed byteswap ops for BE machines in block added in rev 1.223.
Call usb_syncmem() against descriptors more strictly.
(not sure if the previous ones were fatal though)
Deal with control transfers better by
	- removing the UHCI_PTR_VF flag for the setup and status stages
	  which means they are scheduled less aggressively.  Some devices
	  appear to require this (blymn@ has one).  The flag was
	  introduced as a performance improvement for bulk transfers.
	- Checking for short reads and making sure the status stage runs
	  if they're encountered.
PR/47522 Enumeration of LUFA/Atmel devices on UHCI fails
Thanks to jak@ and blymn@ for testing and mlelstv@ for comments.

Revision 1.242.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 26 01:51:47 2013 UTC (13 years, 1 month ago) by riz
Branches: netbsd-6
Diff to: previous 1.242: preferred, colored; next MAIN 1.243: preferred, colored
Changes since revision 1.242: +99 -50 lines
Pull up following revision(s) (requested by skrll in ticket #950):
	sys/dev/usb/uhci.c: revision 1.255
	sys/dev/usb/uhci.c: revision 1.256
	sys/dev/usb/ehci.c: revision 1.205
	sys/dev/usb/uhci.c: revision 1.258
Add missed byteswap ops for BE machines in block added in rev 1.223.
Call usb_syncmem() against descriptors more strictly.
(not sure if the previous ones were fatal though)
Deal with control transfers better by
	- removing the UHCI_PTR_VF flag for the setup and status stages
	  which means they are scheduled less aggressively.  Some devices
	  appear to require this (blymn@ has one).  The flag was
	  introduced as a performance improvement for bulk transfers.
	- Checking for short reads and making sure the status stage runs
	  if they're encountered.
PR/47522 Enumeration of LUFA/Atmel devices on UHCI fails
Thanks to jak@ and blymn@ for testing and mlelstv@ for comments.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Sat Sep 14 13:17:21 2013 UTC (13 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +4 -2 lines
Put UREAD4 under UHCI_DEBUG

Revision 1.259: download - view: text, markup, annotated - select for diffs
Sun Sep 8 06:37:23 2013 UTC (13 years, 2 months ago) by skrll
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +4 -4 lines
Add sc->sc_bus.use_polling || to a couple of KASSERTs

PR/46826

Revision 1.258: download - view: text, markup, annotated - select for diffs
Sat Sep 7 16:17:12 2013 UTC (13 years, 2 months ago) by skrll
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +76 -42 lines
Deal with control transfers better by

	- removing the UHCI_PTR_VF flag for the setup and status stages
	  which means they are scheduled less aggressively.  Some devices
	  appear to require this (blymn@ has one).  The flag was
	  introduced as a performance improvement for bulk transfers.

	- Checking for short reads and making sure the status stage runs
	  if they're encountered.

PR/47522 Enumeration of LUFA/Atmel devices on UHCI fails

Thanks to jak@ and blymn@ for testing and mlelstv@ for comments.

Revision 1.249.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:22 2013 UTC (13 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.249.2.1: preferred, colored; branchpoint 1.249: preferred, colored
Changes since revision 1.249.2.1: +4 -4 lines
resync from head

Revision 1.257: download - view: text, markup, annotated - select for diffs
Thu Apr 4 13:27:56 2013 UTC (13 years, 7 months ago) by skrll
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +4 -4 lines
Don't take the bus lock in usbd_transfer_complete when polling.

Sprinkle || polling in KASSERTsw

Revision 1.249.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:29:39 2013 UTC (13 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +39 -43 lines
resync with head

Revision 1.256: download - view: text, markup, annotated - select for diffs
Fri Feb 1 12:53:47 2013 UTC (13 years, 9 months ago) by tsutsui
Branches: MAIN
CVS tags: agc-symver-base, agc-symver
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +25 -10 lines
Call usb_syncmem() against descriptors more strictly.
(not sure if the previous ones were fatal though)

Revision 1.255: download - view: text, markup, annotated - select for diffs
Wed Jan 30 16:01:45 2013 UTC (13 years, 9 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +4 -4 lines
Add missed byteswap ops for BE machines in block added in rev 1.223.

Revision 1.254: download - view: text, markup, annotated - select for diffs
Tue Jan 29 19:27:36 2013 UTC (13 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +3 -2 lines
correct previous. assign the sc, and move the destroy later where it is safe

Revision 1.253: download - view: text, markup, annotated - select for diffs
Tue Jan 29 00:00:15 2013 UTC (13 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +8 -27 lines
use a pool instead of a linked list to avoid synchronization problems.

Revision 1.240.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:06:13 2013 UTC (13 years, 9 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.240.2.2: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.2.2: +8 -9 lines
sync with head

Revision 1.252: download - view: text, markup, annotated - select for diffs
Tue Jan 22 12:40:43 2013 UTC (13 years, 9 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-pagecache-base8
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +4 -3 lines
- 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.251: download - view: text, markup, annotated - select for diffs
Sat Jan 5 23:34:18 2013 UTC (13 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +2 -6 lines
fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables

Revision 1.250: download - view: text, markup, annotated - select for diffs
Sat Jan 5 01:30:17 2013 UTC (13 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +8 -6 lines
- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID

Revision 1.240.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:08 2012 UTC (14 years ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.240.2.1: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.2.1: +254 -121 lines
sync with head

Revision 1.249: download - view: text, markup, annotated - select for diffs
Sun Jun 24 10:06:34 2012 UTC (14 years, 4 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +14 -11 lines
stopgap fix for recursive locking on suspend/resume
(This can be simplified imo because interrupts should be disabled
at this point.)

Revision 1.248: download - view: text, markup, annotated - select for diffs
Sun Jun 10 06:15:53 2012 UTC (14 years, 5 months ago) by mrg
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +245 -115 lines
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.240.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:07 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +48 -72 lines
sync with head

Revision 1.240.6.20: download - view: text, markup, annotated - select for diffs
Fri Apr 6 08:11:41 2012 UTC (14 years, 7 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.19: preferred, colored; branchpoint 1.240: preferred, colored; next MAIN 1.241: preferred, colored
Changes since revision 1.240.6.19: +6 -2 lines
take the thread lock earlier in uhci_device_intr_start().
avoids failed mutex owned asserts, and now bt* work.

Revision 1.240.6.19: download - view: text, markup, annotated - select for diffs
Thu Apr 5 22:32:09 2012 UTC (14 years, 7 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.18: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.18: +4 -0 lines
make these compile without DIAGNOSTIC.

Revision 1.240.6.18: download - view: text, markup, annotated - select for diffs
Sun Mar 11 01:52:28 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.17: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.17: +2 -2 lines
sync to latest -current

Revision 1.247: download - view: text, markup, annotated - select for diffs
Sun Mar 11 00:34:46 2012 UTC (14 years, 8 months ago) by mrg
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base10
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +5 -11 lines
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.246: download - view: text, markup, annotated - select for diffs
Sat Mar 10 23:01:07 2012 UTC (14 years, 8 months ago) by mrg
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +3 -3 lines
remove checks against "!curproc".

Revision 1.240.6.17: download - view: text, markup, annotated - select for diffs
Tue Mar 6 18:26:46 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.16: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.16: +2 -3 lines
sync to -current

Revision 1.245: download - view: text, markup, annotated - select for diffs
Tue Mar 6 03:35:29 2012 UTC (14 years, 8 months ago) by mrg
Branches: MAIN
CVS tags: jmcneill-usbmp-base6
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +45 -45 lines
pull down from usbmp branch:

- rename usb_detach_{wake,waitup}() to usb_detach_{wake,waitup}old()
- use some c99 struct .initialisers

Revision 1.244: download - view: text, markup, annotated - select for diffs
Tue Mar 6 02:49:03 2012 UTC (14 years, 8 months ago) by mrg
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +2 -8 lines
pull down from usbmp:

kill the !USE_USE_SOFTINTR code.

Revision 1.243: download - view: text, markup, annotated - select for diffs
Tue Mar 6 02:36:46 2012 UTC (14 years, 8 months ago) by mrg
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +2 -14 lines
pull down from usbmp branch:

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

Revision 1.240.6.16: download - view: text, markup, annotated - select for diffs
Sat Mar 3 02:29:34 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.15: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.15: +12 -10 lines
use usb_delay_ms_locked() in some more places

Revision 1.240.6.15: download - view: text, markup, annotated - select for diffs
Sun Feb 26 05:05:44 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.14: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.14: +3 -3 lines
- add some more "XXXSMP ok" tags
- use cpu_softintr_p() instead of checking LP_INTR directly

Revision 1.240.6.14: download - view: text, markup, annotated - select for diffs
Sat Feb 25 20:46:33 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.13: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.13: +5 -11 lines
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.240.6.13: download - view: text, markup, annotated - select for diffs
Sat Feb 25 12:53:34 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.12: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.12: +3 -3 lines
remove curproc references

Revision 1.240.6.12: download - view: text, markup, annotated - select for diffs
Sat Feb 25 10:26:23 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.11: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.11: +4 -4 lines
copyright maintenence.

Revision 1.240.6.11: download - view: text, markup, annotated - select for diffs
Thu Feb 23 09:25:04 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.10: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.10: +11 -11 lines
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.240.6.10: download - view: text, markup, annotated - select for diffs
Mon Feb 20 06:50:21 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.9: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.9: +5 -7 lines
remove the intr_lock from the mp usb api, it wasn't used.

Revision 1.240.6.9: download - view: text, markup, annotated - select for diffs
Mon Feb 20 04:25:54 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.8: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.8: +3 -3 lines
fix a panic() message to refer to the correct function

Revision 1.240.6.8: download - view: text, markup, annotated - select for diffs
Mon Feb 20 03:23:26 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.7: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.7: +10 -8 lines
adjust some comments to reality.  copy some XXX comments from ehci
into uhci/ohci since it's probably right there too

Revision 1.240.6.7: download - view: text, markup, annotated - select for diffs
Mon Feb 20 02:12:24 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.6: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.6: +39 -15 lines
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.242: download - view: text, markup, annotated - select for diffs
Fri Dec 23 00:51:46 2011 UTC (14 years, 10 months ago) by jakllsch
Branches: MAIN
CVS tags: 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-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6-1, netbsd-6-0, netbsd-6
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +6 -6 lines
Revert previous due to active usbmp branch(es).

Revision 1.241: download - view: text, markup, annotated - select for diffs
Thu Dec 22 20:07:01 2011 UTC (14 years, 10 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +6 -6 lines
Adjust-away inconsistent and trailing whitespace.

Revision 1.240.6.6: download - view: text, markup, annotated - select for diffs
Fri Dec 9 01:53:00 2011 UTC (14 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
CVS tags: jmcneill-usbmp-pre-base2
Diff to: previous 1.240.6.5: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.5: +11 -7 lines
- 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.240.6.1.2.1: download - view: text, markup, annotated - select for diffs
Thu Dec 8 08:56:57 2011 UTC (14 years, 11 months ago) by mrg
Branches: mrg-ohci-jmcneill-usbmp
Diff to: previous 1.240.6.1: preferred, colored; next MAIN 1.240.6.2: preferred, colored
Changes since revision 1.240.6.1: +227 -153 lines
sync with main branch

Revision 1.240.6.5: download - view: text, markup, annotated - select for diffs
Thu Dec 8 02:51:08 2011 UTC (14 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.4: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.4: +52 -52 lines
- 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.240.6.4: download - view: text, markup, annotated - select for diffs
Tue Dec 6 05:40:02 2011 UTC (14 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.3: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.3: +2 -4 lines
don't take the sc_lock in uhci_device_request() since it is already
taken (as verified by the assert at the top of this function.)

Revision 1.240.6.3: download - view: text, markup, annotated - select for diffs
Tue Dec 6 05:26:26 2011 UTC (14 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.2: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.2: +3 -3 lines
kassert the right lock.

Revision 1.240.6.2: download - view: text, markup, annotated - select for diffs
Tue Dec 6 05:06:50 2011 UTC (14 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.240.6.1: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.6.1: +180 -104 lines
my compiles-but-un-runtime-tested port of uhci to usbmp branch.
based upon the ohci and ehci changes.

Revision 1.240.6.1: download - view: text, markup, annotated - select for diffs
Sun Dec 4 13:23:17 2011 UTC (14 years, 11 months ago) by jmcneill
Branches: jmcneill-usbmp
CVS tags: mrg-ohci-jmcneill-usbmp-base
Branch point for: mrg-ohci-jmcneill-usbmp
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +3 -2 lines
Make ehci mpsafe.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Sun Aug 7 18:58:52 2011 UTC (15 years, 3 months ago) by jakllsch
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +4 -4 lines
Make uhci_find_prev_qh() always 'static inline', just 'inline" leads to trouble.

Revision 1.238.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:10 2011 UTC (15 years, 4 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.238: preferred, colored; next MAIN 1.239: preferred, colored
Changes since revision 1.238: +4 -2 lines
Catchup with rmind-uvmplock merge.

Revision 1.232.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 12 00:24:26 2011 UTC (15 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.232.2.3: preferred, colored; branchpoint 1.232: preferred, colored; next MAIN 1.233: preferred, colored
Changes since revision 1.232.2.3: +2 -0 lines
sync with head

Revision 1.239: download - view: text, markup, annotated - select for diffs
Thu Jun 9 19:08:32 2011 UTC (15 years, 5 months ago) by matt
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +4 -2 lines
Move EHCI_DEBUG, OHCI_DEBUG, UHCI_DEBUG, USB_DEBUG, UHUB_DEBUG to opt_usb.h
(ya dependencies).
Cleanup usb_mem.c a little more and add block tracking code.  Help find
corruption problems.
Comment out the SPEED check for ETTF.  XXX why doesn't that work right?

Revision 1.235.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:08:42 2011 UTC (15 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.235: preferred, colored; next MAIN 1.236: preferred, colored
Changes since revision 1.235: +6 -3 lines
Sync with HEAD.

Revision 1.232.2.3: download - view: text, markup, annotated - select for diffs
Tue May 31 03:04:56 2011 UTC (15 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.232.2.2: preferred, colored; branchpoint 1.232: preferred, colored
Changes since revision 1.232.2.2: +4 -1 lines
sync with head

Revision 1.238: download - view: text, markup, annotated - select for diffs
Sat May 28 15:47:17 2011 UTC (15 years, 5 months ago) by tsutsui
Branches: MAIN
CVS tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +8 -12 lines
Revert changes for PR kern/44907
http://mail-index.NetBSD.org/source-changes/2011/05/27/msg022584.html
for now.  It might cause a panic in ehci_freex() on device detach
as reported by Paul Goyette on current-users@.

Revision 1.237: download - view: text, markup, annotated - select for diffs
Fri May 27 19:04:24 2011 UTC (15 years, 5 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +12 -8 lines
Apply patch in PR kern/44907 (crash due to race in ehci.c):
 - make sure to remove abort_task in ehci_freex
 - always initialize abort_task in ehci_allocx,
   not in ehci_timeout just before adding the task
Also apply similar fixes to ohci and uhci.

XXX: should we also call abort_task handler before removing it from queue
     if *hci_freex() is called for usbd_xfer_handle with queued abort_task?

Revision 1.236: download - view: text, markup, annotated - select for diffs
Fri May 27 17:19:18 2011 UTC (15 years, 5 months ago) by drochner
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +6 -3 lines
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.232.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:54:14 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.232.2.1: preferred, colored; branchpoint 1.232: preferred, colored
Changes since revision 1.232.2.1: +14 -16 lines
sync with head

Revision 1.235: download - view: text, markup, annotated - select for diffs
Sat Nov 13 13:52:12 2010 UTC (16 years ago) by uebayasi
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +2 -3 lines
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.

Revision 1.231.2.3: download - view: text, markup, annotated - select for diffs
Sat Nov 6 08:08:38 2010 UTC (16 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.231.2.2: preferred, colored; branchpoint 1.231: preferred, colored; next MAIN 1.232: preferred, colored
Changes since revision 1.231.2.2: +14 -15 lines
Sync with HEAD.

Revision 1.234: download - view: text, markup, annotated - select for diffs
Wed Nov 3 22:34:23 2010 UTC (16 years ago) by dyoung
Branches: MAIN
CVS tags: uebayasi-xip-base4
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +14 -15 lines
Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera.  These files produce the same assembly
(according to objdump -d) before and after the change

Revision 1.231.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:46:45 2010 UTC (16 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.231.2.1: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.2.1: +3 -1 lines
Sync with HEAD.

Revision 1.216.4.4: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:15 2010 UTC (16 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.216.4.3: preferred, colored; branchpoint 1.216: preferred, colored; next MAIN 1.217: preferred, colored
Changes since revision 1.216.4.3: +5 -3 lines
sync with head.

Revision 1.232.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:41 2010 UTC (16 years, 4 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +5 -3 lines
sync with head

Revision 1.233: download - view: text, markup, annotated - select for diffs
Tue Jun 29 04:02:07 2010 UTC (16 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +5 -3 lines
 Do not process the abnormality system procedure, when Run/Stop=0 and
HCHalted=1 - this is normal. Fixes a bug that system hangs at boot time
when a USB mass storage is connected via UHCI. This problem was observed
on Intel D410PT and was fixed by Katsumi Yamada.

Revision 1.231.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:52 2010 UTC (16 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +4 -4 lines
Sync with HEAD.

Revision 1.223.12.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:27:53 2010 UTC (16 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.223: preferred, colored; next MAIN 1.224: preferred, colored
Changes since revision 1.223: +6 -5 lines
sync to netbsd-5

Revision 1.216.4.3: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:06 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.216.4.2: preferred, colored; branchpoint 1.216: preferred, colored
Changes since revision 1.216.4.2: +9 -53 lines
sync with head

Revision 1.232: download - view: text, markup, annotated - select for diffs
Wed Feb 24 22:38:09 2010 UTC (16 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +4 -4 lines
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

Revision 1.231: download - view: text, markup, annotated - select for diffs
Fri Jan 8 20:39:04 2010 UTC (16 years, 10 months ago) by dyoung
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +4 -4 lines
Expand PMF_FN_* macros.

Revision 1.230: download - view: text, markup, annotated - select for diffs
Thu Nov 12 19:53:56 2009 UTC (17 years ago) by dyoung
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +5 -49 lines
Simplify activation hook.  (sc_dying must die!)

unifdef -D__NetBSD__ -U__FreeBSD__ -U__OpenBSD__.

Revision 1.208.12.7: download - view: text, markup, annotated - select for diffs
Thu Nov 12 09:04:30 2009 UTC (17 years ago) by uebayasi
Branches: itohy-usb1
Diff to: previous 1.208.12.6: preferred, colored; branchpoint 1.208: preferred, colored; next MAIN 1.209: preferred, colored
Changes since revision 1.208.12.6: +4 -4 lines
Sort struct usbd_bus_methods member initializers.

Revision 1.229: download - view: text, markup, annotated - select for diffs
Sun Nov 1 06:36:44 2009 UTC (17 years ago) by uebayasi
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +4 -4 lines
Update referencial URLs.

Revision 1.223.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 4 00:01:16 2009 UTC (17 years, 1 month ago) by snj
Branches: netbsd-5
CVS tags: 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, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.223: preferred, colored; next MAIN 1.224: preferred, colored
Changes since revision 1.223: +6 -5 lines
Pull up following revision(s) (requested by bouyer in ticket #1054):
	sys/dev/usb/uhci.c: revision 1.225
Make it safe to call uhci_init() from a kernel thread with interrupts
enabled:
- don't enable interrupts before calling uhci_run()
- check if the controller's interrupt is enabled in uhci_intr()
The issue is that uhci_run() may tsleep(), uhci_intr1() may be called before
uhci_run() is complete and disable it because it found it halted.
Now a uhci controller can be successfully exported to a NetBSD Xen domU :)

Revision 1.224.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:35 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.224: preferred, colored; next MAIN 1.225: preferred, colored
Changes since revision 1.224: +13 -6 lines
Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.216.4.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:21 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.216.4.1: preferred, colored; branchpoint 1.216: preferred, colored
Changes since revision 1.216.4.1: +361 -28 lines
sync with head.

Revision 1.228: download - view: text, markup, annotated - select for diffs
Sat May 2 22:28:41 2009 UTC (17 years, 6 months ago) by martin
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, jymxensuspend-base, jym-xensuspend-base
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +4 -3 lines
Correct previous: detaching uhubN makes the bus pointer NULL

Revision 1.227: download - view: text, markup, annotated - select for diffs
Sat May 2 22:09:39 2009 UTC (17 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +5 -3 lines
If we are unlucky, during detach of child devices, after a uhub has detached,
our uhci_poll_hub callout might strike. The detaching of the uhub has left
the device member in the pipe NULL, so make sure we do not dereference it.

We could halt the callout before detaching child devices, but it this
would likely interfere with proper servicing the child devices while
they are still around.

Revision 1.223.4.2: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:36:39 2009 UTC (17 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.223.4.1: preferred, colored; branchpoint 1.223: preferred, colored; next MAIN 1.224: preferred, colored
Changes since revision 1.223.4.1: +9 -5 lines
Sync with HEAD.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Sun Apr 19 12:32:52 2009 UTC (17 years, 7 months ago) by ad
Branches: MAIN
CVS tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +5 -2 lines
In this case "XXX free other data structures XXX" includes stopping and
destroying the callout.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Fri Mar 6 23:40:50 2009 UTC (17 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +6 -5 lines
Make it safe to call uhci_init() from a kernel thread with interrupts
enabled:
- don't enable interrupts before calling uhci_run()
- check if the controller's interrupt is enabled in uhci_intr()
The issue is that uhci_run() may tsleep(), uhci_intr1() may be called before
uhci_run() is complete and disable it because it found it halted.

Now a uhci controller can be successfully exported to a NetBSD Xen domU :)

Revision 1.223.4.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:19:09 2009 UTC (17 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +12 -13 lines
Sync with HEAD.

Revision 1.214.6.5: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:09 2009 UTC (17 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.214.6.4: preferred, colored; branchpoint 1.214: preferred, colored; next MAIN 1.215: preferred, colored
Changes since revision 1.214.6.4: +10 -11 lines
Sync with HEAD.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Tue Dec 16 22:35:36 2008 UTC (17 years, 11 months ago) by christos
Branches: MAIN
CVS tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +12 -13 lines
replace bitmask_snprintf(9) with snprintb(3)

Revision 1.185.2.3: download - view: text, markup, annotated - select for diffs
Sun Sep 28 16:06:39 2008 UTC (18 years, 1 month ago) by jdc
Branches: netbsd-3
Diff to: previous 1.185.2.2: preferred, colored; branchpoint 1.185: preferred, colored; next MAIN 1.186: preferred, colored
Changes since revision 1.185.2.2: +324 -9 lines
Pull up revisions:
  sys/dev/usb/ehci.c		1.138 via patch
  sys/dev/usb/ehcivar.h		1.31 via patch
  sys/dev/usb/ohci.c		1.195 via patch
  sys/dev/usb/ohcivar.h		1.45 via patch
  sys/dev/usb/uhci.c		1.223 via patch
  sys/dev/usb/uhcivar.h		1.45 via patch
  sys/dev/usb/usb_mem.c		1.37 via patch
  sys/dev/usb/usb_mem.h		1.27 via patch
requested by bouyer in ticket 1946.

Add appropriate bus_dmamap_sync() calls to uhci(4), ohci(4) and ehci(4),
as proposed on tech-kern@.
While all DMA memory used in the USB framework is mapped BUS_DMAMAP_COHERENT
(including data memory, which is memcpy'd from/to USB-private buffers),
the CPU can reorder loads or stores from/to main memory, causing the
controller to have an incoherent view of the DMA descriptors lists for a
short time. bus_dmamap_sync() should contain memory barriers that prevents
the CPU from reordering load/store. Note that BUS_DMAMAP_COHERENT is
still required for the DMA descriptor lists - these can't work properly
with software cache coherency.
This fixes "host controller process error/host controller halted" errors
I'm occasionally seeing with a umodem device on uhci on x86.
Thanks to Michael Lorenz for testing it on his O2, and Izumi Tsutsui on
his Cobalt Qube 2700.

Revision 1.217.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:35:11 2008 UTC (18 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.217.2.1: preferred, colored; branchpoint 1.217: preferred, colored; next MAIN 1.218: preferred, colored
Changes since revision 1.217.2.1: +324 -9 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.205.2.1.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 4 08:46:45 2008 UTC (18 years, 2 months ago) by skrll
Branches: wrstuden-fixsa
Diff to: previous 1.205.2.1: preferred, colored; next MAIN 1.205.2.2: preferred, colored
Changes since revision 1.205.2.1: +324 -9 lines
Sync with netbsd-4.

Revision 1.205.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 31 16:48:29 2008 UTC (18 years, 2 months ago) by jdc
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Diff to: previous 1.205.2.1: preferred, colored; branchpoint 1.205: preferred, colored; next MAIN 1.206: preferred, colored
Changes since revision 1.205.2.1: +324 -9 lines
Pull up revisions:
  src/sys/dev/usb/ehci.c:1.138
  src/sys/dev/usb/ehcivar.h:1.31
  src/sys/dev/usb/ohci.c:1.195
  src/sys/dev/usb/ohcivar.h:1.45
  src/sys/dev/usb/uhcivar.h:1.45
  src/sys/dev/usb/uhci.c:1.223
  src/sys/dev/usb/usb_mem.c:1.37
  src/sys/dev/usb/usb_mem.h:1.27
via patch (requested by bouyer in ticket #1166).

Revision 1.221.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 3 18:38:05 2008 UTC (18 years, 4 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.221.2.1: preferred, colored; next MAIN 1.222: preferred, colored
Changes since revision 1.221.2.1: +324 -9 lines
Sync with head.

Revision 1.214.6.4: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:11 2008 UTC (18 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.214.6.3: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.6.3: +331 -9 lines
Sync with HEAD.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Sat Jun 28 17:42:53 2008 UTC (18 years, 4 months ago) by bouyer
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, 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, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +324 -9 lines
Add appropriate bus_dmamap_sync() calls to uhci(4), ohci(4) and ehci(4),
as proposed on tech-kern@.
While all DMA memory used in the USB framework is mapped BUS_DMAMAP_COHERENT
(including data memory, which is memcpy'd from/to USB-private buffers),
the CPU can reorder loads or stores from/to main memory, causing the
controller to have an incoherent view of the DMA descriptors lists for a
short time. bus_dmamap_sync() should contain memory barriers that prevents
the CPU from reordering load/store. Note that BUS_DMAMAP_COHERENT is
still required for the DMA descriptor lists - these can't work properly
with software cache coherency.
This fixes "host controller process error/host controller halted" errors
I'm occasionally seeing with a umodem device on uhci on x86.
Thanks to Michael Lorenz for testing it on his O2, and Izumi Tsutsui on
his Cobalt Qube 2700.

Revision 1.217.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:36 2008 UTC (18 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +18 -6 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.221.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 16:33:26 2008 UTC (18 years, 5 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +9 -3 lines
Sync with head.

Revision 1.216.2.3: download - view: text, markup, annotated - select for diffs
Tue Jun 17 09:15:02 2008 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.216.2.2: preferred, colored; branchpoint 1.216: preferred, colored; next MAIN 1.217: preferred, colored
Changes since revision 1.216.2.2: +11 -4 lines
sync with head.

Revision 1.222: download - view: text, markup, annotated - select for diffs
Mon Jun 16 10:29:41 2008 UTC (18 years, 5 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +9 -3 lines
fix selective port resume signaling (not used in normal operation,
just for correctness)

Revision 1.221: download - view: text, markup, annotated - select for diffs
Fri Jun 6 11:21:16 2008 UTC (18 years, 5 months ago) by jmcneill
Branches: MAIN
Branch point for: simonb-wapbl
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +4 -3 lines
uhci_device_intr_done: when re-queueing, pass pipe direction to
uhci_alloc_std_chain instead of always 1 (read). ok drochner

Revision 1.214.6.3: download - view: text, markup, annotated - select for diffs
Thu Jun 5 19:14:35 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.214.6.2: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.6.2: +1 -1 lines
Sync with HEAD.

Also fix build.

Revision 1.216.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:20 2008 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.216.2.1: preferred, colored; branchpoint 1.216: preferred, colored
Changes since revision 1.216.2.1: +9 -4 lines
sync with head

Revision 1.220: download - view: text, markup, annotated - select for diffs
Mon Jun 2 20:53:29 2008 UTC (18 years, 5 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pf42-base3
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +3 -3 lines
Fix probable cut-n-paste error: make the virtual QH link match the physical
one. The effect of this was just that the virtual list missed the
chsqh entry, it only shows up when looking at debug outputs.

Revision 1.214.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:23:54 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.214.6.1: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.6.1: +6 -8 lines
Sync with HEAD.

Revision 1.219: download - view: text, markup, annotated - select for diffs
Mon Jun 2 01:02:21 2008 UTC (18 years, 5 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +7 -2 lines
Set sc_suspend properly so we can avoid a potential HCH on resume.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Wed May 21 17:19:44 2008 UTC (18 years, 6 months ago) by drochner
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +3 -3 lines
fix argument to usb_setup_reserve() (called from USB host adapter drivers)
to be device_t consistently, from Quentin Garnier

Revision 1.208.12.6: download - view: text, markup, annotated - select for diffs
Wed May 21 05:03:27 2008 UTC (18 years, 6 months ago) by itohy
Branches: itohy-usb1
Diff to: previous 1.208.12.5: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.12.5: +58 -158 lines
Change buffer memory interface (move to common file).

Revision 1.216.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:34:50 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +2 -9 lines
sync with head.

Revision 1.216.4.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:10 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +2 -9 lines
sync with head.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:23:59 2008 UTC (18 years, 6 months ago) by martin
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.214.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:42:57 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +51 -41 lines
Sync with HEAD.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Fri Mar 28 17:14:46 2008 UTC (18 years, 7 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +38 -37 lines
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.214.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:16:09 2008 UTC (18 years, 7 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.214: preferred, colored; next MAIN 1.215: preferred, colored
Changes since revision 1.214: +15 -6 lines
sync with head.

Revision 1.210.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:53 2008 UTC (18 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.210.2.2: preferred, colored; branchpoint 1.210: preferred, colored; next MAIN 1.211: preferred, colored
Changes since revision 1.210.2.2: +27 -35 lines
sync with HEAD

Revision 1.189.2.8: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:36:47 2008 UTC (18 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189.2.7: preferred, colored; next MAIN 1.190: preferred, colored
Changes since revision 1.189.2.7: +19 -7 lines
sync with head.

Revision 1.215: download - view: text, markup, annotated - select for diffs
Fri Feb 22 23:04:52 2008 UTC (18 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base, ad-socklock-base1
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +15 -6 lines
Add a method to detach child.

Cosmetic: use device_t and accessors.  Use aprint_*_dev().  Use
PMF_FN_{ARGS,CALL,PROTO}.

Revision 1.211.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:26 2008 UTC (18 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211: +29 -31 lines
Sync with HEAD.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Wed Feb 13 00:52:44 2008 UTC (18 years, 9 months ago) by smb
Branches: MAIN
CVS tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +6 -3 lines
Patch from Jared McNeill to prevent USB interrupt storms on resume on
Thinkpad T61.  (Note: to prevent a very similar-seeming problem, T61
users should also install firmware 2.06 or later, according to thinkwiki.)

Revision 1.189.2.7: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:23:38 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189.2.6: preferred, colored
Changes since revision 1.189.2.6: +10 -30 lines
sync with head.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Sun Feb 3 10:57:12 2008 UTC (18 years, 9 months ago) by drochner
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +10 -30 lines
share some code for USB root hub emulation which is common in the 3
host controller implementations, start with two little functions
which fake up string descriptors (which were inconststent, language
table fetching didn't interoperate with other code in the tree)

Revision 1.189.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:44:46 2008 UTC (18 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189.2.5: preferred, colored
Changes since revision 1.189.2.5: +65 -102 lines
sync with head

Revision 1.210.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:54:42 2008 UTC (18 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.210.2.1: preferred, colored; branchpoint 1.210: preferred, colored
Changes since revision 1.210.2.1: +65 -102 lines
sync with HEAD

Revision 1.211.4.1: download - view: text, markup, annotated - select for diffs
Wed Dec 26 19:47:25 2007 UTC (18 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211: +65 -102 lines
Sync with head.

Revision 1.211.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 11 15:40:03 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211: +65 -102 lines
sync with head.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Sun Dec 9 20:28:24 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, vmlocking2-base3, matt-armv6-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +65 -102 lines
Merge jmcneill-pm branch.

Revision 1.209.2.7: download - view: text, markup, annotated - select for diffs
Wed Nov 14 02:15:43 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.209.2.6: preferred, colored; branchpoint 1.209: preferred, colored; next MAIN 1.210: preferred, colored
Changes since revision 1.209.2.6: +2 -33 lines
Remove UHCI shutdown hook, it has been superseded in functionality by
the suspend handler. It can also awake the controller which creates
funny error messages.

Revision 1.209.2.6: download - view: text, markup, annotated - select for diffs
Wed Nov 7 01:14:18 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.209.2.5: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.5: +3 -3 lines
Introduce device_has_power to fix a race between resuming a device and
the device enabling interrupts as seen by jmcneill@ with uhci. Change
ehci, ohci, uhci and azalia to use this function to protect the
interrupt handler.

Revision 1.210.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:30:37 2007 UTC (19 years ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +4 -4 lines
sync with HEAD

Revision 1.209.2.5: download - view: text, markup, annotated - select for diffs
Tue Nov 6 14:27:33 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.209.2.4: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.4: +9 -5 lines
Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
  three layers (class logic, device logic, bus logic), all of them being
  optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
  not suspended (even partially), device_is_enabled returns true if the
  device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
  pnp_system_resume. Before running any suspend/resume handlers, check
  that all currently attached devices support power management and bail
  out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
  can register what events they are interested in and whether the handler
  should be global or not.
- Introduce device_active API for devices to mark themselve in use from
  either the system or the device. Use this to implement the idle handling
  for audio and input devices. This is intended to replace most ad-hoc
  watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
  shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
  well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
  break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.

Revision 1.189.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:34:36 2007 UTC (19 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189.2.4: preferred, colored
Changes since revision 1.189.2.4: +4 -4 lines
sync with head.

Revision 1.209.2.4: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:47:52 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.209.2.3: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.3: +4 -4 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.210.6.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:39:51 2007 UTC (19 years ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.210: preferred, colored; next MAIN 1.211: preferred, colored
Changes since revision 1.210: +4 -4 lines
Sync with HEAD.

Revision 1.208.4.2: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:09:53 2007 UTC (19 years ago) by ad
Branches: vmlocking
Diff to: previous 1.208.4.1: preferred, colored; branchpoint 1.208: preferred, colored; next MAIN 1.209: preferred, colored
Changes since revision 1.208.4.1: +4 -4 lines
Sync with head.

Revision 1.211: download - view: text, markup, annotated - select for diffs
Fri Oct 19 12:01:22 2007 UTC (19 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: yamt-kmem, vmlocking2, mjf-devfs
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +4 -4 lines
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.209.2.3: download - view: text, markup, annotated - select for diffs
Mon Oct 1 05:38:05 2007 UTC (19 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.209.2.2: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.2: +62 -73 lines
Extend device API by device_power_private and device_power_set_private.
The latter is a temporary mean until the pnp_register API itself is
overhault. This functions allow a generic power handler to store its
state independent of the driver.

Use this and revamp the PCI power handling. Pretty much all PCI devices
had power handlers that did the same thing, generalize this in
pci_generic_power_register/deregister and the handler. This interface
offers callbacks for the drivers to save and restore state on
transistions. After a long discussion with jmcneill@ it was considered
to be powerful enough until evidence is shown that devices can handle
D1/D2 with less code and higher speed than without the full
save/restore. The generic code is carefully written to handle device
without PCI-PM support and ensure that the correct registers are written
to when D3 loses all state.

Reimplement the generic PCI network device handling on
top of PCI generic power handling.

Introduce pci_disable_retry as used and implemented locally at least by
ath(4) and iwi(4). Use it in this drivers to restore behaviour from
before the introduction of generic PCI network handling.

Convert all PCI drivers that were using pnp_register to the new
framework. The only exception is vga(4) as it is commonly used as
console device. Add a note therein that this should be fixed later.

Revision 1.189.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:39:12 2007 UTC (19 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189.2.3: preferred, colored
Changes since revision 1.189.2.3: +21 -14 lines
sync with head.

Revision 1.208.4.1: download - view: text, markup, annotated - select for diffs
Mon Aug 20 18:37:56 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +4 -2 lines
Sync with HEAD.

Revision 1.209.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 16 11:03:22 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.209.2.1: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.1: +3 -2 lines
Sync with HEAD.

Revision 1.208.14.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:48:48 2007 UTC (19 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.208: preferred, colored; next MAIN 1.209: preferred, colored
Changes since revision 1.208: +4 -2 lines
Sync with HEAD.

Revision 1.210: download - view: text, markup, annotated - select for diffs
Wed Aug 15 04:00:33 2007 UTC (19 years, 3 months ago) by kiyohara
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5
Branch point for: matt-armv6, bouyer-xenamd64
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -2 lines
* splsoftusb, IPL_SOFTUSB, and IPL_HARDUSB defines in usbdi.h
-> the current names are confusing (didn't change other drivers)
* fix invalid memory access in usbd_transfer (kern/24636)
-> needed for this driver
* fix USB HC detach race condition (kern/32011)
-> main patch needed for this driver, sc_dying changes in other drivers
not necessary but seem right to me

Patch from Matthew Orgass.
  http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html

Revision 1.209.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 22:17:25 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +75 -74 lines
Pull in power management changes from private branch.

Revision 1.209.4.2: download - view: text, markup, annotated - select for diffs
Wed Aug 1 22:40:17 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: matt-mips64
Diff to: previous 1.209.4.1: preferred, colored; branchpoint 1.209: preferred, colored; next MAIN 1.210: preferred, colored
Changes since revision 1.209.4.1: +3605 -0 lines
Clear the run flag in the command register when powering down, from
FreeBSD. Makes my laptop, and hopefully others, successfully sleep. Waking
up is a different story...

Revision 1.209.4.1
Wed Aug 1 22:40:16 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.209: +0 -3605 lines
file uhci.c was added on branch matt-mips64 on 2007-08-01 22:40:17 +0000

Revision 1.209: download - view: text, markup, annotated - select for diffs
Wed Aug 1 22:40:16 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: MAIN
CVS tags: matt-mips64-base
Branch point for: matt-mips64, jmcneill-pm
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -2 lines
Clear the run flag in the command register when powering down, from
FreeBSD. Makes my laptop, and hopefully others, successfully sleep. Waking
up is a different story...

Revision 1.208.12.5: download - view: text, markup, annotated - select for diffs
Fri Jun 22 10:49:45 2007 UTC (19 years, 5 months ago) by itohy
Branches: itohy-usb1
Diff to: previous 1.208.12.4: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.12.4: +8 -18 lines
Swap names of uhci_bufptr_rd() and uhci_bufptr_wr()
in order to avoid awkwardness like
	if (isread) {
		uhci_bufptr_wr(...)
	}

Revision 1.208.12.4: download - view: text, markup, annotated - select for diffs
Tue Jun 5 09:32:51 2007 UTC (19 years, 5 months ago) by itohy
Branches: itohy-usb1
Diff to: previous 1.208.12.3: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.12.3: +2 -1 lines
Fix problem where aux buffer is overwritten if multiple aux buffers
are used on a transfer.

Revision 1.208.12.3: download - view: text, markup, annotated - select for diffs
Sun Jun 3 13:10:41 2007 UTC (19 years, 5 months ago) by itohy
Branches: itohy-usb1
Diff to: previous 1.208.12.2: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.12.2: +9 -5 lines
Fix mbuf transfer.

Revision 1.208.12.2: download - view: text, markup, annotated - select for diffs
Thu May 31 23:15:17 2007 UTC (19 years, 5 months ago) by itohy
Branches: itohy-usb1
Diff to: previous 1.208.12.1: preferred, colored; branchpoint 1.208: preferred, colored
Changes since revision 1.208.12.1: +160 -42 lines
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.208.12.1: download - view: text, markup, annotated - select for diffs
Tue May 22 14:57:41 2007 UTC (19 years, 6 months ago) by itohy
Branches: itohy-usb1
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +884 -242 lines
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.207.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:06 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.207: preferred, colored; next MAIN 1.208: preferred, colored
Changes since revision 1.207: +19 -14 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.208: download - view: text, markup, annotated - select for diffs
Mon Feb 26 13:26:46 2007 UTC (19 years, 8 months ago) by drochner
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base, mjf-ufs-trans-base, mjf-ufs-trans, itohy-usb1-base, hpcarm-cleanup, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, nick-csl-alignment, itohy-usb1
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +19 -14 lines
-in root hub emulation, return a sane value as language code
-constify "methods" tables and (partly) descriptor templates

Revision 1.189.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:10:45 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189.2.2: preferred, colored
Changes since revision 1.189.2.2: +3 -5 lines
sync with head.

Revision 1.205.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 21 13:26:40 2007 UTC (19 years, 8 months ago) by tron
Branches: netbsd-4
CVS tags: wrstuden-fixsa-base-1, 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, matt-nb4-arm-base, matt-nb4-arm
Branch point for: wrstuden-fixsa
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +2 -4 lines
Pull up following revision(s) (requested by mlelstv in ticket #450):
	sys/dev/usb/ohci.c: revision 1.181
	sys/dev/usb/uhci.c: revision 1.207
	sys/dev/usb/ehci.c: revision 1.122
	sys/dev/usb/usbdi.c: revision 1.118
The diagnostic code doesn't track busy_free correctly when a
device gets removed. However, when the diagnostic check fails,
it is much better to complete the free operation than to abort
it, because this just causes an infinite loop.

Revision 1.207: download - view: text, markup, annotated - select for diffs
Sat Feb 10 07:52:29 2007 UTC (19 years, 9 months ago) by mlelstv
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +2 -4 lines
The diagnostic code doesn't track busy_free correctly when a
device gets removed. However, when the diagnostic check fails,
it is much better to complete the free operation than to abort
it, because this just causes an infinite loop.

Revision 1.199.2.2: download - view: text, markup, annotated - select for diffs
Thu Feb 1 08:48:29 2007 UTC (19 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.199.2.1: preferred, colored; branchpoint 1.199: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199.2.1: +3 -3 lines
Sync with head.

Revision 1.206: download - view: text, markup, annotated - select for diffs
Fri Jan 19 22:46:21 2007 UTC (19 years, 10 months ago) by drochner
Branches: MAIN
CVS tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +3 -3 lines
Kill the "bus powered" bit in the configuration descriptor. This doesn't
exist in newer spec revisions, and is recommended to be set to 1.
So call it _MBO and also use it in the fake root hub descriptors, just
for sanity, even if nothing ever looks at it.

Revision 1.189.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:49:39 2006 UTC (19 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189.2.1: preferred, colored
Changes since revision 1.189.2.1: +10 -4 lines
sync with head.

Revision 1.199.4.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:18:17 2006 UTC (19 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.199.4.1: preferred, colored; branchpoint 1.199: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199.4.1: +11 -10 lines
sync with head.

Revision 1.199.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:34:51 2006 UTC (20 years ago) by ad
Branches: newlock2
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +9 -4 lines
Sync with head.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:26 2006 UTC (20 years ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +9 -9 lines
__unused removal on arguments; approved by core.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Tue Oct 31 20:43:31 2006 UTC (20 years ago) by joerg
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +4 -3 lines
Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.

Revision 1.199.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:06:52 2006 UTC (20 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +14 -10 lines
sync with head

Revision 1.203: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:31:59 2006 UTC (20 years, 1 month ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +9 -9 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.202: download - view: text, markup, annotated - select for diffs
Tue Oct 3 18:21:53 2006 UTC (20 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +3 -2 lines
Coverity CID 3061: Add KASSERT (from Arnaud Lacombe)

Revision 1.201: download - view: text, markup, annotated - select for diffs
Mon Sep 25 22:15:15 2006 UTC (20 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +4 -2 lines
Only display "interrupt while not running ignored" if DIAGNOSTIC is set, as
whenever this happens, so many messages are spewed to the screen from the
kernel that the system is effectively useless. Hardly ignored :-)

Revision 1.200: download - view: text, markup, annotated - select for diffs
Sun Sep 24 03:54:00 2006 UTC (20 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +4 -3 lines
Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@

Revision 1.192.8.5: download - view: text, markup, annotated - select for diffs
Thu Sep 14 12:31:40 2006 UTC (20 years, 2 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.192.8.4: preferred, colored; branchpoint 1.192: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192.8.4: +3 -2 lines
sync with head.

Revision 1.192.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:55:33 2006 UTC (20 years, 2 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.192: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192: +43 -14 lines
sync with head

Revision 1.199: download - view: text, markup, annotated - select for diffs
Sun Sep 3 21:08:43 2006 UTC (20 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +3 -3 lines
add missing initializers.

Revision 1.198: download - view: text, markup, annotated - select for diffs
Sun Sep 3 21:03:11 2006 UTC (20 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +3 -2 lines
add missing initializer.

Revision 1.185.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 11 04:24:50 2006 UTC (20 years, 3 months ago) by riz
Branches: netbsd-3-0
CVS tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE
Diff to: previous 1.185.2.1: preferred, colored; next MAIN 1.185.2.2: preferred, colored
Changes since revision 1.185.2.1: +27 -2 lines
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.185.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 11 04:22:21 2006 UTC (20 years, 3 months ago) by riz
Branches: 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
Diff to: previous 1.185.2.1: preferred, colored; branchpoint 1.185: preferred, colored
Changes since revision 1.185.2.1: +27 -2 lines
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.196.4.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:49:44 2006 UTC (20 years, 4 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.196: preferred, colored; next MAIN 1.197: preferred, colored
Changes since revision 1.196: +4 -9 lines
Merge from HEAD.

Revision 1.192.8.4: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:52:28 2006 UTC (20 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.192.8.3: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.8.3: +4 -9 lines
sync with head.

Revision 1.196.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 03:39:49 2006 UTC (20 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.196: preferred, colored; next MAIN 1.197: preferred, colored
Changes since revision 1.196: +4 -9 lines
Complete a sync sys/ with head.

Revision 1.189.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:07:44 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +46 -18 lines
sync with head.

Revision 1.197: download - view: text, markup, annotated - select for diffs
Mon Jun 19 15:44:45 2006 UTC (20 years, 5 months ago) by gdamore
Branches: MAIN
CVS tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +4 -9 lines
Initial import of bluetooth stack on behalf of Iain Hibbert.  (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.

Revision 1.192.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:37:41 2006 UTC (20 years, 5 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.192.6.1: preferred, colored; branchpoint 1.192: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192.6.1: +25 -5 lines
Sync with head.

Revision 1.193.4.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:30 2006 UTC (20 years, 5 months ago) by tron
Branches: peter-altq
Diff to: previous 1.193: preferred, colored; next MAIN 1.194: preferred, colored
Changes since revision 1.193: +30 -7 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.192.8.3: download - view: text, markup, annotated - select for diffs
Wed May 24 10:58:24 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.192.8.2: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.8.2: +29 -7 lines
sync with head.

Revision 1.196: download - view: text, markup, annotated - select for diffs
Fri May 12 01:25:00 2006 UTC (20 years, 6 months ago) by mrg
Branches: MAIN
CVS tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base
Branch point for: gdamore-uart, chap-midi
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +25 -5 lines
make [OU]READ[124]() real inline functions instead of macros.

Revision 1.192.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:39:38 2006 UTC (20 years, 7 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +17 -4 lines
Sync with head.

Revision 1.193.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 19 03:26:30 2006 UTC (20 years, 7 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.193: preferred, colored; next MAIN 1.194: preferred, colored
Changes since revision 1.193: +7 -4 lines
sync with head.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Apr 14 16:31:27 2006 UTC (20 years, 7 months ago) by christos
Branches: MAIN
CVS tags: elad-kernelauth-base
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +6 -4 lines
Coverity CID 1133: Abort quickly if we don't have a buffer in all the cases.

Revision 1.192.8.2: download - view: text, markup, annotated - select for diffs
Sat Apr 1 12:07:30 2006 UTC (20 years, 7 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.192.8.1: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.8.1: +3 -2 lines
sync with head.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Fri Mar 31 17:31:13 2006 UTC (20 years, 7 months ago) by christos
Branches: MAIN
CVS tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +3 -2 lines
Only do the software reset if we are dying, like we do in ohci and ehci.
Pointed out by SAITOH Masanobu

Revision 1.192.8.1: download - view: text, markup, annotated - select for diffs
Mon Mar 13 09:07:32 2006 UTC (20 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +12 -2 lines
sync with head.

Revision 1.193: download - view: text, markup, annotated - select for diffs
Sun Mar 5 23:12:58 2006 UTC (20 years, 8 months ago) by augustss
Branches: MAIN
CVS tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq, elad-kernelauth
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +12 -2 lines
Use polling while shutting down the host controller since interrupts
cannot be trusted at this point.  From Iain Hibbert <plunky@rya-online.net>.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Sat Dec 24 23:41:34 2005 UTC (20 years, 10 months ago) by perry
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +4 -4 lines
__inline__ -> inline

Revision 1.191: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:24:01 2005 UTC (20 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +2 -2 lines
merge ktrace-lwp.

Revision 1.173.2.5: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:08:05 2005 UTC (21 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.173.2.4: preferred, colored; next MAIN 1.174: preferred, colored
Changes since revision 1.173.2.4: +44 -10 lines
Sync with HEAD. Here we go again...

Revision 1.190: download - view: text, markup, annotated - select for diffs
Mon Jul 18 11:08:00 2005 UTC (21 years, 4 months ago) by augustss
Branches: 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
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +4 -4 lines
Make sure we don't enable host controller interrupts until all
initialization is finished.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Mon May 30 04:21:39 2005 UTC (21 years, 5 months ago) by christos
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +4 -4 lines
- const poisoning
- eliminate variable shadowing

Revision 1.185.2.1: download - view: text, markup, annotated - select for diffs
Sun May 22 18:44:24 2005 UTC (21 years, 6 months ago) by snj
Branches: netbsd-3
CVS tags: 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
Branch point for: netbsd-3-0
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +12 -4 lines
Pull up revision 1.187 (requested by skrll in ticket #313):
Complete the interrupt output transfer support copy from FreeBSD, but
remove the incorrect access to the bulk part of the union.
Reviewed and OK'ed by Lennart.

Revision 1.178.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri May 13 17:09:28 2005 UTC (21 years, 6 months ago) by riz
Branches: netbsd-2
CVS tags: 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
Diff to: previous 1.178.2.1: preferred, colored; next MAIN 1.179: preferred, colored
Changes since revision 1.178.2.1: +24 -3 lines
Pull up revision 1.183 (requested by bad in ticket #1479):
Implement an USB memory reserve. Allocate some memory per host controller
in the wanted bus_dma space. If an allocation fails during operation
(i.e. when hotplugging an umass device), fall back to using the reserve.
The amount can be configured as USB_MEM_RESERVE. The default value is
256k.
Ideally, there would be a way to steal pages in the desired area from
UVM, but that's far more complicated, and this is not intrusive, plus
it works.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Sat Apr 30 14:38:40 2005 UTC (21 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +27 -2 lines
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.187: download - view: text, markup, annotated - select for diffs
Fri Apr 29 19:15:13 2005 UTC (21 years, 6 months ago) by skrll
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +12 -4 lines
Complete the interrupt output transfer support copy from FreeBSD, but
remove the incorrect access to the bulk part of the union.

Reviewed and OK'ed by Lennart.

Revision 1.183.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:18 2005 UTC (21 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.183: preferred, colored; next MAIN 1.184: preferred, colored
Changes since revision 1.183: +7 -6 lines
sync with -current

Revision 1.186: download - view: text, markup, annotated - select for diffs
Wed Apr 27 07:47:25 2005 UTC (21 years, 6 months ago) by skrll
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +5 -4 lines
KNF and s/a an/an/

Revision 1.183.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:35:58 2005 UTC (21 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.183: preferred, colored; next MAIN 1.184: preferred, colored
Changes since revision 1.183: +4 -4 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.173.2.4: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:50:55 2005 UTC (21 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.173.2.3: preferred, colored
Changes since revision 1.173.2.3: +4 -4 lines
Sync with HEAD.

Hi Perry!

Revision 1.185: download - view: text, markup, annotated - select for diffs
Wed Mar 2 11:37:27 2005 UTC (21 years, 8 months ago) by mycroft
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +3 -3 lines
Copyright maintenance.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Sun Feb 27 00:27:51 2005 UTC (21 years, 8 months ago) by perry
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +3 -3 lines
nuke trailing whitespace

Revision 1.173.2.3: download - view: text, markup, annotated - select for diffs
Mon Jan 17 19:31:53 2005 UTC (21 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.173.2.2: preferred, colored
Changes since revision 1.173.2.2: +24 -3 lines
Sync with HEAD.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Tue Dec 21 16:41:24 2004 UTC (21 years, 11 months ago) by fvdl
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +24 -3 lines
Implement an USB memory reserve. Allocate some memory per host controller
in the wanted bus_dma space. If an allocation fails during operation
(i.e. when hotplugging an umass device), fall back to using the reserve.

The amount can be configured as USB_MEM_RESERVE. The default value is
256k.

Ideally, there would be a way to steal pages in the desired area from
UVM, but that's far more complicated, and this is not intrusive, plus
it works.

Revision 1.173.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 2 07:53:03 2004 UTC (22 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.173.2.1: preferred, colored
Changes since revision 1.173.2.1: +5 -2 lines
Sync with HEAD.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Tue Oct 26 20:46:16 2004 UTC (22 years ago) by augustss
Branches: MAIN
CVS tags: kent-audio1-base, kent-audio1
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +5 -2 lines
Allow strings descriptor 0 to be fetched.  It's the default language index.

Revision 1.173.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:51:34 2004 UTC (22 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +24 -12 lines
Sync with HEAD

Revision 1.181: download - view: text, markup, annotated - select for diffs
Thu Jul 22 18:45:40 2004 UTC (22 years, 4 months ago) by drochner
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +3 -3 lines
typo in comment

Revision 1.180: download - view: text, markup, annotated - select for diffs
Sat Jul 17 20:12:03 2004 UTC (22 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +2 -4 lines
hcpriv is not actually used here.  Remove references to it.

Revision 1.178.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 2 17:16:14 2004 UTC (22 years, 4 months ago) by he
Branches: netbsd-2-0
CVS tags: netbsd-2-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
Branch point for: netbsd-2
Diff to: previous 1.178: preferred, colored; next MAIN 1.179: preferred, colored
Changes since revision 1.178: +4 -4 lines
Pull up revision 1.179 (requested by mycroft in ticket #572):
  Several fixes mostly related to USB:
   o Make a message dependent on ohcidebug, so it does not
     interfere with polled operation, e.g. when entering a
     root device or in DDB.

Revision 1.179: download - view: text, markup, annotated - select for diffs
Tue Jun 29 03:57:36 2004 UTC (22 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +4 -4 lines
Make one message dependent on ohcidebug, so it doesn't interfere with polled
operation; e.g. when entering a root device or in DDB.

Revision 1.159.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 15 04:37:29 2004 UTC (22 years, 8 months ago) by jmc
Branches: netbsd-1-6
Diff to: previous 1.159.2.1: preferred, colored; branchpoint 1.159: preferred, colored; next MAIN 1.160: preferred, colored
Changes since revision 1.159.2.1: +3 -3 lines
Pullup rev 1.177 (requested by toshii in ticket #1599)

Use the correct wValue to get hub desriptors.
Also, make wValue checks of root hub codes less strict.

Revision 1.178: download - view: text, markup, annotated - select for diffs
Tue Mar 2 16:32:05 2004 UTC (22 years, 8 months ago) by martin
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +6 -4 lines
Interrupt descriptors might become invalid while being processed in
uhci_check_intr - so remember their next pointer before calling it.
Patch provided by Matthew Orgass in PR kern/24542.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon Dec 29 08:17:10 2003 UTC (22 years, 10 months ago) by toshii
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +3 -3 lines
Use the correct wValue to get hub desriptors.
Also, make wValue checks of root hub codes less strict.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Tue Nov 4 19:11:21 2003 UTC (23 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +11 -2 lines
Ignore a CRCTO error on a SETUP transaction in combination with STALLED or NAK.
This fixes problems with the GL641.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Fri Sep 12 16:18:08 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +3 -3 lines
Tweak a debugging printf().

Revision 1.174: download - view: text, markup, annotated - select for diffs
Thu Jul 3 11:24:13 2003 UTC (23 years, 4 months ago) by drochner
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +6 -3 lines
avoid a gcc3 warning about a never-true comparision in the
mstohz() macro

Revision 1.173: download - view: text, markup, annotated - select for diffs
Tue May 13 04:41:59 2003 UTC (23 years, 6 months ago) by gson
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +13 -13 lines
Function names printed in debug messages did not always match the
actual name of the function.

Revision 1.172: download - view: text, markup, annotated - select for diffs
Sun Feb 23 04:19:26 2003 UTC (23 years, 8 months ago) by simonb
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +2 -3 lines
Remove unreachable break after return.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Sat Feb 22 05:24:17 2003 UTC (23 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +5 -7 lines
Use mstohz() in <sys/param.h> rather than homegrown MS_TO_TICKS().

Revision 1.170: download - view: text, markup, annotated - select for diffs
Wed Feb 19 01:35:04 2003 UTC (23 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +5 -2 lines
Bail out early in isoc_done if the ii is not on the interrupt list.

Revision 1.169: download - view: text, markup, annotated - select for diffs
Sun Feb 16 23:15:28 2003 UTC (23 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +21 -7 lines
Don't take xfers off the interrupt list if they are not on it yet.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Sat Feb 8 03:32:51 2003 UTC (23 years, 9 months ago) by ichiro
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +3 -3 lines
change URL pointers of USB[1,2] specification

Revision 1.159.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 26 09:37:05 2003 UTC (23 years, 9 months ago) by jmc
Branches: netbsd-1-6
CVS tags: 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
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +101 -14 lines
Pullup revisions 1.165-1.167 (requested by dsainty in ticket #1079)
 Be somewhat more persuasive about enabling the port on a port reset. USB
 protocol dictates that the port enable must be implied by the port
 reset. To implement this on (at least) the VIA VT83C572 this means we
 need to wait around tweaking the chip state until the port actually
 transitions to enabled (or the device goes away).  Likely fixes
 kern/11018.

 Reissue the MAXP command on resume.  From FreeBSD.

Revision 1.133.2.13: download - view: text, markup, annotated - select for diffs
Fri Jan 3 17:08:15 2003 UTC (23 years, 10 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.133.2.12: preferred, colored; next MAIN 1.134: preferred, colored
Changes since revision 1.133.2.12: +107 -17 lines
Sync with HEAD.

Revision 1.167: download - view: text, markup, annotated - select for diffs
Wed Jan 1 16:25:59 2003 UTC (23 years, 10 months ago) by augustss
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +3 -2 lines
Reissue the MAXP command on resume.  From FreeBSD.

Revision 1.166: download - view: text, markup, annotated - select for diffs
Tue Dec 31 02:21:31 2002 UTC (23 years, 10 months ago) by dsainty
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +100 -14 lines
Be somewhat more persuasive about enabling the port on a port reset.
USB protocol dictates that the port enable must be implied by the port
reset. To implement this on (at least) the VIA VT83C572 this means we
need to wait around tweaking the chip state until the port actually
transitions to enabled (or the device goes away).  Likely fixes
kern/11018.

Revision 1.165: download - view: text, markup, annotated - select for diffs
Tue Dec 31 02:04:49 2002 UTC (23 years, 10 months ago) by dsainty
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +8 -5 lines
CONSTCOND away some lint warnings

Revision 1.133.2.12: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:44:32 2002 UTC (24 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.11: preferred, colored
Changes since revision 1.133.2.11: +13 -7 lines
Catch up to -current.

Revision 1.135.2.8: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:42:37 2002 UTC (24 years, 1 month ago) by jdolecek
Branches: kqueue
Diff to: previous 1.135.2.7: preferred, colored; branchpoint 1.135: preferred, colored; next MAIN 1.136: preferred, colored
Changes since revision 1.135.2.7: +15 -9 lines
sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.164: download - view: text, markup, annotated - select for diffs
Sun Sep 29 21:13:01 2002 UTC (24 years, 1 month ago) by augustss
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +8 -2 lines
Add #ifdef USB_USE_SOFTINTR for some softintr code.  From FreeBSD.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Fri Sep 27 15:37:36 2002 UTC (24 years, 1 month ago) by provos
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +9 -9 lines
remove trailing \n in panic().  approved perry.

Revision 1.135.2.7: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:46:53 2002 UTC (24 years, 2 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.135.2.6: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.6: +4 -4 lines
sync kqueue branch with HEAD

Revision 1.133.2.11: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:45:57 2002 UTC (24 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.10: preferred, colored
Changes since revision 1.133.2.10: +4 -4 lines
Catch up to -current.

Revision 1.158.4.3: download - view: text, markup, annotated - select for diffs
Mon Jul 15 10:36:06 2002 UTC (24 years, 4 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.158.4.2: preferred, colored; branchpoint 1.158: preferred, colored; next MAIN 1.159: preferred, colored
Changes since revision 1.158.4.2: +4 -4 lines
catch up with -current.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Thu Jul 11 21:14:28 2002 UTC (24 years, 4 months ago) by augustss
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +4 -4 lines
Get rid of trailing white space.

Revision 1.133.2.10: download - view: text, markup, annotated - select for diffs
Wed Jul 10 17:30:28 2002 UTC (24 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.9: preferred, colored
Changes since revision 1.133.2.9: +3 -3 lines
Don't need curlwp here.

Revision 1.133.2.9: download - view: text, markup, annotated - select for diffs
Mon Jun 24 22:10:28 2002 UTC (24 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.8: preferred, colored
Changes since revision 1.133.2.8: +3 -3 lines
Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.135.2.6: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:49:07 2002 UTC (24 years, 4 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.135.2.5: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.5: +20 -20 lines
catch up with -current on kqueue branch

Revision 1.158.4.2: download - view: text, markup, annotated - select for diffs
Thu Jun 20 16:34:12 2002 UTC (24 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.158.4.1: preferred, colored; branchpoint 1.158: preferred, colored
Changes since revision 1.158.4.1: +4 -4 lines
catch up with -current.

Revision 1.133.2.8: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:46:54 2002 UTC (24 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.7: preferred, colored
Changes since revision 1.133.2.7: +17 -17 lines
Catch up to -current.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Sat Jun 1 23:51:04 2002 UTC (24 years, 5 months ago) by lukem
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +4 -4 lines
SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups

Revision 1.158.4.1: download - view: text, markup, annotated - select for diffs
Thu May 30 14:47:35 2002 UTC (24 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +15 -15 lines
Catch up with -current.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Tue May 28 12:42:39 2002 UTC (24 years, 5 months ago) by augustss
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +9 -9 lines
Change DMAADDR macro slightly.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Sun May 19 06:24:32 2002 UTC (24 years, 6 months ago) by augustss
Branches: MAIN
CVS tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Branch point for: netbsd-1-6
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +8 -8 lines
Update dma memory access API a little.

Revision 1.133.2.7: download - view: text, markup, annotated - select for diffs
Mon Apr 1 07:47:34 2002 UTC (24 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.6: preferred, colored
Changes since revision 1.133.2.6: +6 -6 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.158: download - view: text, markup, annotated - select for diffs
Sun Mar 17 18:02:53 2002 UTC (24 years, 8 months ago) by augustss
Branches: MAIN
CVS tags: eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +3 -3 lines
Whitespace fixes.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sat Mar 16 16:13:41 2002 UTC (24 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +4 -4 lines
Fix a couple of typo:
- s/ehci/uhci/ (in unused arg of macro)
- s/ohci/uhci/ (in panic message)

Revision 1.135.2.5: download - view: text, markup, annotated - select for diffs
Sat Mar 16 16:01:37 2002 UTC (24 years, 8 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.135.2.4: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.4: +82 -36 lines
Catch up with -current.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Mon Mar 4 00:53:33 2002 UTC (24 years, 8 months ago) by augustss
Branches: MAIN
CVS tags: newlock-base, newlock
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +3 -3 lines
Use the correct pointer for the timeout abort.

Revision 1.133.2.6: download - view: text, markup, annotated - select for diffs
Thu Feb 28 04:14:30 2002 UTC (24 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.5: preferred, colored
Changes since revision 1.133.2.5: +150 -109 lines
Catch up to -current.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Wed Feb 27 12:42:41 2002 UTC (24 years, 8 months ago) by augustss
Branches: MAIN
CVS tags: ifpoll-base
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +8 -8 lines
Move the interrupt bailout when a cancelled ii is found.

Revision 1.154: download - view: text, markup, annotated - select for diffs
Wed Feb 27 12:12:45 2002 UTC (24 years, 8 months ago) by augustss
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +14 -9 lines
Remove spurious splusb().
Lower abort hardware wait.

Revision 1.135.2.4: download - view: text, markup, annotated - select for diffs
Mon Feb 11 20:10:16 2002 UTC (24 years, 9 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.135.2.3: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.3: +71 -76 lines
Sync w/ -current.

Revision 1.153: download - view: text, markup, annotated - select for diffs
Mon Feb 11 11:40:33 2002 UTC (24 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +67 -26 lines
Switch to the same abort mechanism as in [eo]hci; it should be more
robust.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sun Feb 3 18:15:20 2002 UTC (24 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +69 -74 lines
Some white space fixes from FreeBSD.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Sun Jan 27 23:00:34 2002 UTC (24 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +3 -3 lines
Use M_WAITOK instead of M_NOWAIT when allocating extra descriptors.
Spotted by OpenBSD.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Mon Jan 14 13:23:37 2002 UTC (24 years, 10 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +4 -4 lines
Call malloc(9) with M_ZERO flag instead of memset() after malloc().

Revision 1.135.2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:58:56 2002 UTC (24 years, 10 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.135.2.2: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.2: +79 -44 lines
Sync kqueue branch with -current.

Revision 1.133.2.5: download - view: text, markup, annotated - select for diffs
Tue Jan 8 00:32:08 2002 UTC (24 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.4: preferred, colored
Changes since revision 1.133.2.4: +22 -18 lines
Catch up to -current.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Wed Nov 21 15:48:37 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +5 -5 lines
Use NULL not 0.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Wed Nov 21 12:25:55 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -3 lines
Fix typo in comment.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Wed Nov 21 02:38:36 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +6 -5 lines
Cast some args to bitmask_snprintf().

Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue Nov 20 21:12:46 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +5 -2 lines
Don't bother with interrupts when being disconnected.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Tue Nov 20 16:08:10 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +3 -3 lines
Use longer reset for root hubs (as told in the spec).

Revision 1.144: download - view: text, markup, annotated - select for diffs
Tue Nov 20 13:48:32 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +10 -10 lines
Keep track of device speed for USB 2.0.

Revision 1.133.2.4: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:16:17 2001 UTC (25 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.3: preferred, colored
Changes since revision 1.133.2.3: +54 -23 lines
Catch up to -current.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Tue Nov 13 06:24:55 2001 UTC (25 years ago) by lukem
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +4 -1 lines
add RCSIDs

Revision 1.138.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 12 21:18:30 2001 UTC (25 years ago) by thorpej
Branches: thorpej-mips-cache
Diff to: previous 1.138: preferred, colored; next MAIN 1.139: preferred, colored
Changes since revision 1.138: +51 -23 lines
Sync the thorpej-mips-cache branch with -current.

Revision 1.120.2.3: download - view: text, markup, annotated - select for diffs
Sat Oct 27 19:37:52 2001 UTC (25 years ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003
Diff to: previous 1.120.2.2: preferred, colored; branchpoint 1.120: preferred, colored; next MAIN 1.121: preferred, colored
Changes since revision 1.120.2.2: +5 -5 lines
Pull up revision 1.127 (requested by pooka):
  Fix warnings about interrupts which were not for uhci.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Thu Oct 25 02:08:13 2001 UTC (25 years ago) by augustss
Branches: MAIN
CVS tags: thorpej-mips-cache-base
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +14 -16 lines
Change reset sequence to get status change bits set right on startup.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Wed Oct 24 21:04:04 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +20 -4 lines
Some more paranoia tests when entering the interrupt routine.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Wed Oct 24 20:20:03 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +9 -5 lines
More debug.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Wed Oct 24 00:42:05 2001 UTC (25 years ago) by augustss
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +11 -1 lines
More null pointer checks in dump routine.

Revision 1.137.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 11 00:02:29 2001 UTC (25 years, 1 month ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.137: preferred, colored; next MAIN 1.138: preferred, colored
Changes since revision 1.137: +6 -6 lines
Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.

Revision 1.133.2.3: download - view: text, markup, annotated - select for diffs
Mon Oct 8 20:11:36 2001 UTC (25 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.2: preferred, colored
Changes since revision 1.133.2.2: +6 -6 lines
Catch up to -current.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Tue Oct 2 17:59:38 2001 UTC (25 years, 1 month ago) by pooka
Branches: MAIN
CVS tags: thorpej-devvp-base3
Branch point for: thorpej-mips-cache
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +6 -6 lines
move DIAGNOSTIC-printf up one block to make it reachable

noted by Christophe Kalt in private email

Revision 1.135.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 25 06:16:39 2001 UTC (25 years, 2 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.135.2.1: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.1: +10 -10 lines
Merge Aug 24 -current into the kqueue branch.

Revision 1.133.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:11:08 2001 UTC (25 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133.2.1: preferred, colored
Changes since revision 1.133.2.1: +14 -14 lines
Catch up with -current.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Mon Aug 6 15:15:08 2001 UTC (25 years, 3 months ago) by augustss
Branches: MAIN
CVS tags: thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +10 -10 lines
Don't write back status bits that are cleared when written.

Revision 1.135.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:13:35 2001 UTC (25 years, 3 months ago) by lukem
Branches: kqueue
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +5 -5 lines
update to -current

Revision 1.136: download - view: text, markup, annotated - select for diffs
Wed Jul 11 14:11:00 2001 UTC (25 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +5 -5 lines
Rearrange register dump when the controller is dying.  Fixes PR 13430.

Revision 1.120.2.2: download - view: text, markup, annotated - select for diffs
Sun May 6 15:06:16 2001 UTC (25 years, 6 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Diff to: previous 1.120.2.1: preferred, colored; branchpoint 1.120: preferred, colored
Changes since revision 1.120.2.1: +11 -3 lines
Pull up revision 1.128 (requested by he):
  Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
  PWR_SOFTRESUME.  Apm calls powerhook with the values in normal interrupt
  priority level while others are protected with splhigh().

Revision 1.61.2.7: download - view: text, markup, annotated - select for diffs
Sat Apr 21 17:49:57 2001 UTC (25 years, 7 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.61.2.6: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61.2.6: +2 -4 lines
Sync with HEAD

Revision 1.133.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 9 01:57:33 2001 UTC (25 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +5 -4 lines
Catch up with -current.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Sun Apr 1 14:59:52 2001 UTC (25 years, 7 months ago) by augustss
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +2 -4 lines
Avoid a potential null pointer dereference.  From OpenBSD.

Revision 1.61.2.6: download - view: text, markup, annotated - select for diffs
Tue Mar 27 15:32:17 2001 UTC (25 years, 7 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.61.2.5: preferred, colored
Changes since revision 1.61.2.5: +4 -1 lines
Sync with HEAD.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Sun Mar 25 22:52:21 2001 UTC (25 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +4 -1 lines
Try to make resume work on more machines.

Revision 1.61.2.5: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:16:25 2001 UTC (25 years, 9 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.61.2.4: preferred, colored
Changes since revision 1.61.2.4: +9 -10 lines
Sync with HEAD.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Sun Jan 21 02:39:52 2001 UTC (25 years, 10 months ago) by augustss
Branches: MAIN
Branch point for: nathanw_sa
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +4 -4 lines
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.132: download - view: text, markup, annotated - select for diffs
Sat Jan 20 23:36:02 2001 UTC (25 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +6 -7 lines
Change some splusb() to splhardusb().

Revision 1.61.2.4: download - view: text, markup, annotated - select for diffs
Fri Jan 5 17:36:31 2001 UTC (25 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.61.2.3: preferred, colored
Changes since revision 1.61.2.3: +6 -5 lines
Sync with HEAD

Revision 1.131: download - view: text, markup, annotated - select for diffs
Fri Dec 29 01:24:56 2000 UTC (25 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +3 -3 lines
Update many URLs.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Dec 18 15:55:30 2000 UTC (25 years, 11 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +2 -2 lines
Add missed le32toh() in uhci_device_isoc_abort().

Revision 1.129: download - view: text, markup, annotated - select for diffs
Sat Dec 16 16:09:24 2000 UTC (25 years, 11 months ago) by augustss
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +4 -3 lines
Don't repeat 'host controller halted' message.  From OpenBSD.

Revision 1.61.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 8 09:12:44 2000 UTC (25 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.61.2.2: preferred, colored
Changes since revision 1.61.2.2: +14 -6 lines
Sync with HEAD.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Sun Nov 26 11:08:59 2000 UTC (25 years, 11 months ago) by takemura
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +11 -3 lines
Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().

Revision 1.61.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:05:04 2000 UTC (25 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.61.2.1: preferred, colored
Changes since revision 1.61.2.1: +5 -3 lines
Sync with HEAD.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Wed Nov 22 05:50:59 2000 UTC (26 years ago) by soren
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +5 -5 lines
In uhci_intr(), only warn about power state confusion if the
interrupt was actually for us.

Revision 1.61.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 11:43:25 2000 UTC (26 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1284 -926 lines
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.126: download - view: text, markup, annotated - select for diffs
Fri Nov 10 14:11:49 2000 UTC (26 years ago) by augustss
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +5 -3 lines
Update frlengths after a isoc transfer.
Suggested by Yuri <yuri@tsoft.com>

Revision 1.125: download - view: text, markup, annotated - select for diffs
Sat Sep 23 21:00:10 2000 UTC (26 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +19 -3 lines
Avoid "bandwidth reclamation" for control transfers.  The kue device chokes
on it.

Revision 1.120.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 22 04:11:54 2000 UTC (26 years, 3 months ago) by augustss
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +28 -1 lines
Pull up (approved by thorpej):
Fix race condition when unlinking xfers.  Thanks to IWAMOTO Toshihiro
<iwamoto@sat.t.u-tokyo.ac.jp> for analyzing the problem and suggesting a fix.
Fixes PR 10662.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Sun Aug 13 18:20:14 2000 UTC (26 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +36 -3 lines
Fix race condition when unlinking xfers.  Thanks to IWAMOTO Toshihiro
<iwamoto@sat.t.u-tokyo.ac.jp> for analyzing the problem and suggesting a fix.
Fixes PR 10662.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Sun Aug 13 16:18:09 2000 UTC (26 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +136 -31 lines
Implement what in Intel-speech is known as "bandwidth reclamation".
It means that we continously poll USB devices that have a pending transfer
instead of polling just once every ms.  This speeds up some transfers
at the expense of using more PCI bandwidth.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Tue Aug 8 19:51:47 2000 UTC (26 years, 3 months ago) by tv
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +27 -12 lines
%b -> bitmask_snprintf()

Because this code is shared, add a macro for bitmask_snprintf() that
should expand to the equivalent snprintf() on non-NetBSD systems.  This is
only used in ?HCI_DEBUG cases anyway.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sun Jul 23 19:43:37 2000 UTC (26 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +25 -25 lines
Be a little more explicit and careful about setting links in TDs and QHs.

Revision 1.115.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 17:08:36 2000 UTC (26 years, 5 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.115: preferred, colored; next MAIN 1.116: preferred, colored
Changes since revision 1.115: +196 -299 lines
Sync w/ netbsd-1-5-base.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Thu Jun 1 15:51:26 2000 UTC (26 years, 5 months ago) by augustss
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +3 -1 lines
Make it compile with USB_DEBUG.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Thu Jun 1 14:28:59 2000 UTC (26 years, 5 months ago) by augustss
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +187 -300 lines
Bring the coding style into the 80s, i.e., get rid of __P and use
ANSI prototypes and declarations.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Tue May 30 16:56:54 2000 UTC (26 years, 5 months ago) by augustss
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +3 -1 lines
Don't print anything when detecting resume.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Tue May 30 09:26:06 2000 UTC (26 years, 5 months ago) by augustss
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +7 -1 lines
As a safety, check that the controller is not suspended when we get
an interrupt.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Sun May 28 22:02:05 2000 UTC (26 years, 5 months ago) by jhawk
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +2 -2 lines
Make this compile with UHCI_DEBUG in the presence of
-Werror: uhci_dump is no longer static.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed May 3 18:21:36 2000 UTC (26 years, 6 months ago) by mycroft
Branches: MAIN
CVS tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +2 -2 lines
Use USBD_NORMAL_COMPLETION in the previous.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Wed May 3 18:14:49 2000 UTC (26 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +2 -1 lines
When emulating UHF_PORT_POWER for the internal hub, make sure to initialize
the status return value.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Thu Apr 27 15:26:48 2000 UTC (26 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +2 -2 lines
Change my email address.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Tue Apr 25 14:28:14 2000 UTC (26 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +12 -7 lines
Insert (very conservative!) bus_space_barrier() calls at all register accesses.
The bus_space(9) man page says you've gotta have them...

Revision 1.111: download - view: text, markup, annotated - select for diffs
Fri Apr 21 15:40:01 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +4 -2 lines
Pretend we know how to turn on port power (it's always on).

Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Apr 14 14:11:36 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +17 -6 lines
Generate a diagnistic dump on "Host Controller Halted".

Revision 1.109: download - view: text, markup, annotated - select for diffs
Thu Apr 6 23:44:20 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -2 lines
Fix typos in comments.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Mar 29 18:55:36 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +1 -3 lines
Remove some unused prototypes.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Wed Mar 29 18:24:53 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +2 -2 lines
Some OpenBSD portability fixes.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Wed Mar 29 01:49:13 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +14 -309 lines
*SIGH*  Revert back to the old method of aborting xfers.
I had tested the new stuff for two months now, but as soon as I commited
it the problems started to appear.  Murphy, no doubt...

Revision 1.105: download - view: text, markup, annotated - select for diffs
Tue Mar 28 17:07:04 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +5 -3 lines
Be more defensive in a DIAGNOSTIC test.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Tue Mar 28 10:53:59 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -2 lines
Correct a debug message.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Tue Mar 28 09:47:10 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +11 -1 lines
Another patch for xfer abort...
XXX The current xfer queueing and aborting semantics should really
XXX be changed.  It cannot be implemented in a sane way on UHCI.
XXX One day when I have lots of time I'll redesign it...

Revision 1.102: download - view: text, markup, annotated - select for diffs
Mon Mar 27 22:42:57 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +66 -26 lines
Be a little more careful when aborting.
Preallocate some TDs for large buffers.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Mon Mar 27 12:33:55 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +92 -92 lines
Change (almost) all static to Static.  The symbol `Static' can then be defined
to `' or `static' depending on if you want to debug or not.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Mon Mar 27 09:41:36 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +13 -3 lines
Don't mess with QH in bulk abort for the moment.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Mon Mar 27 08:01:09 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +1 -5 lines
Remove some debug nonsense.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Mon Mar 27 07:39:48 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +12 -4 lines
Make it compile without DIAGNOSTIC.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Sun Mar 26 21:42:54 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +2 -2 lines
Fix typo.  Found by Aaron Campbell <aaron@cs.dal.ca>.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sat Mar 25 18:02:32 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +52 -40 lines
Rename and move around callout handles to make it more sane.
Add some DIAGNOSTIC.
Fix buglet in isoc abort on UHCI.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sat Mar 25 07:23:12 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +24 -7 lines
Improve uhci_dump_ii().

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sat Mar 25 07:13:05 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +28 -11 lines
More DIAGNOSTIC.
Initialize a callout handle I forgot.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sat Mar 25 00:11:21 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +26 -1 lines
Add more DIAGNOSTIC when aborting isoc.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri Mar 24 22:57:58 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +463 -250 lines
Two major changes:

  Make each xfer have its own intr_info.  This is necessary if we want
to queue multiple xfers on an endpoint.  This should get rid of the
(mostly harmless) DIAGNOSTICs about intr_infos (not) being done.

  Change (again!) how xfers are aborted.  Aborting a TD is a nightmare
on the braindead UHCI controller.  (Unless you stop the HC, thereby
losing isoc traffic.)  Hopefully I got it right this time.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Fri Mar 24 22:03:31 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +23 -38 lines
Some cleanup and renaming of the callouts used in USB drivers.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Thu Mar 23 18:59:10 2000 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +8 -1 lines
Shake out some bugs from the callout changes.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Mar 23 07:01:46 2000 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +5 -3 lines
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.88: download - view: text, markup, annotated - select for diffs
Thu Mar 16 12:40:51 2000 UTC (26 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +98 -91 lines
Replace LE() macro with le32toh()/le32toh().

Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Feb 29 21:37:01 2000 UTC (26 years, 8 months ago) by augustss
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +5 -5 lines
Distinguish between device and interface classes.
(I finally found a document that said that they were different.)

Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Feb 22 16:03:42 2000 UTC (26 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +12 -5 lines
Save and restore a couple ofregisters in the power hook in case BIOS doesn't.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Feb 22 11:30:55 2000 UTC (26 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +20 -7 lines
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.84: download - view: text, markup, annotated - select for diffs
Fri Jan 28 00:44:27 2000 UTC (26 years, 9 months ago) by augustss
Branches: MAIN
CVS tags: chs-ubc2-newbase
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +9 -2 lines
Add uhci_root_ctrl_done() method.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Fri Jan 28 00:15:54 2000 UTC (26 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +12 -4 lines
Change the test to check if transfers are done.  The old test was broken
and sometimes reported transfers as done prematurely.
This fix seems to stabilize the Ethernet drivers.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Wed Jan 26 10:04:38 2000 UTC (26 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +23 -1 lines
Try to avoid accessing the HC if it is dead.  Suggested by mycroft.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Jan 25 17:31:05 2000 UTC (26 years, 9 months ago) by augustss
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +4 -4 lines
Switch the HSE and HCPE messages.  Pointed out my mycroft.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Jan 19 01:16:38 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -2 lines
Fix typos.
Never, never, never commit without compiling first.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Jan 19 01:04:26 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +6 -3 lines
Obey the interrupt interval here also.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Jan 19 01:02:11 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +2 -2 lines
Fix a buglet in framelist locking.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Tue Jan 18 20:23:42 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -1 lines
Move the zeroing of the xfer to the individual methods.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Jan 18 20:11:00 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +44 -2 lines
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.75: download - view: text, markup, annotated - select for diffs
Mon Jan 17 01:01:07 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +2 -2 lines
Be a little more talkative on with UHCIDEBUG on errors.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sun Jan 16 13:14:43 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +2 -2 lines
Remove some debug code that was commited by mistake.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sun Jan 16 13:12:05 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +25 -25 lines
Add a flag, USBD_FORCE_SHORT_XFER, to transfers.  Using this flag will
force the last packet of a transfer to be smaller than the maximum
packet size.  The only time this matters is if the transfer size is
a multiple of the maximum packet size, in which case a 0 length packet
is sent last.
Some weird devices require this behaviour to determine the end of
a transfer.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sun Jan 16 10:27:51 2000 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +25 -6 lines
Add shutdown hooks to ensure that the host controller is halted when
a reboot occurs.

Revision 1.56.2.1: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:35:42 1999 UTC (26 years, 10 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56: +602 -474 lines
Pull up to last week's -current.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri Dec 24 13:56:35 1999 UTC (26 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +12 -4 lines
Turn on the MAXP bit in the controller to allow 64 byte packets at
the end of a frame.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Mon Dec 6 21:07:00 1999 UTC (26 years, 11 months ago) by augustss
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +21 -9 lines
Cosmetics and a couple of diagnostic messages.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Dec 1 00:42:05 1999 UTC (26 years, 11 months ago) by augustss
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +7 -4 lines
Use vertical nscheduling for bulk traffic.  It improves bulk thruput a lot.
From FreeBSD and Nick Hibma.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Tue Nov 23 20:36:10 1999 UTC (26 years, 11 months ago) by augustss
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -1 lines
A little cosmetic.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Thu Nov 18 23:32:28 1999 UTC (27 years ago) by augustss
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +109 -39 lines
Cosmetic changes and some small improvements.  From FreeBSD and Nick Hibma.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Wed Nov 17 23:00:50 1999 UTC (27 years ago) by augustss
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +14 -14 lines
A few more purely stylistic changes that I missed in the last round.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Tue Nov 16 22:19:03 1999 UTC (27 years ago) by augustss
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +5 -2 lines
Add a few more diagnostics.

Revision 1.61.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 15 00:41:33 1999 UTC (27 years ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +409 -411 lines
Sync with -current

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sat Nov 13 23:58:01 1999 UTC (27 years ago) by augustss
Branches: MAIN
CVS tags: fvdl-softdep-base
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +5 -4 lines
Get transfer status right on short transfers.  From FreeBSD, Nick Hibma.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Nov 12 00:34:57 1999 UTC (27 years ago) by augustss
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +401 -407 lines
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.62: download - view: text, markup, annotated - select for diffs
Sat Oct 23 00:21:01 1999 UTC (27 years, 1 month ago) by augustss
Branches: MAIN
CVS tags: comdex-fall-1999-base, comdex-fall-1999
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +5 -2 lines
Fix PR8666, to verbose diagnostics.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Oct 17 15:31:00 1999 UTC (27 years, 1 month ago) by augustss
Branches: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +5 -5 lines
Handle the (weird) case when the power hook is called with a resume
without a prior suspend.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat Oct 16 15:35:18 1999 UTC (27 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +7 -1 lines
Add a DIAGNOSTIC to check that the polling flag is set when resuming.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Oct 13 08:10:56 1999 UTC (27 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +55 -27 lines
Merge in a large batch of changes from Nick Hibma <hibma@skylink.it> so
the USB stack compiles on FreeBSD again.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Oct 12 20:02:47 1999 UTC (27 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +8 -1 lines
Fix some bugs in USB controller detach code.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Oct 12 11:21:26 1999 UTC (27 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +3 -4 lines
Deallocate resources (bus space and interrupts) when detaching from
the bus.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Sep 18 11:25:51 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Branch point for: wrstuden-devbsize
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -2 lines
Make sure the HC deactivation is propagated.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Wed Sep 15 21:12:29 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +37 -37 lines
Cosmetic change: s/xfer/data/

Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Sep 15 14:17:14 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
Handle the use_polling flag with a lttle more care and only set it if
we are cold booting.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Sep 15 10:25:31 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +41 -2 lines
Add preliminary (untested) code for detaching the USB host controller
(needed for CardBus based controllers).

Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Sep 13 21:33:25 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +34 -13 lines
* 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.51: download - view: text, markup, annotated - select for diffs
Mon Sep 13 19:49:41 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +8 -3 lines
Make sure timeouts count as interrupt context too.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Sep 13 19:18:17 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +21 -18 lines
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.49: download - view: text, markup, annotated - select for diffs
Sat Sep 11 08:19:26 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +30 -127 lines
* Move DMA buffer allocation to HC independent code.
* Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu Sep 9 12:26:45 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +308 -140 lines
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.47: download - view: text, markup, annotated - select for diffs
Sun Sep 5 21:22:39 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +42 -42 lines
Change some printf to DPRINTF for consistency.  From Nick Hibma, FreeBSD.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Sep 5 19:32:18 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +6 -5 lines
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.45: download - view: text, markup, annotated - select for diffs
Sat Sep 4 22:26:12 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +7 -6 lines
Change the way the direction is extracted from the endpoint descriptor.
No functional changes to the drivers.  From Nick Hibma, FreeBSD.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Thu Sep 2 18:11:41 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +36 -32 lines
Rewrite interrupt routine from clarity.  From Nick Hibma, FreeBSD.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sun Aug 22 23:41:00 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
Merge the soft_{td,ed} with the real {td,ed}.  This saves time and space.
(And fix typo in corresponding uhci change.)

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sun Aug 22 23:19:56 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +144 -160 lines
Merge the soft_{td,qh} with the real {td,qh}.  This saves time and space.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Aug 22 20:12:39 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +84 -81 lines
Move more of the transfer completion processing to HC independent code.
Fix some problems with transfer abort & timeout.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Aug 20 16:42:38 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +9 -7 lines
Make sure not to call tsleep() from suspend/resume routine.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Aug 19 19:52:38 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +85 -72 lines
A first stab at making the UHCI driver endian independent.
(It doesn't seem to be quite working yet.)

Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Aug 17 20:59:04 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +33 -16 lines
Redo the UHCI data toggle handling.
Make sure data toggles get synchronized on open and
when clearing an endpoint stall.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Tue Aug 17 16:06:21 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +12 -4 lines
Make some small changes to make it compile on OpenBSD.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Aug 16 20:24:33 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +30 -30 lines
Change the way transfers are dequeued so thet we know that they
are removed from the queue before being deallocated.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Aug 14 14:49:32 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +6 -9 lines
Some changes from FreeBSD (no functional differences).

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Aug 2 23:35:55 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
Get data toggle right for short bulk transfers.
(XXX This code needs to be rewritten.)

Revision 1.24.4.3: download - view: text, markup, annotated - select for diffs
Mon Aug 2 22:08:59 1999 UTC (27 years, 3 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.24.4.2: preferred, colored; branchpoint 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.4.2: +21 -14 lines
Update from trunk.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Aug 2 19:30:34 1999 UTC (27 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +69 -37 lines
Do abort of transfers in a sane way.  Fixes PR 8041.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Jul 12 05:22:50 1999 UTC (27 years, 4 months ago) by augustss
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +21 -14 lines
Apply some bulk transfer bug fixes from FreeBSD.

Revision 1.24.4.2: download - view: text, markup, annotated - select for diffs
Thu Jul 1 23:40:22 1999 UTC (27 years, 4 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.24.4.1: preferred, colored; branchpoint 1.24: preferred, colored
Changes since revision 1.24.4.1: +106 -35 lines
Sync w/ -current.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Jun 30 06:44:23 1999 UTC (27 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +19 -19 lines
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.30: download - view: text, markup, annotated - select for diffs
Sat Jun 26 08:30:17 1999 UTC (27 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +88 -17 lines
Add suspend/resume handling to the UHCI driver.
Currently it only works if the BIOS saves enough state of the controller.
Once I find a machine with a dumber BIOS I'll try to improve that.

Revision 1.24.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 01:19:26 1999 UTC (27 years, 5 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +38 -36 lines
Sync w/ -current.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Wed Jun 9 17:04:45 1999 UTC (27 years, 5 months ago) by augustss
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2 lines
Remove a redundant test.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri May 21 10:15:24 1999 UTC (27 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -3 lines
Update documentation URLs.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu May 20 09:52:35 1999 UTC (27 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -1 lines
Keep track of vendor id and make sure the vendor string is NUL terminated.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun May 16 11:43:32 1999 UTC (27 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +32 -32 lines
Improve error handling.  Mostly from FreeBSD.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Apr 3 19:00:43 1999 UTC (27 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +4 -3 lines
Improve debug output a little.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Feb 20 23:26:16 1999 UTC (27 years, 9 months ago) by augustss
Branches: MAIN
CVS tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
Move the bus reset up.  This makes the VIA chipset work.  From FreeBSD.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Jan 10 11:13:36 1999 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
Update/add URLs to relevant USB specs.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Jan 8 11:58:25 1999 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -2 lines
Various little fixes from the FreeBSD version.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Jan 7 02:22:51 1999 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -5 lines
Fix some FreeBSD compiler warnings.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed Dec 30 18:06:25 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +10 -10 lines
Split usbd_delay_ms() into two functions, one can be used in
device drivers.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Dec 30 13:25:54 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -1 lines
Make it compile without USB_DEBUG, fixes PR 6689.  Patch from
taca@sky.yamashina.kyoto.jp (Takahiro Kambe).

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Dec 29 04:15:04 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +33 -14 lines
Implement short transfers.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Dec 28 21:05:47 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +6 -2 lines
Imprive debugging message.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Dec 28 20:14:00 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +316 -29 lines
Change the host controller internal API a little and add some incomplete
support for isochronous transfers.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Dec 28 16:13:44 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
Update for new name in usb.h

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Dec 28 02:06:25 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
Cosmetics.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Dec 26 12:53:01 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +83 -38 lines
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.12: download - view: text, markup, annotated - select for diffs
Thu Dec 10 23:16:47 1998 UTC (27 years, 11 months ago) by augustss
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +28 -16 lines
Take care of some lines > 80 chars.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Nov 25 22:32:04 1998 UTC (27 years, 11 months ago) by augustss
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -3 lines
Make the copyright header conform to the NetBSD template.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Aug 2 22:30:52 1998 UTC (28 years, 3 months ago) by augustss
Branches: MAIN
CVS tags: chs-ubc-base, chs-ubc
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -1 lines
Improve some error messages.
Make some preparations for isochronous transfers.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Aug 1 18:16:19 1998 UTC (28 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +12 -11 lines
Switch from a global flag to tell if the host controller should use
polling to a local one for each controller.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Jul 26 17:42:48 1998 UTC (28 years, 3 months ago) by augustss
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +15 -10 lines
A first stab att supporting console access with a USB keyboard.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Jul 24 21:09:07 1998 UTC (28 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +81 -142 lines
Add special memory allocation routines that supports allocation
DMA-able memory in small chunks (USB uses a lot of 8 byte chunks).
Using the bus_dma functions directly is inefficient.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Jul 23 13:44:21 1998 UTC (28 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +9 -5 lines
Add some comments and a function to set the alternate settings in an
interface.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Jul 23 09:18:37 1998 UTC (28 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +22 -9 lines
Don't leak memory if opening a pipe fails.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Jul 23 01:46:27 1998 UTC (28 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +5 -2 lines
Use the pipe maximum packet length rather than the device max length when
setting up a transfer.
Update the UHCI data toggle correctly.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jul 23 00:27:36 1998 UTC (28 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
Fix bug in freeing TD chain after bulk transfer.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Jul 15 09:35:35 1998 UTC (28 years, 4 months ago) by drochner
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +7 -7 lines
fix egcs warnings

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Jul 12 19:51:59 1998 UTC (28 years, 4 months ago) by augustss
Branches: MAIN
Add USB support.  Supported so far:
* UHCI and OHCI host controllers on PCI
* Hubs
* HID devices withe special drivers for mouse and keyboard
* Printers

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>