The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.326 / (download) - annotate - [select for diffs], Fri Apr 5 18:57:10 2024 UTC (10 days, 3 hours ago) by riastradh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.325: +4 -5 lines
Diff to previous 1.325 (colored)

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.325 / (download) - annotate - [select for diffs], Fri Feb 9 22:08:37 2024 UTC (2 months ago) by andvar
Branch: MAIN
Changes since 1.324: +3 -3 lines
Diff to previous 1.324 (colored)

fix spelling mistakes, mainly in comments and log messages.

Revision 1.324 / (download) - annotate - [select for diffs], Sun Feb 4 05:43:06 2024 UTC (2 months, 1 week ago) by mrg
Branch: MAIN
Changes since 1.323: +3 -3 lines
Diff to previous 1.323 (colored)

update my email address.

Revision 1.323 / (download) - annotate - [select for diffs], Wed Mar 9 22:18:54 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-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
Changes since 1.322: +2 -18 lines
Diff to previous 1.322 (colored)

ohci(4): Don't flail around with enabling polling in suspend/resume.

This doesn't work -- polling mode only works when all other CPUs are
quiesced and the current one is running sequentially without
preemption.

Also not clear whether this does anything useful.  Maybe we need a
mechanism to block new xfers until resumed, but this wasn't that.

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

usb: Provisionally release bus lock around ubm_rhctrl.

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

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

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

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

- roothub_ctrl_abort needs to wait for ubm_rhctrl to complete.

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

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

Candidate fix for PR kern/56739.

Revision 1.321 / (download) - annotate - [select for diffs], Thu Mar 3 06:12:11 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.320: +14 -31 lines
Diff to previous 1.320 (colored)

usb: Hold pipe lock across upm_transfer and upm_start.

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

Revision 1.320 / (download) - annotate - [select for diffs], Thu Mar 3 06:08:50 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.319: +2 -7 lines
Diff to previous 1.319 (colored)

usb: Factor usb_transfer_complete out of ubm_abortx method.

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

usb: Factor usb_insert_transfer out of upm_transfer and make private.

Almost every upm_transfer function starts with:

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

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

Exceptions:

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

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

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

Revision 1.318 / (download) - annotate - [select for diffs], Tue Dec 21 09:51:22 2021 UTC (2 years, 3 months ago) by skrll
Branch: MAIN
Changes since 1.317: +10 -10 lines
Diff to previous 1.317 (colored)

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.315.4.2 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:32 2021 UTC (2 years, 8 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.315.4.1: +3 -3 lines
Diff to previous 1.315.4.1 (colored) to branchpoint 1.315 (colored) next main 1.316 (colored)

Sync with HEAD.

Revision 1.317 / (download) - annotate - [select for diffs], Thu Jun 24 23:01:03 2021 UTC (2 years, 9 months ago) by mrg
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.316: +3 -3 lines
Diff to previous 1.316 (colored)

turn off ohcidebug by default.  none of the other HCs do this.

next up:  options to set these by default

Revision 1.315.4.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:30 2021 UTC (2 years, 9 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.315: +3 -3 lines
Diff to previous 1.315 (colored)

Sync w/ HEAD.

Revision 1.316 / (download) - annotate - [select for diffs], Tue Jun 15 23:39:43 2021 UTC (2 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.315: +3 -3 lines
Diff to previous 1.315 (colored)

ohci(4): Constify a constant debug string table.

Revision 1.310.2.3 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:50 2021 UTC (3 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.310.2.2: +11 -14 lines
Diff to previous 1.310.2.2 (colored) next main 1.311 (colored)

Sync with HEAD.

Revision 1.315 / (download) - annotate - [select for diffs], Tue Jan 5 18:00:21 2021 UTC (3 years, 3 months ago) by skrll
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.314: +11 -14 lines
Diff to previous 1.314 (colored)

More converstion from usbd_status to int for function error reporting.
This time it's the turn of usb_allocmem.

Revision 1.310.2.2 / (download) - annotate - [select for diffs], Sun Jan 3 16:35:02 2021 UTC (3 years, 3 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.310.2.1: +2 -3 lines
Diff to previous 1.310.2.1 (colored)

Sync w/ HEAD.

Revision 1.289.4.7 / (download) - annotate - [select for diffs], Wed Dec 23 12:34:38 2020 UTC (3 years, 3 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Changes since 1.289.4.6: +2 -3 lines
Diff to previous 1.289.4.6 (colored) to branchpoint 1.289 (colored) next main 1.290 (colored)

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.314 / (download) - annotate - [select for diffs], Tue Dec 22 01:07:23 2020 UTC (3 years, 3 months ago) by riastradh
Branch: MAIN
Changes since 1.313: +2 -3 lines
Diff to previous 1.313 (colored)

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.310.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:09 2020 UTC (3 years, 4 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.310: +171 -32 lines
Diff to previous 1.310 (colored)

Sync w/ HEAD.

Revision 1.273.6.7 / (download) - annotate - [select for diffs], Sat Dec 12 20:30:57 2020 UTC (3 years, 4 months ago) by martin
Branch: netbsd-8
Changes since 1.273.6.6: +170 -31 lines
Diff to previous 1.273.6.6 (colored) to branchpoint 1.273 (colored) next main 1.274 (colored)

Pull up following revision(s) (requested by skrll in ticket #1637):

	sys/dev/usb/ohci.c: revision 1.311
	sys/dev/usb/ohci.c: revision 1.312
	sys/dev/usb/ohcivar.h: revision 1.62

Restructure the abort code for TD based transfers (ctrl, bulk, intr).

In PR kern/22646 some TDs can be on the done queue when the abort start
and, if this is the case, they need to processed after the WDH interrupt.
Instead of waiting for WDH we release TDs that have been touched by the
HC and replace them with new ones.  Once WDH happens the floating TDs
will be returned to the free list.

Also addresses the issue seen in PR kern/55835

Thanks to both Andreas Gustafsson and Edgar Fu=C3=9F for testing.  Apologi=
es to
Andreas Gustafsson for not committing this to HEAD for 4y6m.w

Remove leading space that crept in in the last change

Revision 1.289.4.6 / (download) - annotate - [select for diffs], Sat Dec 12 20:29:11 2020 UTC (3 years, 4 months ago) by martin
Branch: netbsd-9
Changes since 1.289.4.5: +170 -31 lines
Diff to previous 1.289.4.5 (colored) to branchpoint 1.289 (colored)

Pull up following revision(s) (requested by skrll in ticket #1150):

	sys/dev/usb/ohci.c: revision 1.311
	sys/dev/usb/ohci.c: revision 1.312
	sys/dev/usb/ohcivar.h: revision 1.62

Restructure the abort code for TD based transfers (ctrl, bulk, intr).

In PR kern/22646 some TDs can be on the done queue when the abort start
and, if this is the case, they need to processed after the WDH interrupt.
Instead of waiting for WDH we release TDs that have been touched by the
HC and replace them with new ones.  Once WDH happens the floating TDs
will be returned to the free list.

Also addresses the issue seen in PR kern/55835

Thanks to both Andreas Gustafsson and Edgar Fu=C3=9F for testing.  Apologi=
es to
Andreas Gustafsson for not committing this to HEAD for 4y6m.w

Remove leading space that crept in in the last change

Revision 1.313 / (download) - annotate - [select for diffs], Thu Dec 10 20:50:24 2020 UTC (3 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.312: +3 -3 lines
Diff to previous 1.312 (colored)

Another leading space

Revision 1.312 / (download) - annotate - [select for diffs], Thu Dec 10 20:48:33 2020 UTC (3 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.311: +3 -3 lines
Diff to previous 1.311 (colored)

Remove leading space that crept in in the last change

Revision 1.311 / (download) - annotate - [select for diffs], Wed Dec 9 07:10:01 2020 UTC (3 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.310: +171 -32 lines
Diff to previous 1.310 (colored)

Restructure the abort code for TD based transfers (ctrl, bulk, intr).

In PR kern/22646 some TDs can be on the done queue when the abort start
and, if this is the case, they need to processed after the WDH interrupt.
Instead of waiting for WDH we release TDs that have been touched by the
HC and replace them with new ones.  Once WDH happens the floating TDs
will be returned to the free list.

Also addresses the issue seen in PR kern/55835

Thanks to both Andreas Gustafsson and Edgar Fu for testing.  Apologies to
Andreas Gustafsson for not committing this to HEAD for 4y6m.w

Revision 1.310 / (download) - annotate - [select for diffs], Wed Jun 3 15:38:02 2020 UTC (3 years, 10 months ago) by skrll
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.309: +77 -56 lines
Diff to previous 1.309 (colored)

Convert ohcireg.h to __BITS.  NFCI.

Revision 1.309 / (download) - annotate - [select for diffs], Tue May 26 07:03:22 2020 UTC (3 years, 10 months ago) by skrll
Branch: MAIN
Changes since 1.308: +6 -5 lines
Diff to previous 1.308 (colored)

Copyright maintenance

Revision 1.308 / (download) - annotate - [select for diffs], Sun May 24 07:42:51 2020 UTC (3 years, 10 months ago) by skrll
Branch: MAIN
Changes since 1.307: +58 -26 lines
Diff to previous 1.307 (colored)

Be more careful with OHCI_PAGE limitations in ohci_reset_std_chain and
ohci_device_isoc_enter

Enable USBMALLOC_MULTISEG

Revision 1.307 / (download) - annotate - [select for diffs], Tue May 19 19:09:43 2020 UTC (3 years, 10 months ago) by jakllsch
Branch: MAIN
Changes since 1.306: +15 -2 lines
Diff to previous 1.306 (colored)

ohci(4): always use usb_syncmem() when reading from HCCA

Revision 1.306 / (download) - annotate - [select for diffs], Tue May 19 18:57:26 2020 UTC (3 years, 10 months ago) by jakllsch
Branch: MAIN
Changes since 1.305: +3 -3 lines
Diff to previous 1.305 (colored)

ohci_device_isoc_done(): use ux_length rather than ux_bufsize

For consistency.  Nick may have missed this in previous because I'd
unexpectedly adjusted it.

Revision 1.305 / (download) - annotate - [select for diffs], Fri May 15 06:23:54 2020 UTC (3 years, 11 months ago) by skrll
Branch: MAIN
Changes since 1.304: +3 -3 lines
Diff to previous 1.304 (colored)

Use ux_length in isoc usb_syncmem.  Missed in previous commit.

Revision 1.304 / (download) - annotate - [select for diffs], Fri May 15 06:15:42 2020 UTC (3 years, 11 months ago) by skrll
Branch: MAIN
Changes since 1.303: +5 -4 lines
Diff to previous 1.303 (colored)

Update ux_length in usbd_setup_isoc_xfer and use this to usb_syncmem
in the HCDs

Revision 1.303 / (download) - annotate - [select for diffs], Wed May 13 19:33:48 2020 UTC (3 years, 11 months ago) by jakllsch
Branch: MAIN
Changes since 1.302: +4 -4 lines
Diff to previous 1.302 (colored)

Use ux_bufsize rather than ux_length in isoc path usb_syncmem calls.

ux_length is always 0 for isoc pipes, so it could not be used here.

To do: revisit this for other host controllers, uhci and ehci in particular?

Revision 1.302 / (download) - annotate - [select for diffs], Wed May 13 18:44:51 2020 UTC (3 years, 11 months ago) by jakllsch
Branch: MAIN
Changes since 1.301: +3 -3 lines
Diff to previous 1.301 (colored)

ohci_alloc_sed() returns a pointer, so use NULL rather than 0 on bail-out

Revision 1.281.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:49 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.281.2.2: +1 -1 lines
Diff to previous 1.281.2.2 (colored) to branchpoint 1.281 (colored) next main 1.282 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.281.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:13 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.281.2.1: +88 -149 lines
Diff to previous 1.281.2.1 (colored) to branchpoint 1.281 (colored)

Merge changes from current as of 20200406

Revision 1.301 / (download) - annotate - [select for diffs], Sun Apr 5 20:59:38 2020 UTC (4 years ago) by skrll
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.300: +22 -8 lines
Diff to previous 1.300 (colored)

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.300 / (download) - annotate - [select for diffs], Sat Mar 14 02:35:33 2020 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.299: +38 -38 lines
Diff to previous 1.299 (colored)

revert the 0x% -> %# change for fixed width formats pointed out by uwe.

Revision 1.299 / (download) - annotate - [select for diffs], Fri Mar 13 18:17:40 2020 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.298: +42 -42 lines
Diff to previous 1.298 (colored)

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log

Revision 1.298 / (download) - annotate - [select for diffs], Thu Mar 5 08:30:58 2020 UTC (4 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.297: +4 -5 lines
Diff to previous 1.297 (colored)

Use howmany.  NFC.

Revision 1.297 / (download) - annotate - [select for diffs], Thu Mar 5 08:12:30 2020 UTC (4 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.296: +2 -3 lines
Diff to previous 1.296 (colored)

Remove XXX comment.  The sync is done one the last sitd after the loop.

Revision 1.289.4.5 / (download) - annotate - [select for diffs], Sun Mar 1 12:35:16 2020 UTC (4 years, 1 month ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-1-RELEASE
Changes since 1.289.4.4: +54 -132 lines
Diff to previous 1.289.4.4 (colored) to branchpoint 1.289 (colored)

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

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

Teach usb_rem_task to return whether removed from queue or not.

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

        KASSERT(!usb_task_pending(dev, task))

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

 -

Nothing guarantees xfer's timeout has completed.

Wait for it when we free the xfer.

 -


New xfer state variables ux_timeout_set and ux_timeout_reset.

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

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

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

 -

Fix steady state of timeouts in ehci.

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

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

 -

Factor out HCI-independent xfer completion logic.

New API for HCI drivers to synchronize hardware completion
interrupts, synchronous aborts, and asynchronous timeouts:
- When submitting an xfer to hardware, call
  usbd_xfer_schedule_timeout(xfer).
- On HCI completion interrupt for xfer completion:
        if (!usbd_xfer_trycomplete(xfer))
                return;         /* timed out or aborted, ignore it */
- In upm_abort methods, call usbd_xfer_abort(xfer).

For HCI drivers that use this API (not needed in drivers that don't,
or for xfers like root intr xfers that don't use it):
- New ubm_abortx method serves role of former *hci_abort_xfer, but
  without any logic for wrangling timeouts/callouts/tasks -- caller
  in usbd_xfer_abort has already handled them.
- New ubm_dying method, returns true if the device is in the process
  of detaching, used by the timeout logic.

Converted and tested:
- ehci
- ohci

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

Not changed:
- slhci (sys/dev/ic/sl811hs.c) -- doesn't use a separate per-xfer
  callout for timeouts (XXX but maybe should?)
- ugenhc (sys/rump/dev/lib/libugenhc/ugenhc.c) -- doesn't manage its
  own transfer timeouts

 -

Fix steady state of root intr xfers.

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

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

 -

Initialize xfer->ux_status in uhci_root_intr_start.

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

 -

Set ux_isdone in uhci_poll_hub for DIAGNOSTIC.

 -

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

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

 -

Fix build

 -

Fix non-DIAGNOSTIC builds.

 -

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

 -

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

 -

Fix mistake in use of usbd_xfer_schedule_timeout in motg.

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

 -

Simplify some branches and kassert some redundant assignments.

Revision 1.292.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:16 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.292: +56 -132 lines
Diff to previous 1.292 (colored) next main 1.293 (colored)

Sync with head.

Revision 1.273.6.6 / (download) - annotate - [select for diffs], Tue Feb 25 18:52:44 2020 UTC (4 years, 1 month ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.273.6.5: +4 -2 lines
Diff to previous 1.273.6.5 (colored) to branchpoint 1.273 (colored)

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.289.4.4 / (download) - annotate - [select for diffs], Tue Feb 25 18:50:29 2020 UTC (4 years, 1 month ago) by martin
Branch: netbsd-9
Changes since 1.289.4.3: +4 -2 lines
Diff to previous 1.289.4.3 (colored) to branchpoint 1.289 (colored)

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.296 / (download) - annotate - [select for diffs], Fri Feb 21 12:41:29 2020 UTC (4 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.295: +4 -2 lines
Diff to previous 1.295 (colored)

Fix a memory leak.  Spotted by nat@

Revision 1.295 / (download) - annotate - [select for diffs], Sat Feb 15 01:21:56 2020 UTC (4 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.294: +6 -4 lines
Diff to previous 1.294 (colored)

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.294 / (download) - annotate - [select for diffs], Wed Feb 12 16:02:01 2020 UTC (4 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.293: +24 -6 lines
Diff to previous 1.293 (colored)

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.293 / (download) - annotate - [select for diffs], Wed Feb 12 16:01:00 2020 UTC (4 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.292: +31 -129 lines
Diff to previous 1.292 (colored)

Factor out HCI-independent xfer completion logic.

New API for HCI drivers to synchronize hardware completion
interrupts, synchronous aborts, and asynchronous timeouts:

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

- On HCI completion interrupt for xfer completion:

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

- In upm_abort methods, call usbd_xfer_abort(xfer).

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

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

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

Converted and tested:
- ehci
- ohci

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

Not changed:

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

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

- vhci -- times transfers out only on detach; could be adapted easily
  if we wanted to use the xfer->ux_callout

Revision 1.289.4.3 / (download) - annotate - [select for diffs], Sat Dec 14 12:35:58 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.289.4.2: +5 -3 lines
Diff to previous 1.289.4.2 (colored) to branchpoint 1.289 (colored)

Pull up following revision(s) (requested by gson in ticket #554):

	sys/dev/usb/ohci.c: revision 1.292

Preserve the toggleCarry bit in the Endpoint Descriptor in
ohci_abort_xfer().  Fixes the OHCI part of PR kern/50278.

Revision 1.289.4.2 / (download) - annotate - [select for diffs], Sat Dec 14 12:30:57 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
Changes since 1.289.4.1: +5 -4 lines
Diff to previous 1.289.4.1 (colored) to branchpoint 1.289 (colored)

Pull up following revision(s) (requested by gson in ticket #553):

	sys/dev/usb/ohci.c: revision 1.291

Preserve the toggleCarry bit in the Endpoint Descriptor when handling
a DataUnderrun condition.  Fixes PR kern/54070.

Revision 1.292 / (download) - annotate - [select for diffs], Fri Nov 29 14:15:41 2019 UTC (4 years, 4 months ago) by gson
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.291: +5 -3 lines
Diff to previous 1.291 (colored)

Preserve the toggleCarry bit in the Endpoint Descriptor in
ohci_abort_xfer().  Fixes the OHCI part of PR kern/50278.

Revision 1.291 / (download) - annotate - [select for diffs], Fri Nov 29 14:13:04 2019 UTC (4 years, 4 months ago) by gson
Branch: MAIN
Changes since 1.290: +5 -4 lines
Diff to previous 1.290 (colored)

Preserve the toggleCarry bit in the Endpoint Descriptor when handling
a DataUnderrun condition.  Fixes PR kern/54070.

Revision 1.289.4.1 / (download) - annotate - [select for diffs], Sun Sep 1 13:00:37 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RC1
Changes since 1.289: +3 -3 lines
Diff to previous 1.289 (colored)

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

	distrib/sets/lists/comp/mi			1.2279
	distrib/sets/lists/modules/mi			1.123
	share/man/man9/Makefile				1.438
	share/man/man9/usbnet.9				1.1-1.9
	sys/dev/ic/rndisreg.h				1.3
	sys/dev/usb/TODO				1.47-1.52
	sys/dev/usb/TODO.usbmp				1.15,1.16
	sys/dev/usb/files.usb				1.157-1.167
	sys/dev/usb/if_aue.c				1.155-1.161
	sys/dev/usb/if_auereg.h				1.30-1.32
	sys/dev/usb/if_axe.c				1.103-1.119
	sys/dev/usb/if_axen.c				1.51-1.53,1.55-1.67
	sys/dev/usb/if_axenreg.h			1.15
	sys/dev/usb/if_cdce.c				1.54-1.67
	sys/dev/usb/if_cue.c				1.85,1.86
	sys/dev/usb/if_cuereg.h				1.23
	sys/dev/usb/if_kue.c				1.97-1.100
	sys/dev/usb/if_kuereg.h				1.23,1.24
	sys/dev/usb/if_mue.c				1.51-1.55
	sys/dev/usb/if_muereg.h				1.6
	sys/dev/usb/if_muevar.h				1.9
	sys/dev/usb/if_smsc.c				1.46-1.61
	sys/dev/usb/if_smscreg.h			1.6
	sys/dev/usb/if_smscvar.h			delete
	sys/dev/usb/if_udav.c				1.60-1.71
	sys/dev/usb/if_udavreg.h			1.14,1.15
	sys/dev/usb/if_upl.c				1.65,1.66
	sys/dev/usb/if_ure.c				1.15-1.31
	sys/dev/usb/if_urevar.h				1.4,1.5
	sys/dev/usb/if_url.c				1.67-1.70
	sys/dev/usb/if_urlreg.h				1.14
	sys/dev/usb/if_urndis.c				1.22-1.33
	sys/dev/usb/if_urtwn.c				1.72
	sys/dev/usb/ohci.c				1.290
	sys/dev/usb/uhub.c				1.143
	sys/dev/usb/usb.c				1.180
	sys/dev/usb/usb.h				1.118
	sys/dev/usb/usb_mem.c				1.71
	sys/dev/usb/usb_subr.c				1.238,1.239
	sys/dev/usb/usbdevs				1.772
	sys/dev/usb/usbdi.c				1.183,1.186
	sys/dev/usb/usbdi.h				1.97
	sys/dev/usb/usbdi_util.c			1.75
	sys/dev/usb/usbhist.h				1.5,1.6
	sys/dev/usb/usbnet.c				1.1-1.24
	sys/dev/usb/usbnet.h				1.1-1.14
	sys/dev/usb/usbroothub.c			1.9
	sys/dev/usb/xhci.c				1.109,1.110
	sys/modules/Makefile				1.223
	sys/modules/usbnet/Makefile			1.1

usbnet(9): Add common framework for USB network devices.
This bring various safety fixes to all updated drivers,
and includes locking clean up, detach safety when being
used or not, separate rx/tx locks to improve performance,
porting to NET_MPSAFE, many edge/error case bugs in
drivers fixed, as well as resovling PRs 54303 and 54308.
These drivers are converted: axe(4), axen(4), aue(4),
cdce(4), cue(4), kue(4), mue(4), smsc(4), udav(4),
upl(4), ure(4), url(4), and urndis(4).

Revision 1.273.6.5 / (download) - annotate - [select for diffs], Mon Aug 12 17:19:02 2019 UTC (4 years, 8 months ago) by martin
Branch: netbsd-8
Changes since 1.273.6.4: +4 -4 lines
Diff to previous 1.273.6.4 (colored) to branchpoint 1.273 (colored)

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

	sys/dev/usb/ohci.c: revision 1.289
	sys/dev/usb/ohci.c: revision 1.290

adjust KASSERT() for sc_lock to handle polling case.
should fix usb kdb in ddb.  reported by martin.

 -

relax an assert to be mutex_owned || polling.

half of the patch i sent for netbsd-8 in PR#54331.
the other half is already applied.

Revision 1.290 / (download) - annotate - [select for diffs], Sun Aug 11 22:55:03 2019 UTC (4 years, 8 months ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.289: +3 -3 lines
Diff to previous 1.289 (colored)

relax an assert to be mutex_owned || polling.

half of the patch i sent for netbsd-8 in PR#54331.
the other half is already applied.

Revision 1.281.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:34 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.281: +150 -99 lines
Diff to previous 1.281 (colored)

Sync with HEAD

Revision 1.289 / (download) - annotate - [select for diffs], Fri Mar 22 07:25:15 2019 UTC (5 years ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.288: +3 -3 lines
Diff to previous 1.288 (colored)

adjust KASSERT() for sc_lock to handle polling case.
should fix usb kdb in ddb.  reported by martin.

Revision 1.288 / (download) - annotate - [select for diffs], Sun Feb 17 04:17:52 2019 UTC (5 years, 1 month ago) by rin
Branch: MAIN
Changes since 1.287: +4 -3 lines
Diff to previous 1.287 (colored)

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.279.2.4 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:51 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.279.2.3: +25 -14 lines
Diff to previous 1.279.2.3 (colored) to branchpoint 1.279 (colored) next main 1.280 (colored)

Ssync with HEAD

Revision 1.273.6.4 / (download) - annotate - [select for diffs], Thu Sep 27 14:52:26 2018 UTC (5 years, 6 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.273.6.3: +23 -11 lines
Diff to previous 1.273.6.3 (colored) to branchpoint 1.273 (colored)

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.287 / (download) - annotate - [select for diffs], Sun Sep 16 20:21:56 2018 UTC (5 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.286: +23 -11 lines
Diff to previous 1.286 (colored)

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.286 / (download) - annotate - [select for diffs], Sun Sep 16 10:29:39 2018 UTC (5 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.285: +4 -5 lines
Diff to previous 1.285 (colored)

avoid __diagused.

Revision 1.279.2.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:04 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.279.2.2: +128 -89 lines
Diff to previous 1.279.2.2 (colored) to branchpoint 1.279 (colored)

Sync with HEAD

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

Revision 1.285 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:33 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-0906
Changes since 1.284: +6 -6 lines
Diff to previous 1.284 (colored)

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.253.2.5 / (download) - annotate - [select for diffs], Sat Aug 25 14:57:35 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.253.2.4: +122 -82 lines
Diff to previous 1.253.2.4 (colored) to branchpoint 1.253 (colored) next main 1.254 (colored)

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

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

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

among other problems, this assert should no longer trigger:

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

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

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

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

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

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

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

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused

Revision 1.273.6.3 / (download) - annotate - [select for diffs], Sat Aug 25 11:29:52 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-8
Changes since 1.273.6.2: +122 -84 lines
Diff to previous 1.273.6.2 (colored) to branchpoint 1.273 (colored)

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

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

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

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

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

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

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

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

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

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

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused

Revision 1.284 / (download) - annotate - [select for diffs], Thu Aug 9 21:23:23 2018 UTC (5 years, 8 months ago) by prlw1
Branch: MAIN
CVS Tags: jdolecek-ncqfixes-base, jdolecek-ncqfixes
Changes since 1.283: +3 -3 lines
Diff to previous 1.283 (colored)

whitespace

Revision 1.283 / (download) - annotate - [select for diffs], Thu Aug 9 21:16:43 2018 UTC (5 years, 8 months ago) by prlw1
Branch: MAIN
Changes since 1.282: +3 -3 lines
Diff to previous 1.282 (colored)

Sprinkle __diagused

Revision 1.282 / (download) - annotate - [select for diffs], Thu Aug 9 06:26:47 2018 UTC (5 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.281: +124 -85 lines
Diff to previous 1.281 (colored)

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

among other problems, this assert should no longer trigger:

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

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


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

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

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

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

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

XXX: pullup-7, pullup-8.

Revision 1.279.2.2 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:02 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.279.2.1: +4 -4 lines
Diff to previous 1.279.2.1 (colored) to branchpoint 1.279 (colored)

Sync with HEAD

Revision 1.281 / (download) - annotate - [select for diffs], Wed Jun 6 01:49:09 2018 UTC (5 years, 10 months ago) by maya
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.280: +4 -4 lines
Diff to previous 1.280 (colored)

Remove duplicate ;

Revision 1.279.2.1 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:02 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.279: +2 -15 lines
Diff to previous 1.279 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.280 / (download) - annotate - [select for diffs], Mon Apr 9 16:21:11 2018 UTC (6 years ago) by jakllsch
Branch: MAIN
CVS Tags: pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415
Changes since 1.279: +2 -15 lines
Diff to previous 1.279 (colored)

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.279 / (download) - annotate - [select for diffs], Sat Feb 3 08:52:52 2018 UTC (6 years, 2 months ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.278: +3 -3 lines
Diff to previous 1.278 (colored)

Fix non-DIAGNOSTIC build

Revision 1.278 / (download) - annotate - [select for diffs], Thu Feb 1 09:55:37 2018 UTC (6 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.277: +2 -4 lines
Diff to previous 1.277 (colored)

 Fix KASSERT panic. When detaching USB host controoler, the following panic
occured:
kernel diagnostic assertion "sc->sc_intrxfer == xfer" failed: file "../../../../dev/usb/ohci.c", line 1720
Clear sc_intrxfer correctly. Adviced by Nick and tested by me.

Revision 1.277 / (download) - annotate - [select for diffs], Thu Feb 1 09:47:47 2018 UTC (6 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.276: +5 -6 lines
Diff to previous 1.276 (colored)

- Fix panic on shutdown reported by ozaki-r in PR kern/52961. Use callot_halt()
  correctly. Tested by me and OK'd by Nick.
- Disable interrupt in och_shutdown() to prevent hangup. OK'd by Nick.

Revision 1.253.2.4 / (download) - annotate - [select for diffs], Wed Jan 3 20:02:37 2018 UTC (6 years, 3 months ago) by snj
Branch: netbsd-7
Changes since 1.253.2.3: +3 -3 lines
Diff to previous 1.253.2.3 (colored) to branchpoint 1.253 (colored)

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.224.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:34 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.224.2.3: +1515 -1470 lines
Diff to previous 1.224.2.3 (colored) to branchpoint 1.224 (colored) next main 1.225 (colored)

update from HEAD

Revision 1.273.6.2 / (download) - annotate - [select for diffs], Thu Nov 23 13:29:32 2017 UTC (6 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.273.6.1: +3 -3 lines
Diff to previous 1.273.6.1 (colored) to branchpoint 1.273 (colored)

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.276 / (download) - annotate - [select for diffs], Fri Nov 17 08:22:02 2017 UTC (6 years, 4 months ago) by skrll
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.275: +3 -3 lines
Diff to previous 1.275 (colored)

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

Revision 1.273.6.1 / (download) - annotate - [select for diffs], Thu Nov 2 21:29:52 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.273: +146 -127 lines
Diff to previous 1.273 (colored)

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.275 / (download) - annotate - [select for diffs], Sat Oct 28 07:36:02 2017 UTC (6 years, 5 months ago) by skrll
Branch: MAIN
Changes since 1.274: +4 -6 lines
Diff to previous 1.274 (colored)

Update format to report sC

Revision 1.274 / (download) - annotate - [select for diffs], Sat Oct 28 00:37:12 2017 UTC (6 years, 5 months ago) by pgoyette
Branch: MAIN
Changes since 1.273: +146 -127 lines
Diff to previous 1.273 (colored)

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.265.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:53 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.265: +21 -16 lines
Diff to previous 1.265 (colored) next main 1.266 (colored)

Sync with HEAD

Revision 1.253.2.3 / (download) - annotate - [select for diffs], Wed Apr 5 19:54:19 2017 UTC (7 years ago) by snj
Branch: netbsd-7
Changes since 1.253.2.2: +1521 -1496 lines
Diff to previous 1.253.2.2 (colored) to branchpoint 1.253 (colored)

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

Revision 1.263.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:38 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.263.2.1: +21 -16 lines
Diff to previous 1.263.2.1 (colored) to branchpoint 1.263 (colored) next main 1.264 (colored)

Sync with HEAD

Revision 1.254.2.86 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:46 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.85: +15 -12 lines
Diff to previous 1.254.2.85 (colored) to branchpoint 1.254 (colored) next main 1.255 (colored)

Sync with HEAD

Revision 1.273 / (download) - annotate - [select for diffs], Sat Feb 4 08:03:40 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.272: +6 -7 lines
Diff to previous 1.272 (colored)

More usb_syncmem tweaks.  The main one is sync'ing the entire last TD
returned from ohci_reset_std_chain in control transfers.

Revision 1.272 / (download) - annotate - [select for diffs], Tue Jan 31 07:34:02 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.271: +11 -7 lines
Diff to previous 1.271 (colored)

Improve the usb_syncmem calls in ohci_reset_std_chain.

Might help kern/51928: Errors reading a USB pen drive on macppc 7.99.59

Revision 1.253.2.2.2.2 / (download) - annotate - [select for diffs], Tue Jan 31 07:26:39 2017 UTC (7 years, 2 months ago) by skrll
Branch: netbsd-7-nhusb
Changes since 1.253.2.2.2.1: +8 -6 lines
Diff to previous 1.253.2.2.2.1 (colored) to branchpoint 1.253.2.2 (colored) next main 1.253.2.3 (colored)

Sync with HEAD

Revision 1.254.2.85 / (download) - annotate - [select for diffs], Tue Jan 31 07:25:34 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.84: +8 -6 lines
Diff to previous 1.254.2.84 (colored) to branchpoint 1.254 (colored)

Sync with HEAD

Revision 1.271 / (download) - annotate - [select for diffs], Mon Jan 30 21:42:08 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.270: +3 -2 lines
Diff to previous 1.270 (colored)

Update edataphys if we truncate to the maximum TD length possible

Revision 1.270 / (download) - annotate - [select for diffs], Mon Jan 30 21:39:08 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.269: +4 -4 lines
Diff to previous 1.269 (colored)

Sprinkle some const

Revision 1.269 / (download) - annotate - [select for diffs], Mon Jan 30 21:35:59 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.268: +3 -3 lines
Diff to previous 1.268 (colored)

Simplify an expression using the OHCI_PAGE_OFFSET macro

Revision 1.268 / (download) - annotate - [select for diffs], Mon Jan 30 21:34:20 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored)

Oops missed a )

Revision 1.267 / (download) - annotate - [select for diffs], Mon Jan 30 21:32:39 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.266: +4 -3 lines
Diff to previous 1.266 (colored)

Apply De Morgan's law to the TD maximum transfer length check logic and
wrap the long line

Revision 1.266 / (download) - annotate - [select for diffs], Mon Jan 30 21:27:19 2017 UTC (7 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.265: +3 -3 lines
Diff to previous 1.265 (colored)

Fix the range check for a single TD maximum transfer length

kern/51528 usb_mem.c panic triggered by mounting USB pen drive

Revision 1.263.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:42 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.263: +3 -3 lines
Diff to previous 1.263 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.254.2.84 / (download) - annotate - [select for diffs], Wed Dec 28 10:44:27 2016 UTC (7 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.83: +6 -2 lines
Diff to previous 1.254.2.83 (colored) to branchpoint 1.254 (colored)

Set device transfer status to USBD_IN_PROGRESS if start methods succeeds

Revision 1.254.2.83 / (download) - annotate - [select for diffs], Tue Dec 27 08:33:08 2016 UTC (7 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.82: +3 -3 lines
Diff to previous 1.254.2.82 (colored) to branchpoint 1.254 (colored)

Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying

Revision 1.254.2.82 / (download) - annotate - [select for diffs], Tue Dec 27 08:32:19 2016 UTC (7 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.81: +5 -4 lines
Diff to previous 1.254.2.81 (colored) to branchpoint 1.254 (colored)

Don't supply the lock to callout_halt when polling as it won't be held

Revision 1.254.2.81 / (download) - annotate - [select for diffs], Sat Dec 17 10:10:34 2016 UTC (7 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.80: +6 -3 lines
Diff to previous 1.254.2.80 (colored) to branchpoint 1.254 (colored)

Wrap a long line.

Revision 1.254.2.80 / (download) - annotate - [select for diffs], Sat Dec 17 10:08:30 2016 UTC (7 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.79: +3 -5 lines
Diff to previous 1.254.2.79 (colored) to branchpoint 1.254 (colored)

Tweak a couple of comments

Revision 1.254.2.79 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:18 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.78: +3 -3 lines
Diff to previous 1.254.2.78 (colored) to branchpoint 1.254 (colored)

Sync with HEAD

Revision 1.265 / (download) - annotate - [select for diffs], Sun Dec 4 10:12:35 2016 UTC (7 years, 4 months ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.264: +3 -3 lines
Diff to previous 1.264 (colored)

Whitespace

Revision 1.254.2.78 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:57 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.77: +3 -3 lines
Diff to previous 1.254.2.77 (colored) to branchpoint 1.254 (colored)

Sync with HEAD

Revision 1.253.2.2.2.1 / (download) - annotate - [select for diffs], Tue Sep 6 20:33:09 2016 UTC (7 years, 7 months ago) by skrll
Branch: netbsd-7-nhusb
Changes since 1.253.2.2: +1519 -1496 lines
Diff to previous 1.253.2.2 (colored)

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

Revision 1.264 / (download) - annotate - [select for diffs], Sun Aug 14 14:42:22 2016 UTC (7 years, 8 months ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161004, localcount-20160914
Changes since 1.263: +3 -3 lines
Diff to previous 1.263 (colored)

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.

Should fix/help
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

and probably others

Revision 1.218.8.4 / (download) - annotate - [select for diffs], Wed Jul 13 08:14:08 2016 UTC (7 years, 9 months ago) by snj
Branch: netbsd-6
Changes since 1.218.8.3: +3 -3 lines
Diff to previous 1.218.8.3 (colored) to branchpoint 1.218 (colored) next main 1.219 (colored)

Pull up following revision(s) (requested by skrll in ticket #1350):
	sys/dev/usb/ohci.c: revision 1.257
Fix 10year old bug of mine affecting interrupt IN transfers.

Revision 1.254.2.77 / (download) - annotate - [select for diffs], Fri Jun 10 08:15:21 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.76: +3 -3 lines
Diff to previous 1.254.2.76 (colored) to branchpoint 1.254 (colored)

Use SOFTINT_SERIAL for the USB stack (the 'S' stands for serial).

This is a step in the right direction towards fixing

kern/50491: unkillable wait in usbd_transfer while using usmsc0 on
raspberry pi 2

kern/49065: ifconfig tun0 ... sequence locks up system

but further analysis of locking of the usb drivers is required.

Revision 1.254.2.76 / (download) - annotate - [select for diffs], Mon May 30 06:46:50 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.75: +181 -48 lines
Diff to previous 1.254.2.75 (colored) to branchpoint 1.254 (colored)

Restructure the abort code for TD based transfers (ctrl, bulk, intr).

In PR/22646 some TDs can be on the done queue when the abort start and,
if this is the case, they need to processed after the WDH interrupt.
Instead of waiting for WDH we release TDs that have been touched by the
HC and replace them with new ones.  Once WDH happens the floating TDs
will be returned to the free list.

Revision 1.254.2.75 / (download) - annotate - [select for diffs], Sun May 29 08:44:31 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.74: +4 -49 lines
Diff to previous 1.254.2.74 (colored) to branchpoint 1.254 (colored)

Sync with HEAD

Revision 1.254.2.74 / (download) - annotate - [select for diffs], Sun May 29 06:13:02 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.73: +3 -3 lines
Diff to previous 1.254.2.73 (colored) to branchpoint 1.254 (colored)

Pull across fix from head for BE short reads

Revision 1.263 / (download) - annotate - [select for diffs], Tue May 10 15:14:03 2016 UTC (7 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529
Branch point for: pgoyette-localcount
Changes since 1.262: +4 -2 lines
Diff to previous 1.262 (colored)

sprinkle _KERNEL_OPT

Revision 1.262 / (download) - annotate - [select for diffs], Mon May 9 21:52:43 2016 UTC (7 years, 11 months ago) by skrll
Branch: MAIN
Changes since 1.261: +3 -3 lines
Diff to previous 1.261 (colored)

Don't forget to use HTOO32 when adding OHCI_TD_R to td_flags for short
reads.

Should fix problems with BE machines and ohci as reported on
current-users by Michael

Revision 1.261 / (download) - annotate - [select for diffs], Fri May 6 13:03:06 2016 UTC (7 years, 11 months ago) by skrll
Branch: MAIN
Changes since 1.260: +2 -49 lines
Diff to previous 1.260 (colored)

usb is attached with config_interrupts so we can G/C the code to support
transfers when this wasn't the case.

Revision 1.254.2.73 / (download) - annotate - [select for diffs], Sat Apr 30 10:34:14 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.72: +5 -6 lines
Diff to previous 1.254.2.72 (colored) to branchpoint 1.254 (colored)

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

Revision 1.260 / (download) - annotate - [select for diffs], Sat Apr 23 10:15:32 2016 UTC (7 years, 11 months ago) by skrll
Branch: MAIN
Changes since 1.259: +1507 -1439 lines
Diff to previous 1.259 (colored)

Merge nick-nhusb

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

Revision 1.254.2.72 / (download) - annotate - [select for diffs], Sat Apr 16 16:02:42 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.71: +6 -6 lines
Diff to previous 1.254.2.71 (colored) to branchpoint 1.254 (colored)

Fix usbd_status vs int in *_alloc_*_chain

Revision 1.254.2.71 / (download) - annotate - [select for diffs], Sat Apr 16 15:39:36 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.70: +3 -2 lines
Diff to previous 1.254.2.70 (colored) to branchpoint 1.254 (colored)

Don't leak memory in *_alloc_*td_chain if allocation fails.

Revision 1.254.2.70 / (download) - annotate - [select for diffs], Mon Apr 4 07:43:12 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.69: +49 -109 lines
Diff to previous 1.254.2.69 (colored) to branchpoint 1.254 (colored)

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.254.2.69 / (download) - annotate - [select for diffs], Fri Apr 1 15:13:45 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.68: +36 -67 lines
Diff to previous 1.254.2.68 (colored) to branchpoint 1.254 (colored)

Revert previous as it needs some work.

Revision 1.254.2.68 / (download) - annotate - [select for diffs], Fri Apr 1 14:20:05 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.67: +67 -36 lines
Diff to previous 1.254.2.67 (colored) to branchpoint 1.254 (colored)

Deal with ZLP (zero length packets) properly

Revision 1.254.2.67 / (download) - annotate - [select for diffs], Fri Apr 1 14:17:24 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.66: +3 -3 lines
Diff to previous 1.254.2.66 (colored) to branchpoint 1.254 (colored)

Damn it... whitespace.

Revision 1.254.2.66 / (download) - annotate - [select for diffs], Fri Apr 1 14:13:29 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.65: +2 -3 lines
Diff to previous 1.254.2.65 (colored) to branchpoint 1.254 (colored)

Guess what... whitspace.

Revision 1.254.2.65 / (download) - annotate - [select for diffs], Fri Apr 1 14:12:17 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.64: +3 -3 lines
Diff to previous 1.254.2.64 (colored) to branchpoint 1.254 (colored)

More whitespace

Revision 1.254.2.64 / (download) - annotate - [select for diffs], Fri Apr 1 14:11:02 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.63: +3 -3 lines
Diff to previous 1.254.2.63 (colored) to branchpoint 1.254 (colored)

More whitespace

Revision 1.254.2.63 / (download) - annotate - [select for diffs], Fri Apr 1 14:08:39 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.62: +3 -3 lines
Diff to previous 1.254.2.62 (colored) to branchpoint 1.254 (colored)

Really fix whitespace

Revision 1.254.2.62 / (download) - annotate - [select for diffs], Fri Apr 1 14:06:14 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.61: +3 -3 lines
Diff to previous 1.254.2.61 (colored) to branchpoint 1.254 (colored)

Whitespace

Revision 1.254.2.61 / (download) - annotate - [select for diffs], Fri Apr 1 12:58:15 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.60: +4 -6 lines
Diff to previous 1.254.2.60 (colored) to branchpoint 1.254 (colored)

constify tdflags in ohci_{alloc,reset}_std_chain

Revision 1.254.2.60 / (download) - annotate - [select for diffs], Thu Mar 24 15:30:17 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.59: +4 -4 lines
Diff to previous 1.254.2.59 (colored) to branchpoint 1.254 (colored)

Wait for hardware before removing the TDs from the hash lists.

This is all a bit racey and should be revisited.

Revision 1.254.2.59 / (download) - annotate - [select for diffs], Thu Mar 17 09:04:53 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.58: +7 -43 lines
Diff to previous 1.254.2.58 (colored) to branchpoint 1.254 (colored)

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

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

Revision 1.254.2.58 / (download) - annotate - [select for diffs], Sun Mar 13 07:11:01 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.57: +4 -4 lines
Diff to previous 1.254.2.57 (colored) to branchpoint 1.254 (colored)

KNF (on the right branch this time)

Revision 1.259 / (download) - annotate - [select for diffs], Sun Mar 13 07:01:43 2016 UTC (8 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.258: +4 -4 lines
Diff to previous 1.258 (colored)

KNF

Revision 1.254.2.57 / (download) - annotate - [select for diffs], Wed Mar 9 08:00:22 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.56: +3 -2 lines
Diff to previous 1.254.2.56 (colored) to branchpoint 1.254 (colored)

More debug

Revision 1.254.2.56 / (download) - annotate - [select for diffs], Tue Mar 8 21:40:22 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.55: +3 -3 lines
Diff to previous 1.254.2.55 (colored) to branchpoint 1.254 (colored)

Whitespace

Revision 1.254.2.55 / (download) - annotate - [select for diffs], Sun Feb 28 11:51:24 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.54: +3 -2 lines
Diff to previous 1.254.2.54 (colored) to branchpoint 1.254 (colored)

ohci_hash_rem_itd the sitds in ohci_device_isoc_abort

Revision 1.254.2.54 / (download) - annotate - [select for diffs], Sun Feb 28 09:16:20 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.53: +9 -47 lines
Diff to previous 1.254.2.53 (colored) to branchpoint 1.254 (colored)

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.254.2.53 / (download) - annotate - [select for diffs], Sat Feb 27 15:54:30 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.52: +15 -12 lines
Diff to previous 1.254.2.52 (colored) to branchpoint 1.254 (colored)

Do the pipe sitd and loaning properly for isoc transfers

Revision 1.254.2.52 / (download) - annotate - [select for diffs], Sat Feb 27 15:48:36 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.51: +3 -3 lines
Diff to previous 1.254.2.51 (colored) to branchpoint 1.254 (colored)

An std is "done" when it's not inflight.  Mark it done when it's first
allocated.

Revision 1.254.2.51 / (download) - annotate - [select for diffs], Sat Feb 27 15:47:18 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.50: +2 -4 lines
Diff to previous 1.254.2.50 (colored) to branchpoint 1.254 (colored)

Remove some blank lines

Revision 1.254.2.50 / (download) - annotate - [select for diffs], Sat Feb 27 15:44:05 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.49: +10 -6 lines
Diff to previous 1.254.2.49 (colored) to branchpoint 1.254 (colored)

Comment on its own line

Revision 1.254.2.49 / (download) - annotate - [select for diffs], Thu Feb 25 12:52:09 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.48: +2 -28 lines
Diff to previous 1.254.2.48 (colored) to branchpoint 1.254 (colored)

Remove the big delay / dump ED/TD state debug code.

Revision 1.254.2.48 / (download) - annotate - [select for diffs], Wed Feb 24 09:06:04 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.47: +4 -3 lines
Diff to previous 1.254.2.47 (colored) to branchpoint 1.254 (colored)

Move a comment to its own line.

Revision 1.254.2.47 / (download) - annotate - [select for diffs], Wed Feb 24 09:00:59 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.46: +5 -3 lines
Diff to previous 1.254.2.46 (colored) to branchpoint 1.254 (colored)

Debug improvements

Revision 1.254.2.46 / (download) - annotate - [select for diffs], Fri Feb 19 08:22:40 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.45: +3 -3 lines
Diff to previous 1.254.2.45 (colored) to branchpoint 1.254 (colored)

Fix typo in previous *sigh*

Revision 1.254.2.45 / (download) - annotate - [select for diffs], Thu Feb 18 17:38:37 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.44: +5 -3 lines
Diff to previous 1.254.2.44 (colored) to branchpoint 1.254 (colored)

Tweak the usb_syncmem from the previous.

Revision 1.254.2.44 / (download) - annotate - [select for diffs], Thu Feb 18 17:34:30 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.43: +15 -7 lines
Diff to previous 1.254.2.43 (colored) to branchpoint 1.254 (colored)

Only mark the last TD as "buffer rounding" when USBD_SHORT_XFER_OK. This
means OHCI_CC_DATA_UNDERRUN is flagged if the device doesn't send enough
data to fill the buffer in the last TD.

Deal with OHCI_CC_DATA_UNDERRUN with the normal error handling, but return
USBD_NORMAL_COMPLETION and let the usb_transfer_complete decide if it
should return USBD_SHORT_XFER

Revision 1.254.2.43 / (download) - annotate - [select for diffs], Thu Feb 18 16:50:28 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.42: +3 -4 lines
Diff to previous 1.254.2.42 (colored) to branchpoint 1.254 (colored)

Print cc when debug level is 10.

Revision 1.254.2.42 / (download) - annotate - [select for diffs], Sun Jan 10 10:16:00 2016 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.41: +33 -20 lines
Diff to previous 1.254.2.41 (colored) to branchpoint 1.254 (colored)

Do the same loan dance with control transfers as with other transfer
types.  That is,

	Use the pipe "tail" TD as our first and loan our first TD to the
	next transfer.

Sprinkle the above comment where necessary.

Also, remove a TD from the hash list BEFORE calling into
usb_transfer_complete.  It might get reused when starting the next
transfer.

Revision 1.254.2.41 / (download) - annotate - [select for diffs], Sat Jan 9 21:45:20 2016 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.40: +8 -7 lines
Diff to previous 1.254.2.40 (colored) to branchpoint 1.254 (colored)

Debug improvements

Revision 1.254.2.40 / (download) - annotate - [select for diffs], Sat Jan 9 14:55:53 2016 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.39: +7 -9 lines
Diff to previous 1.254.2.39 (colored) to branchpoint 1.254 (colored)

Debug improvements

Revision 1.254.2.39 / (download) - annotate - [select for diffs], Fri Jan 8 13:42:55 2016 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.38: +14 -14 lines
Diff to previous 1.254.2.38 (colored) to branchpoint 1.254 (colored)

Consistency with USBHIST_LOGN

Revision 1.253.2.2 / (download) - annotate - [select for diffs], Sat Jan 2 14:43:48 2016 UTC (8 years, 3 months ago) by riz
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Branch point for: netbsd-7-nhusb
Changes since 1.253.2.1: +3 -3 lines
Diff to previous 1.253.2.1 (colored) to branchpoint 1.253 (colored)

Pull up following revision(s) (requested by skrll in ticket #1054):
	sys/dev/usb/ohci.c: revision 1.257
Fix 10year old bug of mine affecting interrupt IN transfers.

Revision 1.254.2.38 / (download) - annotate - [select for diffs], Mon Dec 28 15:46:28 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.37: +2 -3 lines
Diff to previous 1.254.2.37 (colored) to branchpoint 1.254 (colored)

ohci_reset_std_chain doesn't sleep so remove the stray ASSERT_SLEEPABLE

Revision 1.254.2.37 / (download) - annotate - [select for diffs], Wed Dec 23 08:07:40 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.36: +3 -3 lines
Diff to previous 1.254.2.36 (colored) to branchpoint 1.254 (colored)

Revert previous... I got ahead of myself

Revision 1.254.2.36 / (download) - annotate - [select for diffs], Wed Dec 23 07:59:19 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.35: +3 -3 lines
Diff to previous 1.254.2.35 (colored) to branchpoint 1.254 (colored)

Transfer are only ever allocated from thread context now.  Change IPL_USB
to IPL_NONE in pool_cache_init for the xfer struct pool.

Revision 1.254.2.35 / (download) - annotate - [select for diffs], Sun Dec 6 15:39:35 2015 UTC (8 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.34: +643 -200 lines
Diff to previous 1.254.2.34 (colored) to branchpoint 1.254 (colored)

Restructure the xfer methods of ohci(4) so that minimal work in done in
softint context.  Now all memory allocation is done in thread context.

Addresses kern/48308 for ohci(4), might fix some locking bugs around the
*TD free lists, and plugs some memory leaks on error conditions.

Revision 1.254.2.34 / (download) - annotate - [select for diffs], Wed Dec 2 20:36:50 2015 UTC (8 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.33: +6 -3 lines
Diff to previous 1.254.2.33 (colored) to branchpoint 1.254 (colored)

Sanity checks in ohci_dump_tds

Revision 1.254.2.33 / (download) - annotate - [select for diffs], Wed Dec 2 07:40:29 2015 UTC (8 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.32: +10 -10 lines
Diff to previous 1.254.2.32 (colored) to branchpoint 1.254 (colored)

Group TD/ITD assignments.  No functional change.

Revision 1.254.2.32 / (download) - annotate - [select for diffs], Tue Dec 1 11:50:22 2015 UTC (8 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.31: +4 -3 lines
Diff to previous 1.254.2.31 (colored) to branchpoint 1.254 (colored)

Comment re-org / wrap long line

Revision 1.254.2.31 / (download) - annotate - [select for diffs], Tue Dec 1 07:38:58 2015 UTC (8 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.30: +7 -7 lines
Diff to previous 1.254.2.30 (colored) to branchpoint 1.254 (colored)

Make isdone a bool

Revision 1.254.2.30 / (download) - annotate - [select for diffs], Tue Dec 1 06:47:09 2015 UTC (8 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.29: +4 -4 lines
Diff to previous 1.254.2.29 (colored) to branchpoint 1.254 (colored)

Whitespace

Revision 1.258 / (download) - annotate - [select for diffs], Mon Nov 30 13:27:09 2015 UTC (8 years, 4 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.257: +6 -6 lines
Diff to previous 1.257 (colored)

Trailing whitespace.

Revision 1.257 / (download) - annotate - [select for diffs], Mon Nov 30 13:26:09 2015 UTC (8 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.256: +3 -3 lines
Diff to previous 1.256 (colored)

Fix 10year old bug of mine affecting interrupt IN transfers.

Revision 1.254.2.29 / (download) - annotate - [select for diffs], Sun Nov 29 11:49:47 2015 UTC (8 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.28: +2 -27 lines
Diff to previous 1.254.2.28 (colored) to branchpoint 1.254 (colored)

Remove #if 0 / #endif debug code that raced hardware

Revision 1.254.2.28 / (download) - annotate - [select for diffs], Sun Nov 15 13:59:52 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.27: +2 -13 lines
Diff to previous 1.254.2.27 (colored) to branchpoint 1.254 (colored)

Remove unused fields from ohci_pipe

Revision 1.254.2.27 / (download) - annotate - [select for diffs], Sat Nov 14 10:05:47 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.26: +149 -159 lines
Diff to previous 1.254.2.26 (colored) to branchpoint 1.254 (colored)

Collapse ohci_device_request into ohci_device_ctrl_start.

No functional change intended.

Revision 1.254.2.26 / (download) - annotate - [select for diffs], Sat Nov 14 07:18:35 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.25: +3 -3 lines
Diff to previous 1.254.2.25 (colored) to branchpoint 1.254 (colored)

Whitespace.

Revision 1.254.2.25 / (download) - annotate - [select for diffs], Tue Oct 20 15:31:21 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.24: +65 -77 lines
Diff to previous 1.254.2.24 (colored) to branchpoint 1.254 (colored)

Consistently providei/use *_{XFER,PIPE,BUS}2SC, etc macros

Revision 1.254.2.24 / (download) - annotate - [select for diffs], Mon Oct 12 07:02:49 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.23: +17 -58 lines
Diff to previous 1.254.2.23 (colored) to branchpoint 1.254 (colored)

Remove #ifdef DIAGNOSTIC with KASSERT

Revision 1.254.2.23 / (download) - annotate - [select for diffs], Sun Oct 11 09:17:51 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.22: +5 -4 lines
Diff to previous 1.254.2.22 (colored) to branchpoint 1.254 (colored)

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

Revision 1.254.2.22 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:01 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.21: +3 -3 lines
Diff to previous 1.254.2.21 (colored) to branchpoint 1.254 (colored)

Sync with HEAD

Revision 1.256 / (download) - annotate - [select for diffs], Wed Aug 19 06:23:35 2015 UTC (8 years, 7 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.255: +3 -3 lines
Diff to previous 1.255 (colored)

More IPL_SCHED -> IPL_USB

Revision 1.254.2.21 / (download) - annotate - [select for diffs], Mon Apr 6 08:58:44 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.20: +33 -33 lines
Diff to previous 1.254.2.20 (colored) to branchpoint 1.254 (colored)

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.254.2.20 / (download) - annotate - [select for diffs], Mon Mar 30 11:56:18 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.19: +4 -4 lines
Diff to previous 1.254.2.19 (colored) to branchpoint 1.254 (colored)

Replace an if () panic with KASSERT

Revision 1.255 / (download) - annotate - [select for diffs], Mon Mar 30 11:54:43 2015 UTC (9 years ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.254: +4 -4 lines
Diff to previous 1.254 (colored)

Replace an if () panic with KASSERT

Revision 1.254.2.19 / (download) - annotate - [select for diffs], Thu Mar 19 17:26:43 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.18: +91 -91 lines
Diff to previous 1.254.2.18 (colored) to branchpoint 1.254 (colored)

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

Revision 1.254.2.18 / (download) - annotate - [select for diffs], Tue Feb 24 16:57:02 2015 UTC (9 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.17: +324 -228 lines
Diff to previous 1.254.2.17 (colored) to branchpoint 1.254 (colored)

Convert to USBHIST

Revision 1.254.2.17 / (download) - annotate - [select for diffs], Sun Feb 22 08:25:02 2015 UTC (9 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.16: +8 -7 lines
Diff to previous 1.254.2.16 (colored) to branchpoint 1.254 (colored)

KNF

Revision 1.254.2.16 / (download) - annotate - [select for diffs], Sun Feb 1 06:30:29 2015 UTC (9 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.15: +5 -5 lines
Diff to previous 1.254.2.15 (colored) to branchpoint 1.254 (colored)

KNF

Revision 1.218.8.3 / (download) - annotate - [select for diffs], Sun Dec 7 15:09:31 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-6
Changes since 1.218.8.2: +3 -3 lines
Diff to previous 1.218.8.2 (colored) to branchpoint 1.218 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1201):
	sys/kern/kern_ktrace.c: revision 1.166
	sys/dev/isa/aps.c: revision 1.16
	sys/dev/sysmon/sysmonvar.h: revision 1.45
	sys/dev/ir/irframe_tty.c: revision 1.60
	sys/dev/sysmon/sysmon_envsys_events.c: revision 1.111-1.112 (patch)
	sys/dev/pci/pccbb.c: revision 1.207
	sys/dev/wscons/wskbd.c: revision 1.135
	sys/dev/usb/ohci.c: revision 1.254
	sys/net/if_ecosubr.c: revision 1.41
	sys/dev/pcmcia/btbc.c: revision 1.17
	sys/arch/x86/x86/via_padlock.c: revision 1.23
	sys/dev/sdmmc/sdmmc.c: revision 1.23 (patch)
	sys/dev/bluetooth/btkbd.c: revision 1.17
	sys/dev/bluetooth/bcsp.c: revision 1.25
	sys/arch/x86/pci/fwhrng.c: revision 1.8
	sys/dev/ic/nslm7x.c: revision 1.61
	share/man/man9/callout.9: revision 1.28 (patch)

Replace callout_stop with callout_halt and ensure the callout
is not running before destroying it.

Revision 1.254.2.15 / (download) - annotate - [select for diffs], Sat Dec 6 08:27:23 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.14: +8 -8 lines
Diff to previous 1.254.2.14 (colored) to branchpoint 1.254 (colored)

KNF. Remove argument name from function declarations.

No functional change.

Revision 1.254.2.14 / (download) - annotate - [select for diffs], Fri Dec 5 13:23:38 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.13: +10 -10 lines
Diff to previous 1.254.2.13 (colored) to branchpoint 1.254 (colored)

Use int for return type for [eou]chi_init and motg_init.

Revision 1.254.2.13 / (download) - annotate - [select for diffs], Fri Dec 5 09:37:49 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.12: +57 -57 lines
Diff to previous 1.254.2.12 (colored) to branchpoint 1.254 (colored)

KNF. Remove ( ) from return statements.

Revision 1.254.2.12 / (download) - annotate - [select for diffs], Thu Dec 4 08:04:31 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.11: +72 -291 lines
Diff to previous 1.254.2.11 (colored) to branchpoint 1.254 (colored)

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

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

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

Revision 1.254.2.11 / (download) - annotate - [select for diffs], Wed Dec 3 23:05:06 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.10: +3 -3 lines
Diff to previous 1.254.2.10 (colored) to branchpoint 1.254 (colored)

Rename usbroothub_subr.[ch] to usbroothub.[ch]

Revision 1.254.2.10 / (download) - annotate - [select for diffs], Wed Dec 3 22:40:55 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.9: +7 -8 lines
Diff to previous 1.254.2.9 (colored) to branchpoint 1.254 (colored)

Provide a USETWD macro for use with USB words designated
initialisers.

Revision 1.254.2.9 / (download) - annotate - [select for diffs], Wed Dec 3 13:19:38 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.8: +24 -22 lines
Diff to previous 1.254.2.8 (colored) to branchpoint 1.254 (colored)

Use designated initializers for more descriptors.

Revision 1.254.2.8 / (download) - annotate - [select for diffs], Wed Dec 3 13:09:00 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.7: +16 -12 lines
Diff to previous 1.254.2.7 (colored) to branchpoint 1.254 (colored)

Use designated initialisers for usb_device_descriptor_t structs.

Revision 1.254.2.7 / (download) - annotate - [select for diffs], Wed Dec 3 12:52:07 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.6: +217 -216 lines
Diff to previous 1.254.2.6 (colored) to branchpoint 1.254 (colored)

The grand renaming of structure members.

No functional change.

Revision 1.254.2.6 / (download) - annotate - [select for diffs], Tue Dec 2 09:00:33 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.5: +5 -35 lines
Diff to previous 1.254.2.5 (colored) to branchpoint 1.254 (colored)

Step #1 of memory allocation re-organisation.

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

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

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

Revision 1.254.2.5 / (download) - annotate - [select for diffs], Mon Dec 1 12:38:39 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.4: +47 -47 lines
Diff to previous 1.254.2.4 (colored) to branchpoint 1.254 (colored)

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

Revision 1.253.2.1 / (download) - annotate - [select for diffs], Mon Dec 1 11:38:43 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-7
CVS Tags: 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
Changes since 1.253: +3 -3 lines
Diff to previous 1.253 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #279):
	sys/kern/kern_ktrace.c: revision 1.166
	sys/dev/isa/aps.c: revision 1.16
	sys/dev/sysmon/sysmonvar.h: revision 1.45
	sys/dev/ir/irframe_tty.c: revision 1.60
	sys/dev/sysmon/sysmon_envsys_events.c: revision 1.111
	sys/dev/sysmon/sysmon_envsys_events.c: revision 1.112
	sys/dev/pci/pccbb.c: revision 1.207
	sys/dev/wscons/wskbd.c: revision 1.135
	sys/dev/usb/ohci.c: revision 1.254
	sys/net/if_ecosubr.c: revision 1.41
	sys/dev/pcmcia/btbc.c: revision 1.17
	sys/arch/x86/x86/via_padlock.c: revision 1.23
	sys/dev/sdmmc/sdmmc.c: revision 1.23
	sys/dev/bluetooth/btkbd.c: revision 1.17
	sys/dev/bluetooth/bcsp.c: revision 1.25
	sys/arch/x86/pci/fwhrng.c: revision 1.8
	sys/dev/ic/nslm7x.c: revision 1.61
	share/man/man9/callout.9: revision 1.28
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
Discussed with martin@ and riastradh@.
Make it clear that we should use not callout_stop but callout_halt
before callout_destroy
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete.
Reviewed by riastradh@.
Kill sme_callout_mtx and use sme_mtx instead
We can use sme_mtx for the callout as well. Actually we should do so
because sme_events_list and some other data that are touched in the
callout should be protected by sme_mtx, not sme_callout_mtx.
Discussed with riastradh@ in
http://mail-index.netbsd.org/tech-kern/2014/11/11/msg017956.html
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete. And also we make sure that SME_CALLOUT_INITIALIZED
is unset before calling callout_halt to prevent the callout from calling
callout_schedule. This is the same as what we did in sys/netinet6/mld6.c@1.61.
Reviewed by riastradh@.

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

Remove usbd_bus no_intrs member it was (virtually) unused.

Revision 1.254.2.3 / (download) - annotate - [select for diffs], Sun Nov 30 16:38:45 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.2: +3 -5 lines
Diff to previous 1.254.2.2 (colored) to branchpoint 1.254 (colored)

Use ASSERT_SLEEPABLE.

Revision 1.254.2.2 / (download) - annotate - [select for diffs], Sun Nov 30 13:14:11 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254.2.1: +5 -5 lines
Diff to previous 1.254.2.1 (colored) to branchpoint 1.254 (colored)

Whitespace

Revision 1.254.2.1 / (download) - annotate - [select for diffs], Sun Nov 30 12:18:58 2014 UTC (9 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.254: +24 -24 lines
Diff to previous 1.254 (colored)

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

No functional change.

Revision 1.254 / (download) - annotate - [select for diffs], Fri Nov 21 09:40:10 2014 UTC (9 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.253: +3 -3 lines
Diff to previous 1.253 (colored)

Replace callout_stop with callout_halt

In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.

In this case, we need to pass an interlock to callout_halt to wait for
the callout complete.

Reviewed by riastradh@.

Revision 1.224.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:51 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.224.2.2: +30 -49 lines
Diff to previous 1.224.2.2 (colored) to branchpoint 1.224 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.250.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:59 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.250: +6 -12 lines
Diff to previous 1.250 (colored) next main 1.251 (colored)

Rebase.

Revision 1.253 / (download) - annotate - [select for diffs], Tue Aug 5 10:33:46 2014 UTC (9 years, 8 months ago) by skrll
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.252: +2 -4 lines
Diff to previous 1.252 (colored)

Remove #ifdef DIAGNOSTIC around sc from the root interrupt abort methods
now it's always used.

Revision 1.252 / (download) - annotate - [select for diffs], Tue Aug 5 08:33:50 2014 UTC (9 years, 8 months ago) by skrll
Branch: MAIN
Changes since 1.251: +4 -2 lines
Diff to previous 1.251 (colored)

Prevent the root hub sending updates once the root interrupt abort is
called.

Revision 1.251 / (download) - annotate - [select for diffs], Tue Aug 5 06:35:24 2014 UTC (9 years, 8 months ago) by skrll
Branch: MAIN
Changes since 1.250: +4 -10 lines
Diff to previous 1.250 (colored)

Simplify the freeing of the interrupt pipe transfer.  Inspired by OpenBSD.

Revision 1.218.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:40:36 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.218.2.4: +86 -92 lines
Diff to previous 1.218.2.4 (colored) to branchpoint 1.218 (colored) next main 1.219 (colored)

sync with head.

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

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

Revision 1.241.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:47 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.241: +28 -41 lines
Diff to previous 1.241 (colored) next main 1.242 (colored)

sync with head

Revision 1.250 / (download) - annotate - [select for diffs], Mon Feb 17 07:34:21 2014 UTC (10 years, 1 month ago) by skrll
Branch: 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
Changes since 1.249: +11 -19 lines
Diff to previous 1.249 (colored)

Re-establish the default pipe after the initial reading of the device
descriptor.

This fixes usbd_new_device so that there is no really need to touch
QHs/EDs in [eo]hci_device_request.

KASSERT the address and maximum packet length now.

Revision 1.249 / (download) - annotate - [select for diffs], Tue Jan 28 17:24:42 2014 UTC (10 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.248: +14 -2 lines
Diff to previous 1.248 (colored)

Support the OHCI in the NS "SUPERIO" chip as found in hppa machines by
twiddling the same bits as Linux.

Revision 1.248 / (download) - annotate - [select for diffs], Mon Dec 16 10:04:20 2013 UTC (10 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.247: +16 -8 lines
Diff to previous 1.247 (colored)

Backout the ED/QH change removal in [eo]hci_device_request.

Reports of the KASSERT firing mean this needs more thought/testing.

Revision 1.247 / (download) - annotate - [select for diffs], Sun Dec 15 18:50:25 2013 UTC (10 years, 4 months ago) by jakllsch
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored)

Correct a KASSERT's logic (SET vs. GET).

Revision 1.246 / (download) - annotate - [select for diffs], Sun Dec 15 10:25:23 2013 UTC (10 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.245: +8 -16 lines
Diff to previous 1.245 (colored)

Now that usbd_new_device has been fixed there is no need to touch QHs/EDs
in [eo]hci_device_request.

KASSERT the address and maximum packet length just in case.

Revision 1.245 / (download) - annotate - [select for diffs], Sun Dec 1 07:28:47 2013 UTC (10 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.244: +3 -3 lines
Diff to previous 1.244 (colored)

Adjust KASSERT in device_ctrl_done to polling case.

PR/48213: ehci assertion failure during boot

Revision 1.244 / (download) - annotate - [select for diffs], Mon Oct 28 17:40:43 2013 UTC (10 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.243: +3 -2 lines
Diff to previous 1.243 (colored)

Add an explicit initialization of .new_device = NULL

Revision 1.243 / (download) - annotate - [select for diffs], Sun Sep 15 09:16:21 2013 UTC (10 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.242: +5 -8 lines
Diff to previous 1.242 (colored)

Remove an unused variable, silence a few unused warnings

Revision 1.242 / (download) - annotate - [select for diffs], Sat Sep 14 13:13:59 2013 UTC (10 years, 7 months ago) by joerg
Branch: MAIN
Changes since 1.241: +2 -17 lines
Diff to previous 1.241 (colored)

GC OREAD1 and OREAD2

Revision 1.224.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:22 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.224.2.1: +54 -33 lines
Diff to previous 1.224.2.1 (colored) to branchpoint 1.224 (colored)

resync from head

Revision 1.218.8.2 / (download) - annotate - [select for diffs], Sat Apr 20 09:52:19 2013 UTC (10 years, 11 months ago) by bouyer
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Changes since 1.218.8.1: +18 -11 lines
Diff to previous 1.218.8.1 (colored) to branchpoint 1.218 (colored)

Pull up following revision(s) (requested by skrll in ticket #864):
	sys/dev/usb/ohci.c: revision 1.234
	sys/dev/usb/ohci.c: revision 1.236
Don't leak memory if ohci_alloc_std_chain fails.
When dumping the done list in ohci_softintr / OHCI_DEBUG use the correct
list next pointer.
PR/33450 and part of PR/35379.

Revision 1.241 / (download) - annotate - [select for diffs], Thu Apr 4 13:28:57 2013 UTC (11 years ago) by skrll
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.240: +13 -11 lines
Diff to previous 1.240 (colored)

Handle errors in ohci_open better.

Revision 1.240 / (download) - annotate - [select for diffs], Thu Apr 4 13:27:55 2013 UTC (11 years ago) by skrll
Branch: MAIN
Changes since 1.239: +9 -8 lines
Diff to previous 1.239 (colored)

Don't take the bus lock in usbd_transfer_complete when polling.

Sprinkle || polling in KASSERTsw

Revision 1.239 / (download) - annotate - [select for diffs], Thu Apr 4 12:21:12 2013 UTC (11 years ago) by skrll
Branch: MAIN
Changes since 1.238: +4 -3 lines
Diff to previous 1.238 (colored)

Take the bus lock in ohci_poll as it's assumed by ohci_softintr which
will get called by ohci_intr1... I can enter ddb using usb keyboard
attached via ohci now.

Revision 1.238 / (download) - annotate - [select for diffs], Thu Apr 4 09:46:42 2013 UTC (11 years ago) by skrll
Branch: MAIN
Changes since 1.237: +3 -3 lines
Diff to previous 1.237 (colored)

Slight formatting tweak ro previous

Revision 1.237 / (download) - annotate - [select for diffs], Thu Apr 4 09:23:04 2013 UTC (11 years ago) by skrll
Branch: MAIN
Changes since 1.236: +19 -8 lines
Diff to previous 1.236 (colored)

Improve/fix TD flags reporting.

Revision 1.236 / (download) - annotate - [select for diffs], Wed Apr 3 19:02:12 2013 UTC (11 years ago) by skrll
Branch: MAIN
Changes since 1.235: +14 -9 lines
Diff to previous 1.235 (colored)

Don't leak memory if ohci_alloc_std_chain fails.

Revision 1.235 / (download) - annotate - [select for diffs], Fri Mar 22 13:28:11 2013 UTC (11 years ago) by skrll
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.234: +3 -3 lines
Diff to previous 1.234 (colored)

Fix typo in function name in DIAGNOSTIC prinf by using __func__

Revision 1.234 / (download) - annotate - [select for diffs], Fri Mar 22 13:20:12 2013 UTC (11 years ago) by skrll
Branch: MAIN
Changes since 1.233: +6 -4 lines
Diff to previous 1.233 (colored)


When dumping the done list in ohci_softintr / OHCI_DEBUG use the correct
list next pointer.

PR/33450 and part of PR/35379.

Revision 1.233 / (download) - annotate - [select for diffs], Fri Mar 22 12:47:56 2013 UTC (11 years ago) by skrll
Branch: MAIN
Changes since 1.232: +2 -3 lines
Diff to previous 1.232 (colored)

Remove 'return' right after 'goto'

Revision 1.224.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:37 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.224: +19 -32 lines
Diff to previous 1.224 (colored)

resync with head

Revision 1.232 / (download) - annotate - [select for diffs], Tue Jan 29 00:00:15 2013 UTC (11 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.231: +8 -22 lines
Diff to previous 1.231 (colored)

use a pool instead of a linked list to avoid synchronization problems.

Revision 1.218.2.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:12 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.218.2.3: +12 -11 lines
Diff to previous 1.218.2.3 (colored) to branchpoint 1.218 (colored)

sync with head

Revision 1.231 / (download) - annotate - [select for diffs], Tue Jan 22 12:40:43 2013 UTC (11 years, 2 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base8
Changes since 1.230: +4 -3 lines
Diff to previous 1.230 (colored)

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

Revision 1.218.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:34 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.218.2.2: +3 -3 lines
Diff to previous 1.218.2.2 (colored) to branchpoint 1.218 (colored)

sync with (a bit old) head

Revision 1.230 / (download) - annotate - [select for diffs], Sun Jan 13 01:10:59 2013 UTC (11 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.229: +4 -3 lines
Diff to previous 1.229 (colored)

fix missing mutex_exit in error path of ohci_waitintr

Revision 1.229 / (download) - annotate - [select for diffs], Sat Jan 5 23:34:18 2013 UTC (11 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.228: +3 -9 lines
Diff to previous 1.228 (colored)

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.218.8.1 / (download) - annotate - [select for diffs], Sat Jan 5 23:30:04 2013 UTC (11 years, 3 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1
Changes since 1.218: +6 -3 lines
Diff to previous 1.218 (colored)

Pull up following revision(s) (requested by skrll in ticket #765):
	sys/dev/usb/ohci.c: revision 1.226
PR/41602
Fix a memory leak when ohci_device_setintr didn't return
USBD_NORMAL_COMPLETION.
ohci_setup_isoc always returns USBD_NORMAL_COMPLETION at the moment so
there's no chance of a leak there.
PR/41602
Fix a memory leak when ohci_device_setintr didn't return
USBD_NORMAL_COMPLETION.
ohci_setup_isoc always returns USBD_NORMAL_COMPLETION at the moment so
there's no chance of a leak there.

Revision 1.228 / (download) - annotate - [select for diffs], Sat Jan 5 01:30:16 2013 UTC (11 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.227: +4 -2 lines
Diff to previous 1.227 (colored)

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID

Revision 1.227 / (download) - annotate - [select for diffs], Wed Jan 2 09:50:26 2013 UTC (11 years, 3 months ago) by skrll
Branch: MAIN
Changes since 1.226: +3 -3 lines
Diff to previous 1.226 (colored)

Correct a comment

Revision 1.226 / (download) - annotate - [select for diffs], Sun Dec 23 17:00:13 2012 UTC (11 years, 3 months ago) by skrll
Branch: MAIN
Changes since 1.225: +6 -3 lines
Diff to previous 1.225 (colored)

PR/41602

Fix a memory leak when ohci_device_setintr didn't return
USBD_NORMAL_COMPLETION.

ohci_setup_isoc always returns USBD_NORMAL_COMPLETION at the moment so
there's no chance of a leak there.

Revision 1.225 / (download) - annotate - [select for diffs], Tue Nov 20 21:16:01 2012 UTC (11 years, 4 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.224: +3 -3 lines
Diff to previous 1.224 (colored)

KNF whitespace.

Revision 1.218.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:07 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.218.2.1: +276 -142 lines
Diff to previous 1.218.2.1 (colored) to branchpoint 1.218 (colored)

sync with head

Revision 1.224 / (download) - annotate - [select for diffs], Sun Jun 10 06:15:53 2012 UTC (11 years, 10 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.223: +276 -142 lines
Diff to previous 1.223 (colored)

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

the main changes are something like:

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

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

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

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

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

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

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

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

Revision 1.218.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:07 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.218: +48 -68 lines
Diff to previous 1.218 (colored)

sync with head

Revision 1.218.6.20 / (download) - annotate - [select for diffs], Thu Apr 5 22:32:08 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.19: +2 -0 lines
Diff to previous 1.218.6.19 (colored) to branchpoint 1.218 (colored) next main 1.219 (colored)

make these compile without DIAGNOSTIC.

Revision 1.218.6.19 / (download) - annotate - [select for diffs], Sun Mar 11 01:52:28 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.18: +2 -3 lines
Diff to previous 1.218.6.18 (colored) to branchpoint 1.218 (colored)

sync to latest -current

Revision 1.223 / (download) - annotate - [select for diffs], Sun Mar 11 00:34:46 2012 UTC (12 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base10
Changes since 1.222: +5 -10 lines
Diff to previous 1.222 (colored)

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

Revision 1.222 / (download) - annotate - [select for diffs], Sat Mar 10 23:01:07 2012 UTC (12 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.221: +3 -3 lines
Diff to previous 1.221 (colored)

remove checks against "!curproc".

Revision 1.218.6.18 / (download) - annotate - [select for diffs], Tue Mar 6 18:26:46 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.17: +3 -3 lines
Diff to previous 1.218.6.17 (colored) to branchpoint 1.218 (colored)

sync to -current

Revision 1.221 / (download) - annotate - [select for diffs], Tue Mar 6 03:35:29 2012 UTC (12 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: jmcneill-usbmp-base6
Changes since 1.220: +45 -45 lines
Diff to previous 1.220 (colored)

pull down from usbmp branch:

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

Revision 1.220 / (download) - annotate - [select for diffs], Tue Mar 6 02:49:03 2012 UTC (12 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.219: +2 -8 lines
Diff to previous 1.219 (colored)

pull down from usbmp:

kill the !USE_USE_SOFTINTR code.

Revision 1.219 / (download) - annotate - [select for diffs], Tue Mar 6 02:36:46 2012 UTC (12 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.218: +2 -11 lines
Diff to previous 1.218 (colored)

pull down from usbmp branch:

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

Revision 1.218.6.17 / (download) - annotate - [select for diffs], Sat Mar 3 02:29:34 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.16: +7 -11 lines
Diff to previous 1.218.6.16 (colored) to branchpoint 1.218 (colored)

use usb_delay_ms_locked() in some more places

Revision 1.218.6.16 / (download) - annotate - [select for diffs], Sun Feb 26 05:05:44 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.15: +3 -3 lines
Diff to previous 1.218.6.15 (colored) to branchpoint 1.218 (colored)

- add some more "XXXSMP ok" tags
- use cpu_softintr_p() instead of checking LP_INTR directly

Revision 1.218.6.15 / (download) - annotate - [select for diffs], Sat Feb 25 20:46:34 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.14: +4 -10 lines
Diff to previous 1.218.6.14 (colored) to branchpoint 1.218 (colored)

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

XXX: there's one check that changes behaviour

Revision 1.218.6.14 / (download) - annotate - [select for diffs], Sat Feb 25 12:53:34 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.13: +3 -3 lines
Diff to previous 1.218.6.13 (colored) to branchpoint 1.218 (colored)

remove curproc references

Revision 1.218.6.13 / (download) - annotate - [select for diffs], Sat Feb 25 10:26:23 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.12: +4 -4 lines
Diff to previous 1.218.6.12 (colored) to branchpoint 1.218 (colored)

copyright maintenence.

Revision 1.218.6.12 / (download) - annotate - [select for diffs], Thu Feb 23 09:25:04 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.11: +10 -10 lines
Diff to previous 1.218.6.11 (colored) to branchpoint 1.218 (colored)

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

Revision 1.218.6.11 / (download) - annotate - [select for diffs], Mon Feb 20 06:50:21 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.10: +5 -7 lines
Diff to previous 1.218.6.10 (colored) to branchpoint 1.218 (colored)

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

Revision 1.218.6.10 / (download) - annotate - [select for diffs], Mon Feb 20 03:23:26 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.9: +4 -2 lines
Diff to previous 1.218.6.9 (colored) to branchpoint 1.218 (colored)

adjust some comments to reality.  copy some XXX comments from ehci
into uhci/ohci since it's probably right there too

Revision 1.218.6.9 / (download) - annotate - [select for diffs], Mon Feb 20 02:12:24 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.8: +41 -20 lines
Diff to previous 1.218.6.8 (colored) to branchpoint 1.218 (colored)

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

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

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

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

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

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

- add many more asserts

- use more c99 struct initialisers

Revision 1.218.6.8 / (download) - annotate - [select for diffs], Fri Dec 9 01:53:00 2011 UTC (12 years, 4 months ago) by mrg
Branch: jmcneill-usbmp
CVS Tags: jmcneill-usbmp-pre-base2
Changes since 1.218.6.7: +13 -11 lines
Diff to previous 1.218.6.7 (colored) to branchpoint 1.218 (colored)

- make pipe->close method take the thread lock

- convert usb_taskq to use mutex/cv

- convert needs_explore usage into a cv on the thread lock

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

- use IPL_SCHED instead of IPL_USB (aka biglocked) interrupts

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

Revision 1.218.6.7 / (download) - annotate - [select for diffs], Thu Dec 8 22:38:47 2011 UTC (12 years, 4 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.6: +15 -5 lines
Diff to previous 1.218.6.6 (colored) to branchpoint 1.218 (colored)

make ohci mostly work again.

Revision 1.218.6.2.2.7 / (download) - annotate - [select for diffs], Thu Dec 8 20:21:31 2011 UTC (12 years, 4 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.2.2.6: +13 -7 lines
Diff to previous 1.218.6.2.2.6 (colored) to branchpoint 1.218.6.2 (colored) next main 1.218.6.3 (colored)

pull across a few more of the changes from the main branch.

Revision 1.218.6.2.2.6 / (download) - annotate - [select for diffs], Thu Dec 8 10:22:40 2011 UTC (12 years, 4 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.2.2.5: +5 -3 lines
Diff to previous 1.218.6.2.2.5 (colored) to branchpoint 1.218.6.2 (colored)

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

Revision 1.218.6.2.2.5 / (download) - annotate - [select for diffs], Thu Dec 8 09:36:49 2011 UTC (12 years, 4 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.2.2.4: +11 -9 lines
Diff to previous 1.218.6.2.2.4 (colored) to branchpoint 1.218.6.2 (colored)

at little closer to the main branch.

Revision 1.218.6.2.2.4 / (download) - annotate - [select for diffs], Thu Dec 8 09:09:30 2011 UTC (12 years, 4 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.2.2.3: +72 -66 lines
Diff to previous 1.218.6.2.2.3 (colored) to branchpoint 1.218.6.2 (colored)

partial sync with main branch

Revision 1.218.6.2.2.3 / (download) - annotate - [select for diffs], Thu Dec 8 08:52:25 2011 UTC (12 years, 4 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.2.2.2: +3 -3 lines
Diff to previous 1.218.6.2.2.2 (colored) to branchpoint 1.218.6.2 (colored)

sync a couple more changes from the main branch, uaudio@ohci still works.

Revision 1.218.6.2.2.2 / (download) - annotate - [select for diffs], Thu Dec 8 08:17:30 2011 UTC (12 years, 4 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.2.2.1: +8 -12 lines
Diff to previous 1.218.6.2.2.1 (colored) to branchpoint 1.218.6.2 (colored)

slightly closer, and still working with uaudio.

Revision 1.218.6.2.2.1 / (download) - annotate - [select for diffs], Thu Dec 8 07:53:56 2011 UTC (12 years, 4 months ago) by mrg
Branch: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.2: +17 -13 lines
Diff to previous 1.218.6.2 (colored)

there's something wrong with uaudio@ohci on the usbmp branch.
this is the minimally working port of ohci to mpusb, and it works
with uaudio but is lacking many other changes, yet.

Revision 1.218.6.6 / (download) - annotate - [select for diffs], Thu Dec 8 02:51:07 2011 UTC (12 years, 4 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.5: +60 -57 lines
Diff to previous 1.218.6.5 (colored) to branchpoint 1.218 (colored)

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

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

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

- begin to document the locking scheme

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

Revision 1.218.6.5 / (download) - annotate - [select for diffs], Wed Dec 7 05:41:53 2011 UTC (12 years, 4 months ago) by macallan
Branch: jmcneill-usbmp
Changes since 1.218.6.4: +6 -2 lines
Diff to previous 1.218.6.4 (colored) to branchpoint 1.218 (colored)

make this build without DIAGNOSTIC

Revision 1.218.6.4 / (download) - annotate - [select for diffs], Tue Dec 6 05:05:30 2011 UTC (12 years, 4 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.3: +3 -4 lines
Diff to previous 1.218.6.3 (colored) to branchpoint 1.218 (colored)

don't forget to drop the lock in ohci_intr if we got there when
polling.  also don't try to drop a lock we don't have in ohci_open.

XXX: these might apply to ehci as well, i found them when porting
XXX: to uhci.

Revision 1.218.6.3 / (download) - annotate - [select for diffs], Tue Dec 6 02:10:01 2011 UTC (12 years, 4 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.218.6.2: +8 -8 lines
Diff to previous 1.218.6.2 (colored) to branchpoint 1.218 (colored)

need to ensure kpreempt_disable() for softint_schedule().

fix the locking in ohci_timeout_task(), ohci_device_isoc_start(),
ohci_device_isoc_abort() and ohci_device_isoc_close().

uaudio(4) can still play with these, but mixerctl -a against it will
hang the writer.  however, mixerctl continues to run in a tight loop
and the system isn't soft-locked up at this point, an advance from
how it is in -current.

Revision 1.218.6.2 / (download) - annotate - [select for diffs], Sun Dec 4 21:02:27 2011 UTC (12 years, 4 months ago) by jmcneill
Branch: jmcneill-usbmp
CVS Tags: mrg-ohci-jmcneill-usbmp-base
Branch point for: mrg-ohci-jmcneill-usbmp
Changes since 1.218.6.1: +212 -129 lines
Diff to previous 1.218.6.1 (colored) to branchpoint 1.218 (colored)

adapt ohci, from mrg with some changes by me

Revision 1.218.6.1 / (download) - annotate - [select for diffs], Sun Dec 4 13:23:16 2011 UTC (12 years, 4 months ago) by jmcneill
Branch: jmcneill-usbmp
Changes since 1.218: +3 -2 lines
Diff to previous 1.218 (colored)

Make ehci mpsafe.

Revision 1.196.4.2 / (download) - annotate - [select for diffs], Fri Aug 19 19:45:39 2011 UTC (12 years, 7 months ago) by riz
Branch: 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
Changes since 1.196.4.1: +2 -2 lines
Diff to previous 1.196.4.1 (colored) to branchpoint 1.196 (colored) next main 1.197 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #1663):
	sys/dev/usb/ohci.c: patch
Fix the build problem introduced by pullup ticket #1655.

Revision 1.196.4.1 / (download) - annotate - [select for diffs], Fri Aug 12 20:52:25 2011 UTC (12 years, 8 months ago) by riz
Branch: netbsd-5
Changes since 1.196: +5 -3 lines
Diff to previous 1.196 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #1655):
	sys/dev/usb/ohci.c: revision 1.218
PR# kern/30398: panic in ohci_softintr
If the host controller has a TD that the driver doesn't know about, ignore it
instead of calling panic. Patch from Karl Janmar.

Revision 1.218 / (download) - annotate - [select for diffs], Sun Aug 7 13:45:46 2011 UTC (12 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.217: +5 -3 lines
Diff to previous 1.217 (colored)

PR# kern/30398: panic in ohci_softintr

If the host controller has a TD that the driver doesn't know about, ignore it
instead of calling panic. Patch from Karl Janmar.

Revision 1.217 / (download) - annotate - [select for diffs], Sat Jul 30 20:05:36 2011 UTC (12 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.216: +3 -2 lines
Diff to previous 1.216 (colored)

PR# port-i386/18818: cannot enter ddb with usb keyboard

- ohci: when polling, make sure sc_eintrs has the OHCI_WDH flag set
  otherwise ohci_intr1 won't actually read data
- usbdi: kick the host controller by calling its soft_intr callback when
  switching out of polling mode too

DDB with a USB keyboard works for me now with ohci.

Revision 1.215.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:10 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.215: +4 -2 lines
Diff to previous 1.215 (colored) next main 1.216 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.206.2.3 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:26 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.206.2.2: +2 -0 lines
Diff to previous 1.206.2.2 (colored) to branchpoint 1.206 (colored) next main 1.207 (colored)

sync with head

Revision 1.216 / (download) - annotate - [select for diffs], Thu Jun 9 19:08:31 2011 UTC (12 years, 10 months ago) by matt
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.215: +4 -2 lines
Diff to previous 1.215 (colored)

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.212.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:08:41 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.212: +7 -3 lines
Diff to previous 1.212 (colored) next main 1.213 (colored)

Sync with HEAD.

Revision 1.206.2.2 / (download) - annotate - [select for diffs], Tue May 31 03:04:55 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.206.2.1: +5 -1 lines
Diff to previous 1.206.2.1 (colored) to branchpoint 1.206 (colored)

sync with head

Revision 1.215 / (download) - annotate - [select for diffs], Sat May 28 15:47:17 2011 UTC (12 years, 10 months ago) by tsutsui
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.214: +5 -9 lines
Diff to previous 1.214 (colored)

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.214 / (download) - annotate - [select for diffs], Fri May 27 20:37:13 2011 UTC (12 years, 10 months ago) by jakllsch
Branch: MAIN
Changes since 1.213: +7 -3 lines
Diff to previous 1.213 (colored)

Data toggle accounting for endpoints on OHCI.

Revision 1.213 / (download) - annotate - [select for diffs], Fri May 27 19:04:24 2011 UTC (12 years, 10 months ago) by tsutsui
Branch: MAIN
Changes since 1.212: +9 -5 lines
Diff to previous 1.212 (colored)

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.206.2.1 / (download) - annotate - [select for diffs], Sat Mar 5 20:54:12 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.206: +20 -20 lines
Diff to previous 1.206 (colored)

sync with head

Revision 1.196.14.1 / (download) - annotate - [select for diffs], Fri Jan 7 02:33:21 2011 UTC (13 years, 3 months ago) by matt
Branch: matt-nb5-pq3
Changes since 1.196: +7 -7 lines
Diff to previous 1.196 (colored) next main 1.197 (colored)

move/change a few debug printfs

Revision 1.212 / (download) - annotate - [select for diffs], Wed Dec 22 01:34:19 2010 UTC (13 years, 3 months ago) by macallan
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.211: +2 -3 lines
Diff to previous 1.211 (colored)

don't disable interrpts in ohci_intr1 - now USB works again on my Blade 2500
( hi gimpy )

Revision 1.211 / (download) - annotate - [select for diffs], Wed Dec 15 23:48:15 2010 UTC (13 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.210: +10 -8 lines
Diff to previous 1.210 (colored)

Slighty tweak the interrupt debug printfs.

Revision 1.210 / (download) - annotate - [select for diffs], Sat Nov 13 13:52:12 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: MAIN
Changes since 1.209: +2 -3 lines
Diff to previous 1.209 (colored)

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.205.2.2 / (download) - annotate - [select for diffs], Sat Nov 6 08:08:36 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.205.2.1: +13 -13 lines
Diff to previous 1.205.2.1 (colored) to branchpoint 1.205 (colored) next main 1.206 (colored)

Sync with HEAD.

Revision 1.209 / (download) - annotate - [select for diffs], Wed Nov 3 22:34:23 2010 UTC (13 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: uebayasi-xip-base4
Changes since 1.208: +13 -13 lines
Diff to previous 1.208 (colored)

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.208 / (download) - annotate - [select for diffs], Wed Jun 9 13:33:13 2010 UTC (13 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.207: +3 -4 lines
Diff to previous 1.207 (colored)

Revert previous - it was committed unintentionally along with other changes.

Revision 1.207 / (download) - annotate - [select for diffs], Sun Jun 6 18:58:26 2010 UTC (13 years, 10 months ago) by pgoyette
Branch: MAIN
Changes since 1.206: +4 -3 lines
Diff to previous 1.206 (colored)

Update usbverbose module to use module_autoload() rather than module_load().
Load the module right before each attempt to use its features, and let the
module subsystem handle unloading.

Revision 1.205.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:52 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.205: +4 -4 lines
Diff to previous 1.205 (colored)

Sync with HEAD.

Revision 1.191.4.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:05 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.191.4.3: +15 -58 lines
Diff to previous 1.191.4.3 (colored) to branchpoint 1.191 (colored) next main 1.192 (colored)

sync with head

Revision 1.206 / (download) - annotate - [select for diffs], Wed Feb 24 22:38:09 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.205: +4 -4 lines
Diff to previous 1.205 (colored)

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.205 / (download) - annotate - [select for diffs], Fri Jan 8 20:39:04 2010 UTC (14 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.204: +4 -4 lines
Diff to previous 1.204 (colored)

Expand PMF_FN_* macros.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Jan 8 16:40:30 2010 UTC (14 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.203: +4 -5 lines
Diff to previous 1.203 (colored)

Fix memory barrier in a debug function

Revision 1.203 / (download) - annotate - [select for diffs], Thu Nov 12 19:49:03 2009 UTC (14 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.202: +5 -47 lines
Diff to previous 1.202 (colored)

Simplify activation hook.  (sc_dying must die!)

unifdef -D__NetBSD__ -U__FreeBSD__ -U__OpenBSD__.

Revision 1.182.12.6 / (download) - annotate - [select for diffs], Thu Nov 12 08:59:08 2009 UTC (14 years, 5 months ago) by uebayasi
Branch: itohy-usb1
Changes since 1.182.12.5: +2 -2 lines
Diff to previous 1.182.12.5 (colored) to branchpoint 1.182 (colored) next main 1.183 (colored)

Sort struct usbd_bus_methods member initializers.

Revision 1.202 / (download) - annotate - [select for diffs], Thu Nov 12 08:54:00 2009 UTC (14 years, 5 months ago) by uebayasi
Branch: MAIN
Changes since 1.201: +6 -6 lines
Diff to previous 1.201 (colored)

Comment & whitespace.

Revision 1.182.12.5 / (download) - annotate - [select for diffs], Thu Nov 12 08:50:05 2009 UTC (14 years, 5 months ago) by uebayasi
Branch: itohy-usb1
Changes since 1.182.12.4: +23 -23 lines
Diff to previous 1.182.12.4 (colored) to branchpoint 1.182 (colored)

USB_DEBUG -> OHCI_DEBUG

Revision 1.201 / (download) - annotate - [select for diffs], Sun Nov 1 06:36:44 2009 UTC (14 years, 5 months ago) by uebayasi
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored)

Update referencial URLs.

Revision 1.200 / (download) - annotate - [select for diffs], Fri Oct 16 00:45:26 2009 UTC (14 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored)

Since the aprint_normal_dev() several lines above prints a space
after the device name, no need to prepend the space here.

Revision 1.191.4.3 / (download) - annotate - [select for diffs], Wed Sep 16 13:37:58 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.191.4.2: +11 -14 lines
Diff to previous 1.191.4.2 (colored) to branchpoint 1.191 (colored)

sync with head

Revision 1.199 / (download) - annotate - [select for diffs], Tue Sep 1 21:46:07 2009 UTC (14 years, 7 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.198: +11 -14 lines
Diff to previous 1.198 (colored)

aprint-ify.

Revision 1.197.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:35 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.197: +20 -14 lines
Diff to previous 1.197 (colored) next main 1.198 (colored)

Sync with HEAD.

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

Revision 1.191.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:20 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.191.4.1: +197 -24 lines
Diff to previous 1.191.4.1 (colored) to branchpoint 1.191 (colored)

sync with head.

Revision 1.196.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:39 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.196.2.1: +20 -14 lines
Diff to previous 1.196.2.1 (colored) to branchpoint 1.196 (colored) next main 1.197 (colored)

Sync with HEAD.

Revision 1.198 / (download) - annotate - [select for diffs], Sat Apr 18 06:27:17 2009 UTC (15 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.197: +20 -14 lines
Diff to previous 1.197 (colored)

Initialize callout and lists before we check for errors.
This fixes crashes in ohci_detach() when ohci_init() failed.

Revision 1.196.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:09 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.196: +11 -11 lines
Diff to previous 1.196 (colored)

Sync with HEAD.

Revision 1.186.6.6 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:09 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.186.6.5: +9 -9 lines
Diff to previous 1.186.6.5 (colored) to branchpoint 1.186 (colored) next main 1.187 (colored)

Sync with HEAD.

Revision 1.197 / (download) - annotate - [select for diffs], Tue Dec 16 22:35:36 2008 UTC (15 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.196: +11 -11 lines
Diff to previous 1.196 (colored)

replace bitmask_snprintf(9) with snprintb(3)

Revision 1.195.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:09 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.195: +8 -3 lines
Diff to previous 1.195 (colored) next main 1.196 (colored)

Sync with HEAD.

Revision 1.157.2.2 / (download) - annotate - [select for diffs], Sun Sep 28 16:06:39 2008 UTC (15 years, 6 months ago) by jdc
Branch: netbsd-3
Changes since 1.157.2.1: +162 -2 lines
Diff to previous 1.157.2.1 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

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.186.6.5 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:33 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.186.6.4: +6 -1 lines
Diff to previous 1.186.6.4 (colored) to branchpoint 1.186 (colored)

Sync with HEAD.

Revision 1.192.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:35:11 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.192.2.1: +169 -3 lines
Diff to previous 1.192.2.1 (colored) to branchpoint 1.192 (colored) next main 1.193 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.179.2.1.2.1 / (download) - annotate - [select for diffs], Thu Sep 4 08:46:45 2008 UTC (15 years, 7 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.179.2.1: +173 -2 lines
Diff to previous 1.179.2.1 (colored) next main 1.179.2.2 (colored)

Sync with netbsd-4.

Revision 1.179.2.2 / (download) - annotate - [select for diffs], Sun Aug 31 16:48:29 2008 UTC (15 years, 7 months ago) by jdc
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.179.2.1: +173 -2 lines
Diff to previous 1.179.2.1 (colored) to branchpoint 1.179 (colored) next main 1.180 (colored)

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.196 / (download) - annotate - [select for diffs], Wed Aug 13 09:43:56 2008 UTC (15 years, 8 months ago) by drochner
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-pq3
Changes since 1.195: +8 -3 lines
Diff to previous 1.195 (colored)

free memory on detach, fixes memory leak, from Andreas Jacobs per
PR kern/39322

Revision 1.194.2.1 / (download) - annotate - [select for diffs], Thu Jul 3 18:38:05 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.194: +163 -2 lines
Diff to previous 1.194 (colored) next main 1.195 (colored)

Sync with head.

Revision 1.186.6.4 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:11 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.186.6.3: +161 -0 lines
Diff to previous 1.186.6.3 (colored) to branchpoint 1.186 (colored)

Sync with HEAD.

Revision 1.195 / (download) - annotate - [select for diffs], Sat Jun 28 17:42:53 2008 UTC (15 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.194: +163 -2 lines
Diff to previous 1.194 (colored)

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.192.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:36 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.192: +4 -3 lines
Diff to previous 1.192 (colored)

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

Revision 1.191.2.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:02 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.191.2.2: +3 -2 lines
Diff to previous 1.191.2.2 (colored) to branchpoint 1.191 (colored) next main 1.192 (colored)

sync with head.

Revision 1.186.6.3 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:35 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.186.6.2: +1 -0 lines
Diff to previous 1.186.6.2 (colored) to branchpoint 1.186 (colored)

Sync with HEAD.

Also fix build.

Revision 1.194 / (download) - annotate - [select for diffs], Wed Jun 4 12:38:58 2008 UTC (15 years, 10 months ago) by nonaka
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.193: +3 -2 lines
Diff to previous 1.193 (colored)

Added missing splx() at ohci_resume().

Revision 1.191.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:20 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.191.2.1: +3 -3 lines
Diff to previous 1.191.2.1 (colored) to branchpoint 1.191 (colored)

sync with head

Revision 1.186.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:23:53 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.186.6.1: +1 -8 lines
Diff to previous 1.186.6.1 (colored) to branchpoint 1.186 (colored)

Sync with HEAD.

Revision 1.193 / (download) - annotate - [select for diffs], Wed May 21 17:19:44 2008 UTC (15 years, 10 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

fix argument to usb_setup_reserve() (called from USB host adapter drivers)
to be device_t consistently, from Quentin Garnier

Revision 1.182.12.4 / (download) - annotate - [select for diffs], Wed May 21 05:26:13 2008 UTC (15 years, 10 months ago) by itohy
Branch: itohy-usb1
Changes since 1.182.12.3: +34 -122 lines
Diff to previous 1.182.12.3 (colored) to branchpoint 1.182 (colored)

cleanup

Revision 1.182.12.3 / (download) - annotate - [select for diffs], Wed May 21 05:02:11 2008 UTC (15 years, 10 months ago) by itohy
Branch: itohy-usb1
Changes since 1.182.12.2: +621 -145 lines
Diff to previous 1.182.12.2 (colored) to branchpoint 1.182 (colored)

Fix aux memory usage.
Implement recovory from isoc error.
Improve DMA sync.

Revision 1.191.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:34:50 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.191: +2 -9 lines
Diff to previous 1.191 (colored)

sync with head.

Revision 1.191.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:10 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.191: +2 -9 lines
Diff to previous 1.191 (colored)

sync with head.

Revision 1.192 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:59 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.191: +2 -9 lines
Diff to previous 1.191 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.186.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:57 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.186: +60 -56 lines
Diff to previous 1.186 (colored)

Sync with HEAD.

Revision 1.191 / (download) - annotate - [select for diffs], Sat Mar 29 02:20:41 2008 UTC (16 years ago) by nakayama
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.190: +7 -8 lines
Diff to previous 1.190 (colored)

Fix ohci brokenness in previous commit.

Revision 1.190 / (download) - annotate - [select for diffs], Fri Mar 28 17:14:46 2008 UTC (16 years ago) by drochner
Branch: MAIN
Changes since 1.189: +38 -37 lines
Diff to previous 1.189 (colored)

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

Revision 1.186.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:09 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.186: +19 -15 lines
Diff to previous 1.186 (colored) next main 1.187 (colored)

sync with head.

Revision 1.183.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:53 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.183.2.2: +27 -44 lines
Diff to previous 1.183.2.2 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored)

sync with HEAD

Revision 1.166.2.9 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:28 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.8: +8 -13 lines
Diff to previous 1.166.2.8 (colored) next main 1.167 (colored)

sync with head.

Revision 1.189 / (download) - annotate - [select for diffs], Fri Mar 7 21:48:46 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.188: +4 -4 lines
Diff to previous 1.188 (colored)

Use device_t and accessors.

In ohci_{pci,cardbus}_attach, do not get the device_t by casting
the softc to void *, but use `self' instead.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Mar 7 21:36:51 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.187: +6 -11 lines
Diff to previous 1.187 (colored)

Register the shutdown hook using pmf_device_register1().

Revision 1.166.2.8 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:47 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.7: +13 -4 lines
Diff to previous 1.166.2.7 (colored)

sync with head.

Revision 1.187 / (download) - annotate - [select for diffs], Fri Feb 22 22:22:27 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: hpcarm-cleanup-base
Changes since 1.186: +13 -4 lines
Diff to previous 1.186 (colored)

Add method to detach children.

Temporary: use PMF_FN_PROTO, PMF_FN_ARGS.

Revision 1.184.2.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:25 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.184: +10 -31 lines
Diff to previous 1.184 (colored) next main 1.185 (colored)

Sync with HEAD.

Revision 1.166.2.7 / (download) - annotate - [select for diffs], Mon Feb 4 09:23:37 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.6: +10 -31 lines
Diff to previous 1.166.2.6 (colored)

sync with head.

Revision 1.186 / (download) - annotate - [select for diffs], Sun Feb 3 10:57:12 2008 UTC (16 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.185: +10 -31 lines
Diff to previous 1.185 (colored)

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.166.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:44:44 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.5: +56 -66 lines
Diff to previous 1.166.2.5 (colored)

sync with head

Revision 1.183.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:54:39 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.183.2.1: +56 -66 lines
Diff to previous 1.183.2.1 (colored) to branchpoint 1.183 (colored)

sync with HEAD

Revision 1.184.4.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:47:24 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.184: +56 -66 lines
Diff to previous 1.184 (colored) next main 1.185 (colored)

Sync with head.

Revision 1.184.6.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:40:01 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-kmem
Changes since 1.184: +56 -66 lines
Diff to previous 1.184 (colored) next main 1.185 (colored)

sync with head.

Revision 1.185 / (download) - annotate - [select for diffs], Sun Dec 9 20:28:23 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: 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
Changes since 1.184: +56 -66 lines
Diff to previous 1.184 (colored)

Merge jmcneill-pm branch.

Revision 1.182.18.6 / (download) - annotate - [select for diffs], Wed Nov 7 01:14:17 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.182.18.5: +3 -3 lines
Diff to previous 1.182.18.5 (colored) to branchpoint 1.182 (colored) next main 1.183 (colored)

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.183.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:30:34 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.183: +4 -4 lines
Diff to previous 1.183 (colored)

sync with HEAD

Revision 1.182.18.5 / (download) - annotate - [select for diffs], Tue Nov 6 14:27:33 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.182.18.4: +9 -5 lines
Diff to previous 1.182.18.4 (colored) to branchpoint 1.182 (colored)

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.166.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:34:33 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.4: +4 -4 lines
Diff to previous 1.166.2.4 (colored)

sync with head.

Revision 1.182.18.4 / (download) - annotate - [select for diffs], Fri Oct 26 15:47:50 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.182.18.3: +4 -4 lines
Diff to previous 1.182.18.3 (colored) to branchpoint 1.182 (colored)

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.183.6.1 / (download) - annotate - [select for diffs], Thu Oct 25 22:39:50 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.183: +4 -4 lines
Diff to previous 1.183 (colored) next main 1.184 (colored)

Sync with HEAD.

Revision 1.182.4.2 / (download) - annotate - [select for diffs], Tue Oct 23 20:09:52 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.182.4.1: +4 -4 lines
Diff to previous 1.182.4.1 (colored) to branchpoint 1.182 (colored) next main 1.183 (colored)

Sync with head.

Revision 1.184 / (download) - annotate - [select for diffs], Fri Oct 19 12:01:21 2007 UTC (16 years, 6 months ago) by ad
Branch: 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
Changes since 1.183: +4 -4 lines
Diff to previous 1.183 (colored)

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.182.18.3 / (download) - annotate - [select for diffs], Mon Oct 1 05:38:01 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.182.18.2: +53 -87 lines
Diff to previous 1.182.18.2 (colored) to branchpoint 1.182 (colored)

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.166.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:39:07 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.3: +20 -15 lines
Diff to previous 1.166.2.3 (colored)

sync with head.

Revision 1.182.4.1 / (download) - annotate - [select for diffs], Mon Aug 20 18:37:55 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.182: +3 -3 lines
Diff to previous 1.182 (colored)

Sync with HEAD.

Revision 1.182.18.2 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:22 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.182.18.1: +3 -3 lines
Diff to previous 1.182.18.1 (colored) to branchpoint 1.182 (colored)

Sync with HEAD.

Revision 1.182.14.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:48:47 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.182: +3 -3 lines
Diff to previous 1.182 (colored) next main 1.183 (colored)

Sync with HEAD.

Revision 1.183 / (download) - annotate - [select for diffs], Wed Aug 15 04:00:33 2007 UTC (16 years, 8 months ago) by kiyohara
Branch: 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
Changes since 1.182: +3 -3 lines
Diff to previous 1.182 (colored)

* 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.182.18.1 / (download) - annotate - [select for diffs], Tue Aug 14 20:59:19 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.182: +73 -53 lines
Diff to previous 1.182 (colored)

Add ohci power management support, currently untested.

Revision 1.182.12.2 / (download) - annotate - [select for diffs], Thu May 31 23:15:17 2007 UTC (16 years, 10 months ago) by itohy
Branch: itohy-usb1
Changes since 1.182.12.1: +10 -4 lines
Diff to previous 1.182.12.1 (colored) to branchpoint 1.182 (colored)

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

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

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

Revision 1.182.12.1 / (download) - annotate - [select for diffs], Tue May 22 14:57:39 2007 UTC (16 years, 10 months ago) by itohy
Branch: itohy-usb1
Changes since 1.182: +1148 -546 lines
Diff to previous 1.182 (colored)

Overhaul of USB stack, mostly DMA related

This applies to NetBSD 4.99.13 (March 1, 2007)

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

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

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

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

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

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

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

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

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

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

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

Revision 1.181.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:04 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.181: +19 -14 lines
Diff to previous 1.181 (colored) next main 1.182 (colored)

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

Revision 1.182 / (download) - annotate - [select for diffs], Mon Feb 26 13:26:46 2007 UTC (17 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, itohy-usb1-base, hpcarm-cleanup, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, nick-csl-alignment, jmcneill-pm, itohy-usb1
Changes since 1.181: +19 -14 lines
Diff to previous 1.181 (colored)

-in root hub emulation, return a sane value as language code
-constify "methods" tables and (partly) descriptor templates

Revision 1.166.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:10:44 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.2: +3 -4 lines
Diff to previous 1.166.2.2 (colored)

sync with head.

Revision 1.179.2.1 / (download) - annotate - [select for diffs], Wed Feb 21 13:26:40 2007 UTC (17 years, 1 month ago) by tron
Branch: 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
Changes since 1.179: +2 -3 lines
Diff to previous 1.179 (colored)

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.181 / (download) - annotate - [select for diffs], Sat Feb 10 07:52:29 2007 UTC (17 years, 2 months ago) by mlelstv
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.180: +2 -3 lines
Diff to previous 1.180 (colored)

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.175.2.2 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:28 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.175.2.1: +3 -3 lines
Diff to previous 1.175.2.1 (colored) to branchpoint 1.175 (colored) next main 1.176 (colored)

Sync with head.

Revision 1.180 / (download) - annotate - [select for diffs], Fri Jan 19 22:46:21 2007 UTC (17 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored)

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.166.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:49:38 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166.2.1: +14 -17 lines
Diff to previous 1.166.2.1 (colored)

sync with head.

Revision 1.175.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:17 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.175.4.1: +14 -13 lines
Diff to previous 1.175.4.1 (colored) to branchpoint 1.175 (colored) next main 1.176 (colored)

sync with head.

Revision 1.175.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:50 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.175: +6 -4 lines
Diff to previous 1.175 (colored)

Sync with head.

Revision 1.179 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:26 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.178: +12 -12 lines
Diff to previous 1.178 (colored)

__unused removal on arguments; approved by core.

Revision 1.178 / (download) - annotate - [select for diffs], Tue Oct 31 20:43:31 2006 UTC (17 years, 5 months ago) by joerg
Branch: MAIN
Changes since 1.177: +4 -3 lines
Diff to previous 1.177 (colored)

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.175.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:06:52 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.175: +14 -13 lines
Diff to previous 1.175 (colored)

sync with head

Revision 1.177 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:59 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.176: +12 -12 lines
Diff to previous 1.176 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.176 / (download) - annotate - [select for diffs], Sun Sep 24 03:54:00 2006 UTC (17 years, 6 months ago) by jmcneill
Branch: MAIN
Changes since 1.175: +4 -3 lines
Diff to previous 1.175 (colored)

Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@

Revision 1.169.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:55:33 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.169: +39 -21 lines
Diff to previous 1.169 (colored) next main 1.170 (colored)

sync with head

Revision 1.169.8.3 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:03 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.169.8.2: +10 -15 lines
Diff to previous 1.169.8.2 (colored) to branchpoint 1.169 (colored) next main 1.170 (colored)

sync with head.

Revision 1.175 / (download) - annotate - [select for diffs], Sun Sep 3 07:06:39 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.174: +10 -15 lines
Diff to previous 1.174 (colored)

use c99 initializers

Revision 1.157.4.1 / (download) - annotate - [select for diffs], Fri Aug 11 04:24:50 2006 UTC (17 years, 8 months ago) by riz
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE
Changes since 1.157: +28 -2 lines
Diff to previous 1.157 (colored) next main 1.158 (colored)

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

Revision 1.157.2.1 / (download) - annotate - [select for diffs], Fri Aug 11 04:22:21 2006 UTC (17 years, 8 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.157: +28 -2 lines
Diff to previous 1.157 (colored)

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

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:07:43 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.166: +207 -181 lines
Diff to previous 1.166 (colored)

sync with head.

Revision 1.169.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:37:41 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.169.6.1: +25 -5 lines
Diff to previous 1.169.6.1 (colored) to branchpoint 1.169 (colored) next main 1.170 (colored)

Sync with head.

Revision 1.169.12.2 / (download) - annotate - [select for diffs], Wed May 24 15:50:30 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.169.12.1: +28 -6 lines
Diff to previous 1.169.12.1 (colored) to branchpoint 1.169 (colored) next main 1.170 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.169.8.2 / (download) - annotate - [select for diffs], Wed May 24 10:58:24 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.169.8.1: +30 -8 lines
Diff to previous 1.169.8.1 (colored) to branchpoint 1.169 (colored)

sync with head.

Revision 1.174 / (download) - annotate - [select for diffs], Fri May 12 01:25:00 2006 UTC (17 years, 11 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.173: +25 -5 lines
Diff to previous 1.173 (colored)

make [OU]READ[124]() real inline functions instead of macros.

Revision 1.169.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:38 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.169: +8 -5 lines
Diff to previous 1.169 (colored)

Sync with head.

Revision 1.169.10.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:26:29 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.169: +8 -5 lines
Diff to previous 1.169 (colored) next main 1.170 (colored)

sync with head.

Revision 1.173 / (download) - annotate - [select for diffs], Sat Apr 15 01:07:51 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.172: +5 -7 lines
Diff to previous 1.172 (colored)

Revert previous panic change, I'll fix it differently.

Revision 1.172 / (download) - annotate - [select for diffs], Fri Apr 14 17:07:23 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.171: +8 -6 lines
Diff to previous 1.171 (colored)

Coverity CID 1115: It is quite pointless to have a DIAGNOSTIC panic that
checks a variable for being NULL, and if we are not in DIAGNOSTIC code, to
just dereference it causing a crash!

Revision 1.171 / (download) - annotate - [select for diffs], Fri Apr 14 17:04:06 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.170: +6 -4 lines
Diff to previous 1.170 (colored)

Coverity CID 1132: avoid NULL derefs.

Revision 1.169.8.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:29 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.169: +3 -2 lines
Diff to previous 1.169 (colored)

sync with head.

Revision 1.169.12.1 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:26 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.169: +3 -2 lines
Diff to previous 1.169 (colored)

Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Mar 30 19:08:31 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.169: +3 -2 lines
Diff to previous 1.169 (colored)

If dying, return after doing the software part [as noted in the comment
but not done]. Pointed out by Greg Troxel.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Dec 19 21:57:27 2005 UTC (18 years, 4 months ago) by tron
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.168: +6 -100 lines
Diff to previous 1.168 (colored)

Make OHCI work on Au1500 systems running in big-endian mode.
Patch contributed by Garrett D'Amore in PR port-evbmips/31912.

Revision 1.140.2.9 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:05 2005 UTC (18 years, 4 months ago) by christos
Branch: ktrace-lwp
Changes since 1.140.2.8: +258 -164 lines
Diff to previous 1.140.2.8 (colored) next main 1.141 (colored)

Sync with head.

Revision 1.167.6.1 / (download) - annotate - [select for diffs], Tue Nov 22 16:08:15 2005 UTC (18 years, 4 months ago) by yamt
Branch: yamt-readahead
Changes since 1.167: +258 -164 lines
Diff to previous 1.167 (colored) next main 1.168 (colored)

sync with head.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Nov 14 13:40:23 2005 UTC (18 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: yamt-readahead-base3, yamt-readahead-base2, ktrace-lwp-base
Changes since 1.167: +258 -164 lines
Diff to previous 1.167 (colored)

Make it possible to decide endianess dynamically.  From port-evbmips/31912
by "Garrett D'Amore" <garrett_damore@tadpole.com>.

Revision 1.140.2.8 / (download) - annotate - [select for diffs], Thu Nov 10 14:08:05 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.140.2.7: +66 -25 lines
Diff to previous 1.140.2.7 (colored)

Sync with HEAD. Here we go again...

Revision 1.167 / (download) - annotate - [select for diffs], Mon Jul 18 11:08:00 2005 UTC (18 years, 9 months ago) by augustss
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead
Changes since 1.166: +6 -3 lines
Diff to previous 1.166 (colored)

Make sure we don't enable host controller interrupts until all
initialization is finished.

Revision 1.166 / (download) - annotate - [select for diffs], Tue May 31 19:21:08 2005 UTC (18 years, 10 months ago) by drochner
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (colored)

cast-qual fallout

Revision 1.165 / (download) - annotate - [select for diffs], Sat May 28 07:44:37 2005 UTC (18 years, 10 months ago) by skrll
Branch: MAIN
Changes since 1.164: +7 -5 lines
Diff to previous 1.164 (colored)

Fix interrupt out transfers.

Reviewed by Lennart.

Revision 1.146.2.5.2.1 / (download) - annotate - [select for diffs], Fri May 13 17:08:55 2005 UTC (18 years, 11 months ago) by riz
Branch: 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
Changes since 1.146.2.5: +22 -4 lines
Diff to previous 1.146.2.5 (colored) next main 1.147 (colored)

Pull up revision 1.153 (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.164 / (download) - annotate - [select for diffs], Sun May 8 08:12:08 2005 UTC (18 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.163: +3 -3 lines
Diff to previous 1.163 (colored)

Only look at USBD_FORCE_SHORT_XFER for writes.

Revision 1.163 / (download) - annotate - [select for diffs], Sun May 1 01:14:30 2005 UTC (18 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.162: +4 -5 lines
Diff to previous 1.162 (colored)

In eohci_waitintr, xfer->timeout is in ms, not hz.

From OpenBSD.

Revision 1.162 / (download) - annotate - [select for diffs], Sun May 1 01:10:06 2005 UTC (18 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.161: +4 -4 lines
Diff to previous 1.161 (colored)

Fix some spelling errors.

From OpenBSD.

Revision 1.161 / (download) - annotate - [select for diffs], Sun May 1 01:03:11 2005 UTC (18 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.160: +15 -10 lines
Diff to previous 1.160 (colored)

Preserve any configuration data that may have been set by SMM/BIOS over
chip reset.

From OpenBSD.

Revision 1.160 / (download) - annotate - [select for diffs], Sun May 1 00:45:55 2005 UTC (18 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.159: +6 -2 lines
Diff to previous 1.159 (colored)

If the SMM driver had enabled ownership change interrupts, re-enable them
temporarily before we attempt to take control.

From OpenBSD.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Apr 30 14:38:40 2005 UTC (18 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.158: +28 -2 lines
Diff to previous 1.158 (colored)

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

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

Hopefully this will fix the occasional crashes when printing.

Revision 1.154.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:18 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.154: +50 -86 lines
Diff to previous 1.154 (colored) next main 1.155 (colored)

sync with -current

Revision 1.158 / (download) - annotate - [select for diffs], Sun Apr 17 14:46:49 2005 UTC (19 years ago) by toshii
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.157: +8 -6 lines
Diff to previous 1.157 (colored)

Correct status value check for OHCI isoc transfer;
the spec says that "not accessed" is 111x, not 1111.

Revision 1.140.2.7 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:33 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.140.2.6: +42 -80 lines
Diff to previous 1.140.2.6 (colored)

Sync with HEAD.

Revision 1.154.4.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:35:58 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.154: +44 -82 lines
Diff to previous 1.154 (colored) next main 1.155 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Mar 11 19:25:22 2005 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-1-RELEASE
Branch point for: netbsd-3-0, netbsd-3
Changes since 1.156: +42 -80 lines
Diff to previous 1.156 (colored)

Restructure interrupt handling a little:
* Only futz with the done list in the soft interrupt handler.  In the hard
  interrupt handler, do nothing except mask WDH and queue the soft interrupt.
  This simplifies a bunch of code, removes two O(n^2) queue manipulations,
  and gets rid of some really sketchy stuff around the queue head access.
* Use the auto-masking code at the end of the interrupt handler for both WDH
  and RHSC interrupts.  Again, this reduces the code a little, and avoids
  multiple writebacks to the chip registers.

Revision 1.140.2.6 / (download) - annotate - [select for diffs], Fri Mar 4 16:50:54 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.140.2.5: +5 -5 lines
Diff to previous 1.140.2.5 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.156 / (download) - annotate - [select for diffs], Wed Mar 2 11:37:27 2005 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.155: +3 -3 lines
Diff to previous 1.155 (colored)

Copyright maintenance.

Revision 1.155 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:51 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
Changes since 1.154: +4 -4 lines
Diff to previous 1.154 (colored)

nuke trailing whitespace

Revision 1.140.2.5 / (download) - annotate - [select for diffs], Mon Jan 17 19:31:53 2005 UTC (19 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.140.2.4: +26 -4 lines
Diff to previous 1.140.2.4 (colored)

Sync with HEAD.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Dec 22 19:36:13 2004 UTC (19 years, 3 months ago) by joff
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.153: +6 -2 lines
Diff to previous 1.153 (colored)

Make sure to ack the interrupt even if we are ignoring it.  Otherwise, we will
keep coming back.

Revision 1.153 / (download) - annotate - [select for diffs], Tue Dec 21 16:41:24 2004 UTC (19 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.152: +22 -4 lines
Diff to previous 1.152 (colored)

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.140.2.4 / (download) - annotate - [select for diffs], Tue Nov 2 07:53:03 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.140.2.3: +5 -2 lines
Diff to previous 1.140.2.3 (colored)

Sync with HEAD.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Oct 26 20:46:16 2004 UTC (19 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.151: +5 -2 lines
Diff to previous 1.151 (colored)

Allow strings descriptor 0 to be fetched.  It's the default language index.

Revision 1.140.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:33:43 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.140.2.2: +2 -2 lines
Diff to previous 1.140.2.2 (colored)

Fix the sync with head I botched.

Revision 1.140.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:51:46 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.140.2.1: +0 -0 lines
Diff to previous 1.140.2.1 (colored)

Sync with HEAD.

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:51:33 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.140: +28 -34 lines
Diff to previous 1.140 (colored)

Sync with HEAD

Revision 1.146.2.5 / (download) - annotate - [select for diffs], Fri Jul 23 15:44:53 2004 UTC (19 years, 8 months ago) by tron
Branch: 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
Changes since 1.146.2.4: +1 -10 lines
Diff to previous 1.146.2.4 (colored) to branchpoint 1.146 (colored) next main 1.147 (colored)

Pull up revision 1.151 (requested by mycroft in ticket #688):
Avoid touching the xfer after calling usb_transfer_complete(), as the
driver callback may have recycled it.  From PR 25960.

Revision 1.151 / (download) - annotate - [select for diffs], Sat Jul 17 20:24:15 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.150: +3 -12 lines
Diff to previous 1.150 (colored)

Avoid touching the xfer after calling usb_transfer_complete(), as the
driver callback may have recycled it.  From PR 25960.

Revision 1.146.2.4 / (download) - annotate - [select for diffs], Sat Jul 10 13:43:46 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
Changes since 1.146.2.3: +4 -4 lines
Diff to previous 1.146.2.3 (colored) to branchpoint 1.146 (colored)

Pull up revision 1.150 (requested by mycroft in ticket #631):
Fix an error in a printf() format.
Swap the order that two items are written; possibly fixes a race condition
that would affect isoc transfers.

Revision 1.150 / (download) - annotate - [select for diffs], Tue Jul 6 04:53:09 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.149: +4 -4 lines
Diff to previous 1.149 (colored)

Fix an error in a printf() format.
Swap the order that two items are written; possibly fixes a race condition
that would affect isoc transfers.

Revision 1.146.2.3 / (download) - annotate - [select for diffs], Fri Jul 2 17:13:21 2004 UTC (19 years, 9 months ago) by he
Branch: netbsd-2-0
Changes since 1.146.2.2: +3 -3 lines
Diff to previous 1.146.2.2 (colored) to branchpoint 1.146 (colored)

Pull up revision 1.149 (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.149 / (download) - annotate - [select for diffs], Tue Jun 29 03:56:04 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

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.146.2.2 / (download) - annotate - [select for diffs], Thu Jun 24 08:37:09 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
Changes since 1.146.2.1: +4 -3 lines
Diff to previous 1.146.2.1 (colored) to branchpoint 1.146 (colored)

Pull up revision 1.148 (requested by mycroft in ticket #535):
Adjust a couple of comments to make it clear WTF is going on.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Thu Jun 24 08:18:42 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

Pull up revision 1.147 (requested by mycroft in ticket #535):
Failure to properly mask off UE_DIR_IN from the endpoint address was causing
OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather
interesting lossage.
Suddenly I get MUCH better performance with ehci...

Revision 1.148 / (download) - annotate - [select for diffs], Tue Jun 22 18:27:46 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.147: +4 -3 lines
Diff to previous 1.147 (colored)

Adjust a couple of comments to make it clear WTF is going on.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Jun 22 07:20:35 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

Failure to properly mask off UE_DIR_IN from the endpoint address was causing
OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather
interesting lossage.

Suddenly I get MUCH better performance with ehci...

Revision 1.123.2.3 / (download) - annotate - [select for diffs], Mon Mar 15 04:37:19 2004 UTC (20 years, 1 month ago) by jmc
Branch: netbsd-1-6
Changes since 1.123.2.2: +3 -3 lines
Diff to previous 1.123.2.2 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

Pullup rev 1.146 (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.146 / (download) - annotate - [select for diffs], Mon Dec 29 08:17:10 2003 UTC (20 years, 3 months ago) by toshii
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

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

Revision 1.145 / (download) - annotate - [select for diffs], Sun Nov 23 19:20:25 2003 UTC (20 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.144: +7 -4 lines
Diff to previous 1.144 (colored)

Try harder to avoid 0 ports woth AMD756.  From OpenBSD.

Revision 1.144 / (download) - annotate - [select for diffs], Sun Nov 23 19:18:06 2003 UTC (20 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.143: +4 -4 lines
Diff to previous 1.143 (colored)

Fix swapped lines in cleanup in ohci_init().  From OpenBSD.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Oct 18 04:50:35 2003 UTC (20 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.142: +2 -5 lines
Diff to previous 1.142 (colored)

Remove assigned-to but otherwise unused variables.
Remove unreachable break after return statements.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Oct 11 03:04:26 2003 UTC (20 years, 6 months ago) by toshii
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored)

Fix a done list handling bug which exhibits under high shared interrupt
rate and bus traffic.  As the interrupt register is read after checking
hcca_done_head, there was a small chance of dropping a done list.
Ignore OHCI_WDH interrupt bit if hcca_done_head is zero so that OHCI_WDH
is processed later.

Revision 1.123.2.2 / (download) - annotate - [select for diffs], Fri Oct 10 17:58:41 2003 UTC (20 years, 6 months ago) by tron
Branch: 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
Changes since 1.123.2.1: +10 -8 lines
Diff to previous 1.123.2.1 (colored) to branchpoint 1.123 (colored)

Pull up revision 1.141 (requested by bad in ticket #1515):
Update actlen even in the case where a TD returns an error -- this is critical
for the umass bulk-only STALL case.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Sep 10 20:08:29 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.140: +12 -10 lines
Diff to previous 1.140 (colored)

Update actlen even in the case where a TD returns an error -- this is critical
for the umass bulk-only STALL case.

Revision 1.140 / (download) - annotate - [select for diffs], Tue May 13 04:42:00 2003 UTC (20 years, 11 months ago) by gson
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.139: +6 -6 lines
Diff to previous 1.139 (colored)

Function names printed in debug messages did not always match the
actual name of the function.

Revision 1.139 / (download) - annotate - [select for diffs], Sat Feb 22 05:24:16 2003 UTC (21 years, 1 month ago) by tsutsui
Branch: MAIN
Changes since 1.138: +4 -4 lines
Diff to previous 1.138 (colored)

Use mstohz() in <sys/param.h> rather than homegrown MS_TO_TICKS().

Revision 1.138 / (download) - annotate - [select for diffs], Sat Feb 8 03:32:50 2003 UTC (21 years, 2 months ago) by ichiro
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

change URL pointers of USB[1,2] specification

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Mon Jan 27 06:00:12 2003 UTC (21 years, 2 months ago) by jmc
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.123: +71 -42 lines
Diff to previous 1.123 (colored)

Pullup lots of revisions: 1.123-1.124,1.126-1.127,1.128-1.131,1.132-1.135
(requested by bad in ticket #1104)

        Clear done_head in the HCCA *before* acknowledging the interrupt.
        Driver lost some completed transfers under heavy loads.
        Fix some braindead calls to free memory (only encountered under low
          memory conditions).
        Add some spl calls to protect critical regions. From PR#18440
        Remove extra call to ohci_rem_ed().  From PR#18448
        Put some ifdefs around USB_USE_SOFTINTR stuff.
        Fix several nits:
        - Call usbd_transfer_complete at splusb.
        - Fix a botched for loop in ohci_rem_ed.
        - In ohci_close_pipe, wait 1ms after removing an ED to avoid possible
          race condition.
        Update xfer->frlengths for input isoc transfer.
        Also fix error handling for isoc transfer somewhat;
          usb_transfer_complete shouldn't be called for more than once.
        Add a couple of le32toh which were missing in the previous.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Jan 20 07:12:13 2003 UTC (21 years, 3 months ago) by simonb
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored)

Grrr.  So much for my ability to use grep(1) effectively.  Pointed out
by Stephen Degler in private mail.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Jan 20 05:30:09 2003 UTC (21 years, 3 months ago) by simonb
Branch: MAIN
Changes since 1.135: +3 -3 lines
Diff to previous 1.135 (colored)

The Double-Semi-Colon Police.

Revision 1.101.2.13 / (download) - annotate - [select for diffs], Wed Dec 11 06:38:49 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.101.2.12: +56 -29 lines
Diff to previous 1.101.2.12 (colored) next main 1.102 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Tue Dec 10 14:07:37 2002 UTC (21 years, 4 months ago) by toshii
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.134: +6 -6 lines
Diff to previous 1.134 (colored)

Add a couple of le32toh which were missing in the previous.
Pointed out by SOMEYA Yoshihiko.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Dec 7 07:33:20 2002 UTC (21 years, 4 months ago) by toshii
Branch: MAIN
Changes since 1.133: +50 -29 lines
Diff to previous 1.133 (colored)

Update xfer->frlengths for input isoc transfer.  Based on patches from
SOMEYA Yoshihiko.
Also fix error handling for isoc transfer somewhat; usb_transfer_complete
shouldn't be called for more than once.

Revision 1.133 / (download) - annotate - [select for diffs], Sat Dec 7 07:14:28 2002 UTC (21 years, 4 months ago) by toshii
Branch: MAIN
Changes since 1.132: +9 -3 lines
Diff to previous 1.132 (colored)

Fix several nits.  Mostly from SOMEYA Yoshihiko.
- Call usbd_transfer_complete at splusb.
- Fix a botched for loop in ohci_rem_ed.
- In ohci_close_pipe, wait 1ms after removing an ED to avoid possible race
 condition.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Dec 7 06:52:11 2002 UTC (21 years, 4 months ago) by toshii
Branch: MAIN
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Remove junk at the end of a DPRINTF.  From SOMEYA Yoshihiko.

Revision 1.101.2.12 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:29 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.11: +19 -13 lines
Diff to previous 1.101.2.11 (colored)

Catch up to -current.

Revision 1.102.2.6 / (download) - annotate - [select for diffs], Thu Oct 10 18:42:34 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.102.2.5: +21 -15 lines
Diff to previous 1.102.2.5 (colored) to branchpoint 1.102 (colored) next main 1.103 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.131 / (download) - annotate - [select for diffs], Mon Sep 30 16:36:19 2002 UTC (21 years, 6 months ago) by augustss
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.130: +8 -2 lines
Diff to previous 1.130 (colored)

Put some ifdefs around USB_USE_SOFTINTR stuff.  From FreeBSD.

Revision 1.130 / (download) - annotate - [select for diffs], Sun Sep 29 20:59:30 2002 UTC (21 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.129: +2 -7 lines
Diff to previous 1.129 (colored)

Remove extra call to ohci_rem_ed().  From kern/18448, Takeshi Nakayama.

Revision 1.129 / (download) - annotate - [select for diffs], Sun Sep 29 20:58:25 2002 UTC (21 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.128: +7 -2 lines
Diff to previous 1.128 (colored)

Add some spl calls to protect critical regions. From kern/18440,
Takeshi Nakayama.

Revision 1.128 / (download) - annotate - [select for diffs], Fri Sep 27 15:37:35 2002 UTC (21 years, 6 months ago) by provos
Branch: MAIN
Changes since 1.127: +10 -10 lines
Diff to previous 1.127 (colored)

remove trailing \n in panic().  approved perry.

Revision 1.102.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:46:45 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.102.2.4: +4 -8 lines
Diff to previous 1.102.2.4 (colored) to branchpoint 1.102 (colored)

sync kqueue branch with HEAD

Revision 1.122.4.3 / (download) - annotate - [select for diffs], Thu Aug 29 05:22:58 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.122.4.2: +4 -8 lines
Diff to previous 1.122.4.2 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

catch up with -current.

Revision 1.101.2.11 / (download) - annotate - [select for diffs], Tue Aug 13 02:19:59 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.10: +4 -8 lines
Diff to previous 1.101.2.10 (colored)

Catch up to -current.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Aug 7 20:03:19 2002 UTC (21 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.126: +4 -8 lines
Diff to previous 1.126 (colored)

Fix some braindead calls to free memory (only encountered under low memory
conditions).  From OpenBSD.

Revision 1.101.2.10 / (download) - annotate - [select for diffs], Wed Jul 10 17:30:26 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.9: +3 -3 lines
Diff to previous 1.101.2.9 (colored)

Don't need curlwp here.

Revision 1.101.2.9 / (download) - annotate - [select for diffs], Mon Jun 24 22:10:25 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.8: +3 -3 lines
Diff to previous 1.101.2.8 (colored)

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.102.2.4 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:04 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.102.2.3: +23 -23 lines
Diff to previous 1.102.2.3 (colored) to branchpoint 1.102 (colored)

catch up with -current on kqueue branch

Revision 1.122.4.2 / (download) - annotate - [select for diffs], Thu Jun 20 16:34:10 2002 UTC (21 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.122.4.1: +3 -3 lines
Diff to previous 1.122.4.1 (colored) to branchpoint 1.122 (colored)

catch up with -current.

Revision 1.101.2.8 / (download) - annotate - [select for diffs], Thu Jun 20 03:46:51 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.7: +21 -21 lines
Diff to previous 1.101.2.7 (colored)

Catch up to -current.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Jun 1 23:51:03 2002 UTC (21 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored)

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.122.4.1 / (download) - annotate - [select for diffs], Thu May 30 14:47:30 2002 UTC (21 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.122: +20 -20 lines
Diff to previous 1.122 (colored)

Catch up with -current.

Revision 1.125 / (download) - annotate - [select for diffs], Tue May 28 12:42:38 2002 UTC (21 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.124: +12 -12 lines
Diff to previous 1.124 (colored)

Change DMAADDR macro slightly.

Revision 1.124 / (download) - annotate - [select for diffs], Sun May 26 03:10:02 2002 UTC (21 years, 10 months ago) by minoura
Branch: MAIN
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored)

Clear done_head in the HCCA *before* acknoledging the interrupt.
Driver lost some completed transfers under heavy loads.

Revision 1.123 / (download) - annotate - [select for diffs], Sun May 19 06:24:31 2002 UTC (21 years, 11 months ago) by augustss
Branch: 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
Changes since 1.122: +9 -9 lines
Diff to previous 1.122 (colored)

Update dma memory access API a little.

Revision 1.101.2.7 / (download) - annotate - [select for diffs], Mon Apr 1 07:47:31 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.6: +5 -5 lines
Diff to previous 1.101.2.6 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.122 / (download) - annotate - [select for diffs], Sun Mar 17 18:02:52 2002 UTC (22 years, 1 month ago) by augustss
Branch: MAIN
CVS Tags: eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

Whitespace fixes.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Mar 16 16:11:18 2002 UTC (22 years, 1 month ago) by tsutsui
Branch: MAIN
Changes since 1.120: +4 -4 lines
Diff to previous 1.120 (colored)

Fix a couple of typo:
- s/ehci/ohci/ (in unused arg of macro)
- s/uhci/ohci/ (in debug message)

Revision 1.101.2.6 / (download) - annotate - [select for diffs], Thu Feb 28 04:14:28 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.5: +66 -69 lines
Diff to previous 1.101.2.5 (colored)

Catch up to -current.

Revision 1.102.2.3 / (download) - annotate - [select for diffs], Mon Feb 11 20:10:15 2002 UTC (22 years, 2 months ago) by jdolecek
Branch: kqueue
Changes since 1.102.2.2: +66 -69 lines
Diff to previous 1.102.2.2 (colored) to branchpoint 1.102 (colored)

Sync w/ -current.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Feb 3 18:15:20 2002 UTC (22 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base
Changes since 1.119: +66 -69 lines
Diff to previous 1.119 (colored)

Some white space fixes from FreeBSD.

Revision 1.102.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 19:58:52 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.102.2.1: +229 -99 lines
Diff to previous 1.102.2.1 (colored) to branchpoint 1.102 (colored)

Sync kqueue branch with -current.

Revision 1.101.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:05 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.4: +103 -26 lines
Diff to previous 1.101.2.4 (colored)

Catch up to -current.

Revision 1.119 / (download) - annotate - [select for diffs], Mon Dec 31 12:20:35 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.118: +14 -7 lines
Diff to previous 1.118 (colored)

Change xfer abort to wait for the softintr to run.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Dec 27 18:48:28 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.117: +24 -5 lines
Diff to previous 1.117 (colored)

Add some DIAGNOSTIC stuf that I forgot.  From Nate Williams.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Dec 27 11:27:11 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.116: +5 -3 lines
Diff to previous 1.116 (colored)

Update a comment.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Nov 21 08:18:40 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.115: +30 -3 lines
Diff to previous 1.115 (colored)

Pay more attention to if the HC is being unplugged.

Revision 1.115 / (download) - annotate - [select for diffs], Wed Nov 21 05:52:50 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored)

make it compilable without OHCI_DEBUG

Revision 1.114 / (download) - annotate - [select for diffs], Wed Nov 21 02:41:18 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.113: +18 -7 lines
Diff to previous 1.113 (colored)

Use a task to perform the timeout abort so we have a process context when
sleeping.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Nov 21 02:39:31 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.112: +10 -4 lines
Diff to previous 1.112 (colored)

Some more debug stuff.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Nov 21 02:38:35 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.111: +5 -5 lines
Diff to previous 1.111 (colored)

Cast some args to bitmask_snprintf().

Revision 1.111 / (download) - annotate - [select for diffs], Tue Nov 20 21:12:46 2001 UTC (22 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.110: +5 -2 lines
Diff to previous 1.110 (colored)

Don't bother with interrupts when being disconnected.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Nov 20 16:08:10 2001 UTC (22 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.109: +5 -4 lines
Diff to previous 1.109 (colored)

Use longer reset for root hubs (as told in the spec).

Revision 1.109 / (download) - annotate - [select for diffs], Tue Nov 20 13:48:32 2001 UTC (22 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.108: +6 -5 lines
Diff to previous 1.108 (colored)

Keep track of device speed for USB 2.0.

Revision 1.101.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:15 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.3: +120 -82 lines
Diff to previous 1.101.2.3 (colored)

Catch up to -current.

Revision 1.108 / (download) - annotate - [select for diffs], Tue Nov 13 06:24:54 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.107: +4 -1 lines
Diff to previous 1.107 (colored)

add RCSIDs

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:29 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.104: +117 -82 lines
Diff to previous 1.104 (colored) next main 1.105 (colored)

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

Revision 1.107 / (download) - annotate - [select for diffs], Sat Nov 10 17:09:28 2001 UTC (22 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.106: +31 -26 lines
Diff to previous 1.106 (colored)

Improve dump routines.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Nov 9 15:01:57 2001 UTC (22 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.105: +73 -57 lines
Diff to previous 1.105 (colored)

Fix a bug in xfer abort processing when the HC executes ahead of what
the driver aborts.
Don't block RHSC interrupts.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Nov 7 02:55:04 2001 UTC (22 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.104: +17 -3 lines
Diff to previous 1.104 (colored)

Improve some debug messages.

Revision 1.101.2.3 / (download) - annotate - [select for diffs], Mon Oct 8 20:11:34 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.2: +16 -1 lines
Diff to previous 1.101.2.2 (colored)

Catch up to -current.

Revision 1.102.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:46:29 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.102: +19 -1 lines
Diff to previous 1.102 (colored) next main 1.103 (colored)

Catch up with -current.

Revision 1.104 / (download) - annotate - [select for diffs], Fri Sep 28 23:57:21 2001 UTC (22 years, 6 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.103: +16 -1 lines
Diff to previous 1.103 (colored)

Reenable RHSC interrupt after one second so hot plugging works.
(From OpenBSD.)

Revision 1.101.2.2 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:18 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.101.2.1: +4 -1 lines
Diff to previous 1.101.2.1 (colored)

Catch up to -current.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:12 2001 UTC (22 years, 7 months ago) by thorpej
Branch: kqueue
Changes since 1.102: +4 -1 lines
Diff to previous 1.102 (colored)

Update the kqueue branch to HEAD.

Revision 1.103 / (download) - annotate - [select for diffs], Tue Sep 11 07:00:19 2001 UTC (22 years, 7 months ago) by augustss
Branch: MAIN
CVS Tags: pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.102: +4 -1 lines
Diff to previous 1.102 (colored)

Don't go top mode OPERATIONAL (before reset) on startup even if BIOS claims to
have initialized the controller.

Revision 1.52.2.7 / (download) - annotate - [select for diffs], Sat Apr 21 17:49:55 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.6: +3 -1 lines
Diff to previous 1.52.2.6 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored)

Sync with HEAD

Revision 1.101.2.1 / (download) - annotate - [select for diffs], Mon Apr 9 01:57:31 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.101: +3 -1 lines
Diff to previous 1.101 (colored)

Catch up with -current.

Revision 1.102 / (download) - annotate - [select for diffs], Sun Apr 1 15:00:29 2001 UTC (23 years ago) by augustss
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base
Branch point for: thorpej-devvp, kqueue
Changes since 1.101: +3 -1 lines
Diff to previous 1.101 (colored)

Add two missing splx() (inside DIAGNOSTIC).  From OpenBSD.

Revision 1.52.2.6 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:27 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.5: +25 -5 lines
Diff to previous 1.52.2.5 (colored) to branchpoint 1.52 (colored)

Sync with HEAD.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Feb 20 15:20:32 2001 UTC (23 years, 1 month ago) by minoura
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.100: +25 -5 lines
Diff to previous 1.100 (colored)

Re-initialize some registers after resuming from suspend.
Some APM BIOSes do not restore them.
Reviewd by augustss.

Revision 1.52.2.5 / (download) - annotate - [select for diffs], Sun Feb 11 19:16:23 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.4: +11 -6 lines
Diff to previous 1.52.2.4 (colored) to branchpoint 1.52 (colored)

Sync with HEAD.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Jan 28 16:18:09 2001 UTC (23 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.99: +7 -2 lines
Diff to previous 1.99 (colored)

Put a rate limiter on the scheduling overrun message.

Revision 1.99 / (download) - annotate - [select for diffs], Sun Jan 21 02:39:52 2001 UTC (23 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.98: +4 -4 lines
Diff to previous 1.98 (colored)

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

Revision 1.98 / (download) - annotate - [select for diffs], Sat Jan 20 23:36:03 2001 UTC (23 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

Change some splusb() to splhardusb().

Revision 1.52.2.4 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:29 2001 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.3: +18 -4 lines
Diff to previous 1.52.2.3 (colored) to branchpoint 1.52 (colored)

Sync with HEAD

Revision 1.97 / (download) - annotate - [select for diffs], Sun Dec 31 14:29:54 2000 UTC (23 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.96: +17 -3 lines
Diff to previous 1.96 (colored)

Make the controller survive suspend/resume.  Thanks to Steve Woodford
<steve@mctavish.co.uk> for testing.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Dec 29 01:24:55 2000 UTC (23 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

Update many URLs.

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:14 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.2: +18 -2 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.95 / (download) - annotate - [select for diffs], Wed Dec 13 03:09:06 2000 UTC (23 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.94: +19 -3 lines
Diff to previous 1.94 (colored)

Make the ohci driver not hang suspend/resume.  It still doesn't resume
correctly.  From itohy@netbsd.org (ITOH Yasufumi) PR kern/11714.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:03 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.1: +2 -1 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored)

Sync with HEAD.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 11:43:20 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52: +1413 -716 lines
Diff to previous 1.52 (colored)

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

Revision 1.94 / (download) - annotate - [select for diffs], Fri Nov 10 14:11:49 2000 UTC (23 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.93: +2 -1 lines
Diff to previous 1.93 (colored)

Update frlengths after a isoc transfer.
Suggested by Yuri <yuri@tsoft.com>

Revision 1.93 / (download) - annotate - [select for diffs], Thu Aug 17 23:18:56 2000 UTC (23 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Add an XXX comment.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Aug 8 19:51:46 2000 UTC (23 years, 8 months ago) by tv
Branch: MAIN
Changes since 1.91: +24 -13 lines
Diff to previous 1.91 (colored)

%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.90.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:08:31 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.90: +178 -299 lines
Diff to previous 1.90 (colored) next main 1.91 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.91 / (download) - annotate - [select for diffs], Thu Jun 1 14:28:58 2000 UTC (23 years, 10 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Changes since 1.90: +178 -299 lines
Diff to previous 1.90 (colored)

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

Revision 1.90 / (download) - annotate - [select for diffs], Mon May 8 18:28:46 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.89: +8 -3 lines
Diff to previous 1.89 (colored)

Quiet some uninitialized variable warnings that do in fact look legitimate.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Apr 27 15:26:46 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

Change my email address.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Apr 25 14:28:13 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.87: +12 -4 lines
Diff to previous 1.87 (colored)

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.87 / (download) - annotate - [select for diffs], Sat Apr 22 22:50:44 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.86: +2 -1 lines
Diff to previous 1.86 (colored)

Add a clarifying comment.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Apr 21 15:38:55 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.85: +2 -1 lines
Diff to previous 1.85 (colored)

Add a comment about a non-obvious use of a #define.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Apr 1 09:27:35 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.84: +7 -2 lines
Diff to previous 1.84 (colored)

Add a delay before reading the number of ports from the controller to
avoid getting 0 from it.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Mar 29 18:24:53 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Some OpenBSD portability fixes.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Mar 29 01:46:26 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.82: +414 -75 lines
Diff to previous 1.82 (colored)

A first stab at support for isochronous transfers.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Mar 27 12:33:54 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.81: +116 -116 lines
Diff to previous 1.81 (colored)

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.81 / (download) - annotate - [select for diffs], Sat Mar 25 18:02:32 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.80: +8 -7 lines
Diff to previous 1.80 (colored)

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

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

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

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

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

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

Revision 1.78 / (download) - annotate - [select for diffs], Mon Mar 20 00:37:00 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.77: +7 -1 lines
Diff to previous 1.77 (colored)

Make sure all packets (except the last) have the maximum packet size even
when using multiple TDs.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Mar 19 22:24:57 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.76: +42 -47 lines
Diff to previous 1.76 (colored)

Make control transfer of over 8K possible by using a chain of TDs.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Mar 16 12:40:51 2000 UTC (24 years, 1 month ago) by tsutsui
Branch: MAIN
Changes since 1.75: +116 -105 lines
Diff to previous 1.75 (colored)

Replace LE() macro with le32toh()/le32toh().

Revision 1.75 / (download) - annotate - [select for diffs], Thu Mar 16 00:41:50 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.74: +22 -14 lines
Diff to previous 1.74 (colored)

Fix thinko in the handling of FORCE_SHORT_XFER so that it actually
transfers a 0 length package instead on munging the whole transfer.
The aue driver works now.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Feb 29 21:37:00 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.73: +5 -5 lines
Diff to previous 1.73 (colored)

Distinguish between device and interface classes.
(I finally found a document that said that they were different.)

Revision 1.73 / (download) - annotate - [select for diffs], Tue Feb 22 22:59:49 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.72: +20 -7 lines
Diff to previous 1.72 (colored)

Fix typos in my last commit that caused the driver to panic.
Change some (unrelated) debug messages.

Revision 1.72 / (download) - annotate - [select for diffs], Tue Feb 22 11:30:54 2000 UTC (24 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.71: +32 -9 lines
Diff to previous 1.71 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Tue Feb 1 05:42:52 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.70: +13 -2 lines
Diff to previous 1.70 (colored)

Put some #ifdefs around power and shutdown hooks.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jan 31 22:35:13 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.69: +7 -7 lines
Diff to previous 1.69 (colored)

Rename TAILMASK to HEADMASK, since it really masks the head pointer.
From FreeBSD.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Jan 31 22:09:13 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.68: +18 -14 lines
Diff to previous 1.68 (colored)

Change where the has table for physical-to-virtual address translation
is handled.  Partly from FreeBSD.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Jan 31 20:17:25 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.67: +8 -3 lines
Diff to previous 1.67 (colored)

Fiddle with over-current protect when turning on port power to make
things work for some OHCI controllers.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Jan 28 13:32:55 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.66: +4 -1 lines
Diff to previous 1.66 (colored)

Correct error message list.  From Nick Hibma.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jan 28 10:19:48 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Fix typo.  From Nick Hibma.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jan 25 12:06:21 2000 UTC (24 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.64: +10 -2 lines
Diff to previous 1.64 (colored)

Add done method for root control transfers.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jan 19 00:23:58 2000 UTC (24 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.63: +6 -2 lines
Diff to previous 1.63 (colored)

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

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jan 18 20:23:42 2000 UTC (24 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.62: +3 -1 lines
Diff to previous 1.62 (colored)

Move the zeroing of the xfer to the individual methods.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Jan 18 20:11:00 2000 UTC (24 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.61: +33 -1 lines
Diff to previous 1.61 (colored)

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

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jan 16 13:12:06 2000 UTC (24 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.60: +106 -17 lines
Diff to previous 1.60 (colored)

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.60 / (download) - annotate - [select for diffs], Sun Jan 16 10:35:24 2000 UTC (24 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.59: +198 -36 lines
Diff to previous 1.59 (colored)

Add framework for doing isoc transfers.  The actual scheduling code
is still missing.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jan 16 10:27:51 2000 UTC (24 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.58: +26 -3 lines
Diff to previous 1.58 (colored)

Add shutdown hooks to ensure that the host controller is halted when
a reboot occurs.

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:40 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.49: +515 -448 lines
Diff to previous 1.49 (colored) next main 1.50 (colored)

Pull up to last week's -current.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Dec 6 21:06:59 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Cosmetics and a couple of diagnostic messages.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Dec 1 23:19:11 1999 UTC (24 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.56: +6 -2 lines
Diff to previous 1.56 (colored)

Some more DIAGNOSTIC.

Revision 1.27.6.1 / (download) - annotate - [select for diffs], Tue Nov 30 13:34:35 1999 UTC (24 years, 4 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.27: +17 -10 lines
Diff to previous 1.27 (colored) next main 1.28 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Nov 20 00:57:09 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.55: +4 -2 lines
Diff to previous 1.55 (colored)

Propagate the USB revision number to the usb driver.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Nov 18 23:32:26 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.54: +63 -52 lines
Diff to previous 1.54 (colored)

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

Revision 1.54 / (download) - annotate - [select for diffs], Wed Nov 17 23:00:49 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.53: +15 -15 lines
Diff to previous 1.53 (colored)

A few more purely stylistic changes that I missed in the last round.

Revision 1.52.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:41:31 1999 UTC (24 years, 5 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.52: +403 -373 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

Sync with -current

Revision 1.53 / (download) - annotate - [select for diffs], Fri Nov 12 00:34:57 1999 UTC (24 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: fvdl-softdep-base
Changes since 1.52: +403 -373 lines
Diff to previous 1.52 (colored)

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

Revision 1.52 / (download) - annotate - [select for diffs], Wed Oct 13 08:10:55 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.51: +42 -26 lines
Diff to previous 1.51 (colored)

Merge in a large batch of changes from Nick Hibma <hibma@skylink.it> so
the USB stack compiles on FreeBSD again.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Oct 12 20:02:47 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.50: +7 -2 lines
Diff to previous 1.50 (colored)

Fix some bugs in USB controller detach code.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Oct 12 11:21:25 1999 UTC (24 years, 6 months ago) by augustss
Branch: MAIN
Changes since 1.49: +3 -4 lines
Diff to previous 1.49 (colored)

Deallocate resources (bus space and interrupts) when detaching from
the bus.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Sep 18 11:25:50 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.48: +4 -2 lines
Diff to previous 1.48 (colored)

Make sure the HC deactivation is propagated.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Sep 15 21:14:03 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.47: +173 -85 lines
Diff to previous 1.47 (colored)

Handle the case when a USB transfer is so long that it crosses two page
(4K) boundaries.  OHCI cannot do that with a single TD so we make a chain.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Sep 15 10:25:31 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.46: +41 -2 lines
Diff to previous 1.46 (colored)

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

Revision 1.46 / (download) - annotate - [select for diffs], Mon Sep 13 21:33:25 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.45: +33 -12 lines
Diff to previous 1.45 (colored)

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

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

Make sure timeouts count as interrupt context too.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Sep 13 19:18:17 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.43: +16 -12 lines
Diff to previous 1.43 (colored)

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

Revision 1.43 / (download) - annotate - [select for diffs], Sat Sep 11 08:19:26 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.42: +42 -120 lines
Diff to previous 1.42 (colored)

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

Revision 1.42 / (download) - annotate - [select for diffs], Thu Sep 9 12:26:44 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.41: +49 -18 lines
Diff to previous 1.41 (colored)

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

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

Revision 1.41 / (download) - annotate - [select for diffs], Sun Sep 5 21:22:38 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.40: +66 -66 lines
Diff to previous 1.40 (colored)

Change some printf to DPRINTF for consistency.  From Nick Hibma, FreeBSD.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Sep 4 22:26:11 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.39: +7 -6 lines
Diff to previous 1.39 (colored)

Change the way the direction is extracted from the endpoint descriptor.
No functional changes to the drivers.  From Nick Hibma, FreeBSD.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Aug 22 23:41:00 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.38: +102 -116 lines
Diff to previous 1.38 (colored)

Merge the soft_{td,ed} with the real {td,ed}.  This saves time and space.
(And fix typo in corresponding uhci change.)

Revision 1.38 / (download) - annotate - [select for diffs], Sun Aug 22 20:12:39 1999 UTC (24 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.37: +96 -127 lines
Diff to previous 1.37 (colored)

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

Revision 1.37 / (download) - annotate - [select for diffs], Tue Aug 17 20:59:04 1999 UTC (24 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.36: +25 -4 lines
Diff to previous 1.36 (colored)

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

Revision 1.36 / (download) - annotate - [select for diffs], Tue Aug 17 16:06:21 1999 UTC (24 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.35: +15 -9 lines
Diff to previous 1.35 (colored)

Make some small changes to make it compile on OpenBSD.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Aug 16 20:24:33 1999 UTC (24 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.34: +11 -2 lines
Diff to previous 1.34 (colored)

Change the way transfers are dequeued so thet we know that they
are removed from the queue before being deallocated.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Aug 14 08:56:09 1999 UTC (24 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.33: +220 -97 lines
Diff to previous 1.33 (colored)

Implement timeout and abort of requests.
Compute length of short transfers correctly.

Revision 1.27.4.2 / (download) - annotate - [select for diffs], Thu Jul 1 23:40:21 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.27.4.1: +27 -9 lines
Diff to previous 1.27.4.1 (colored) to branchpoint 1.27 (colored) next main 1.28 (colored)

Sync w/ -current.

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

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

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Fri Jun 25 20:45:09 1999 UTC (24 years, 9 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Changes since 1.27: +17 -10 lines
Diff to previous 1.27 (colored) next main 1.28 (colored)

pullup 1.27->1.32 (augustss)

Revision 1.27.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:19:26 1999 UTC (24 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.27: +17 -10 lines
Diff to previous 1.27 (colored)

Sync w/ -current.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 9 22:57:16 1999 UTC (24 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.31: +11 -5 lines
Diff to previous 1.31 (colored)

Fix a bug in bulk input.  Discovered by Joel Chen <jchen@liberate.com>.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jun 9 19:40:54 1999 UTC (24 years, 10 months ago) by wrstuden
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Fix use of & when % was appropriate.

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 21 10:15:23 1999 UTC (24 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Update documentation URLs.

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 20 09:52:35 1999 UTC (24 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Keep track of vendor id and make sure the vendor string is NUL terminated.

Revision 1.28 / (download) - annotate - [select for diffs], Sun May 9 22:48:35 1999 UTC (24 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored)

Fix a serious bug in bandwidth accounting that thrashed memory.
Thanks to Joel Chen <jchen@nc.com> for tracking it down.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jan 13 10:33:53 1999 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.26: +7 -6 lines
Diff to previous 1.26 (colored)

Back out previous fix and apply the patch from Nick Hibma the right way.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jan 13 10:08:59 1999 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.25: +6 -4 lines
Diff to previous 1.25 (colored)

Fixes from Nick Hibma.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jan 10 18:42:10 1999 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.24: +7 -8 lines
Diff to previous 1.24 (colored)

Some patches from FreeBSD.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jan 10 16:38:54 1999 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

Add back a line that was lost somehow.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jan 7 02:06:05 1999 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.22: +76 -185 lines
Diff to previous 1.22 (colored)

Ooops, I didn't mean to commit that.  Back out.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jan 7 01:59:24 1999 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.21: +186 -77 lines
Diff to previous 1.21 (colored)

Add another paranoia test in the interrupt routine.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jan 1 15:15:33 1999 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.20: +17 -11 lines
Diff to previous 1.20 (colored)

Set the correct transfer count on interrupt transfers.

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

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

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 29 05:08:57 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.18: +9 -3 lines
Diff to previous 1.18 (colored)

Implement short transfers.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Dec 29 03:01:44 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.17: +1 -8 lines
Diff to previous 1.17 (colored)

Remove part of the bigendian patch that was not supposed to be commited.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Dec 28 20:13:59 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.16: +97 -1 lines
Diff to previous 1.16 (colored)

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

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 28 12:56:19 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.15: +110 -80 lines
Diff to previous 1.15 (colored)

Add a lot of byte swapping to get the code to work on big endian machines.
Patch from Tsubai Masanari <tsubai@iri.co.jp>.
Add an extra controller reset.  According to the OHCI spec it shouldn't
be necessary, but without some machines don't work.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Dec 26 12:53:01 1998 UTC (25 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.14: +92 -58 lines
Diff to previous 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 10 23:16:47 1998 UTC (25 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.13: +22 -14 lines
Diff to previous 1.13 (colored)

Take care of some lines > 80 chars.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Dec 8 14:34:08 1998 UTC (25 years, 4 months ago) by augustss
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.12: +22 -3 lines
Diff to previous 1.12 (colored)

Print plain text error codes.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Nov 30 21:39:20 1998 UTC (25 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

Do untimeout() for the timeouts we set up.
(How can this ever have worked?)

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

Make the copyright header conform to the NetBSD template.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Nov 22 20:21:22 1998 UTC (25 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored)

Make sure the Endpoint Descriptor gets the correct maximum packet size.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Nov 21 18:57:09 1998 UTC (25 years, 5 months ago) by augustss
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

Fix some typos.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Aug 5 10:16:25 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.7: +2 -5 lines
Diff to previous 1.7 (colored)

Fix two pastos.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Aug 2 22:30:52 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.6: +5 -1 lines
Diff to previous 1.6 (colored)

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

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

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

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

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

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jul 24 21:09:07 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.3: +36 -91 lines
Diff to previous 1.3 (colored)

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.3 / (download) - annotate - [select for diffs], Thu Jul 23 13:41:04 1998 UTC (25 years, 8 months ago) by augustss
Branch: MAIN
Changes since 1.2: +188 -21 lines
Diff to previous 1.2 (colored)

Implement bulk transfer for OHCI.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jul 23 01:46:27 1998 UTC (25 years, 9 months ago) by augustss
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

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.1 / (download) - annotate - [select for diffs], Sun Jul 12 19:51:59 1998 UTC (25 years, 9 months ago) by augustss
Branch: 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

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




CVSweb <webmaster@jp.NetBSD.org>