The NetBSD Project

CVS log for src/sys/dev/pci/xhci_pci.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.33 / (download) - annotate - [select for diffs], Tue Jan 24 08:45:47 2023 UTC (13 months, 1 week ago) by mlelstv
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

Consistently use cached chipset tag value.

Revision 1.8.6.4 / (download) - annotate - [select for diffs], Mon Jan 23 12:10:12 2023 UTC (13 months, 1 week ago) by martin
Branch: netbsd-8
Changes since 1.8.6.3: +6 -4 lines
Diff to previous 1.8.6.3 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored)

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

	sys/dev/pci/xhci_pci.c				1.31 via patch
	sys/dev/usb/xhci.c				1.173-1.175
	sys/dev/usb/xhcivar.h				1.22

Support xHCI device which has USB 2 port only.

Revision 1.21.4.2 / (download) - annotate - [select for diffs], Mon Jan 23 12:05:36 2023 UTC (13 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.21.4.1: +6 -4 lines
Diff to previous 1.21.4.1 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored)

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

	sys/dev/pci/xhci_pci.c				1.31 via patch
	sys/dev/usb/xhci.c				1.173-1.175
	sys/dev/usb/xhcivar.h				1.22

Support xHCI device which has USB 2 port only.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Oct 28 21:57:58 2022 UTC (16 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored)

xhci(4): Mark PCI interrupt handler MP-safe.

xhci_intr has its own intr lock to coordinate with the MP-safe
softint it defers all its work to, other than reading and writing a
few registers to get and acknowledge the interrupt status.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Oct 11 09:18:22 2022 UTC (16 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.30: +9 -6 lines
Diff to previous 1.30 (colored)

There is an xHCI device which has USB 2 port only. Support it.

 - Example:

xhci4 at pci17 dev 0 function 0: AMD product 15b8 (rev. 0x00)
xhci4: 64-bit DMA
allocated pic msix10 type edge pin 0 level 6 to cpu0 slot 32 idt entry 107
xhci4: interrupting at msix10 vec 0
xhci4: xHCI version 1.20
xhci4: hcs1=1000840 hcs2=140000f1 hcs3=7000a
xhci4: hcc=0x110ffc5<XECP=0x110,MAXPSA=0xf,CFC,SEC,SPC,PAE,NSS,LTC,CSZ,AC64>
xhci4: xECP 440
xhci4: hcc2=0x3f<CIC,LEC,CTC,FSC,CMC,U3C>
xhci4: ECR: 0x00000401
xhci4: ECR: 0x02000402
xhci4:  SP: 0x02000402 0x20425355 0x00180101 0x00000000
xhci4:  hs ports 1 - 1
xhci4: ECR: 0x000f000a
xhci4: PAGESIZE 0x00000001
xhci4: sc_pgsz 0x00001000
xhci4: sc_maxslots 0x00000040
xhci4: sc_maxports 1
xhci4: sc_maxspbuf 2
xhci4: eventst: 0x000000013ee60fc0 0xffffb08826f5afc0 1000
xhci4: dcbaa: 0x000000013ee63000 0xffffb08826f5b000 1000
xhci4: current IMOD 0
(snip)
usb8 at xhci4: USB revision 3.1
usb9 at xhci4: USB revision 2.0
uhub8 at usb8: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 3.00/1.00, addr 0
uhub8: 0 ports with 0 removable, self powered
uhub8: no ports, hub ignored
uhub8: WARNING: power management not supported
autoconfiguration error: usb8: root device is not a hub
usb8: WARNING: power management not supported
uhub9 at usb9: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 0
uhub9: 1 port with 1 removable, self powered

 - To resolve this problem, keep number of ports of SS and HS and use
   it to attach child device(s).
 - Tested on ASUS TUF GAMING X670E-PLUS.
 - OK'd by skrll@.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Aug 7 16:19:14 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored)

Merge thorpej-cfargs2.

Revision 1.29.8.1 / (download) - annotate - [select for diffs], Wed Aug 4 21:27:00 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored) next main 1.30 (colored)

Adapt to CFARGS().

Revision 1.21.4.1 / (download) - annotate - [select for diffs], Mon May 17 15:50:35 2021 UTC (2 years, 9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Pull up following revision(s) (requested by jakllsch in ticket #1273):

	sys/dev/pci/xhci_pci.c: revision 1.26

xhci_pci: avoid potential double free of interrupt handles

Found by Kouichi Hashikawa in PR 55855.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:57 2021 UTC (2 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-cfargs2
Changes since 1.28: +5 -4 lines
Diff to previous 1.28 (colored)

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:49 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.25.2.1: +14 -3 lines
Diff to previous 1.25.2.1 (colored) next main 1.26 (colored)

Sync with HEAD.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Sun Mar 21 21:09:14 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.28: +5 -4 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

Give config_found() the same variadic arguments treatment as
config_search().  This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls.  Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Feb 7 11:25:56 2021 UTC (3 years ago) by ryoon
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Allow MSIX and MSI for interrupt type

Revision 1.27 / (download) - annotate - [select for diffs], Sun Feb 7 04:58:17 2021 UTC (3 years ago) by dbj
Branch: MAIN
Changes since 1.26: +14 -3 lines
Diff to previous 1.26 (colored)

xhci_pci.c: reimplement XHCI_DISABLE_MSI and XHCI_DISABLE_MSIX

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:09 2020 UTC (3 years, 2 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Sync w/ HEAD.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Dec 9 14:21:09 2020 UTC (3 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

xhci_pci: avoid potential double free of interrupt handles

Found by Kouichi Hashikawa in PR 55855.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 27 13:50:57 2020 UTC (3 years, 4 months ago) by skrll
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.24: +14 -5 lines
Diff to previous 1.24 (colored)

Report HW DMA capability and if the DMA tag limits it.

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:10 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.12.2.1: +3 -3 lines
Diff to previous 1.12.2.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

Merge changes from current as of 20200406

Revision 1.24 / (download) - annotate - [select for diffs], Mon Dec 2 03:06:51 2019 UTC (4 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

 Use PCI_MSIX_"TBL"BIR_MASK instead of PCI_MSIX_"PBA"BIR_MASK for MSI-X table.
This is not a real bug because both macros have the same value.

Revision 1.8.6.3 / (download) - annotate - [select for diffs], Sat Nov 16 16:30:09 2019 UTC (4 years, 3 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.8.6.2: +25 -3 lines
Diff to previous 1.8.6.2 (colored) to branchpoint 1.8 (colored)

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

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

Detect USB 3.1

Revision 1.23 / (download) - annotate - [select for diffs], Thu Nov 14 09:15:12 2019 UTC (4 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.22: +0 -7 lines
Diff to previous 1.22 (colored)

 Revert previous. Sorry.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Nov 14 09:11:35 2019 UTC (4 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.21: +9 -2 lines
Diff to previous 1.21 (colored)

Add D-Link DGE-530T C1 and TP-Link TG-3468 v2.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:27 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.12: +74 -47 lines
Diff to previous 1.12 (colored)

Sync with HEAD

Revision 1.8.6.2 / (download) - annotate - [select for diffs], Sun Jan 27 18:35:19 2019 UTC (5 years, 1 month ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.8.6.1: +11 -9 lines
Diff to previous 1.8.6.1 (colored) to branchpoint 1.8 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1172):

	sys/dev/pci/nvme_pci.c: revision 1.26
	sys/dev/pci/xhci_pci.c: revision 1.21
	sys/dev/pci/ixgbe/ixv.c: revision 1.108
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.171
	sys/dev/pci/if_fxp_pci.c: revision 1.84
	sys/dev/pci/if_fxp_pci.c: revision 1.85
	sys/dev/pci/xhci_pci.c: revision 1.16

remove #ifdef DEBUG printf, it seems to have outlived it's usefulness

 -

  KNF. No functional change.

 -

  Nowadays some UEFI BIOSes don't enable some PCI devices' address decoding.
To resolve this problem, pci_map.c rev. 1.34-1.36 changed the
pci_mapreg_(sub)map()'s to set the decode bit if it's not set. It's good for
almost all drivers, but some other drivers don't use pci_mapreg_map().
In drivers which don't use pci_mapreg_map(), some of them explicitly enable
decoding but others don't. Add code to enable decoding to them.

  See also the following discussion:
	http://mail-index.netbsd.org/tech-kern/2017/03/22/msg021678.html

Revision 1.11.2.8 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:23 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.11.2.7: +11 -6 lines
Diff to previous 1.11.2.7 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Sync with HEAD

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jan 23 06:56:19 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.20: +11 -6 lines
Diff to previous 1.20 (colored)

 Nowadays some UEFI BIOSes don't enable some PCI devices' address decoding.
To resolve this problem, pci_map.c rev. 1.34-1.36 changed the
pci_mapreg_(sub)map()'s to set the decode bit if it's not set. It's good for
almost all drivers, but some other drivers don't use pci_mapreg_map().
In drivers which don't use pci_mapreg_map(), some of them expilicitly enable
decoding but others don't. Add code to enable decoding to them.

 See also the following discussion:
	http://mail-index.netbsd.org/tech-kern/2017/03/22/msg021678.html

Revision 1.11.2.7 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:42 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.11.2.6: +4 -4 lines
Diff to previous 1.11.2.6 (colored) to branchpoint 1.11 (colored)

Synch with HEAD

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jan 18 07:03:02 2019 UTC (5 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-compat-20190118
Changes since 1.19: +4 -4 lines
Diff to previous 1.19 (colored)

Default to USBREV_3_0 if usbrev is unknown.

Revision 1.11.2.6 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:00 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.11.2.5: +41 -55 lines
Diff to previous 1.11.2.5 (colored) to branchpoint 1.11 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.19 / (download) - annotate - [select for diffs], Fri Dec 7 08:28:44 2018 UTC (5 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-1226
Changes since 1.18: +35 -14 lines
Diff to previous 1.18 (colored)

 xHCI uses BAR0 to map memory space. If a chip has MSI-X capability and it
points to BAR0, reserve the space. Almost the same as nvme_pci.c.

XXX Is it possible to make a nice API?

Revision 1.18 / (download) - annotate - [select for diffs], Fri Nov 30 17:47:54 2018 UTC (5 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.17: +8 -43 lines
Diff to previous 1.17 (colored)

simplify intr establish code - rely on pci_intr_alloc() to allow
also MSI-X, and to return interrupt types which are possible for
pci_intr_establish(); remove fallbacks to retry with MSI/MSI-X
explicitly disabled

discussed on tech-kern@

https://mail-index.netbsd.org/tech-kern/2018/11/27/msg024240.html

Revision 1.11.2.5 / (download) - annotate - [select for diffs], Mon Nov 26 13:16:46 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.11.2.4: +2 -6 lines
Diff to previous 1.11.2.4 (colored) to branchpoint 1.11 (colored)

And one more missed conflict.  (I think this is the last one.)

Revision 1.11.2.4 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:47 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.11.2.3: +21 -5 lines
Diff to previous 1.11.2.3 (colored) to branchpoint 1.11 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 24 14:50:04 2018 UTC (5 years, 3 months ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.16: +8 -2 lines
Diff to previous 1.16 (colored)

Fixup the retry loop wrt with XHCI_DISABLE_MSI{,X}

Revision 1.16 / (download) - annotate - [select for diffs], Thu Nov 15 22:15:43 2018 UTC (5 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.15: +2 -5 lines
Diff to previous 1.15 (colored)

remove #ifdef DEBUG printf, it seems to have outlived it's usefulness

Revision 1.15 / (download) - annotate - [select for diffs], Wed Oct 31 16:11:29 2018 UTC (5 years, 4 months ago) by jmcneill
Branch: MAIN
Changes since 1.14: +11 -2 lines
Diff to previous 1.14 (colored)

Add MSI-X support.

Revision 1.11.2.3 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:51 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.11.2.2: +4 -2 lines
Diff to previous 1.11.2.2 (colored) to branchpoint 1.11 (colored)

Ssync with HEAD

Revision 1.8.6.1 / (download) - annotate - [select for diffs], Thu Sep 27 14:52:27 2018 UTC (5 years, 5 months ago) by martin
Branch: netbsd-8
Changes since 1.8: +4 -2 lines
Diff to previous 1.8 (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.14 / (download) - annotate - [select for diffs], Tue Sep 18 05:24:10 2018 UTC (5 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored)

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

Revision 1.11.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:56 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.11.2.1: +25 -3 lines
Diff to previous 1.11.2.1 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 29 17:48:24 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0906, pgoyette-compat-0728, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Changes since 1.12: +25 -3 lines
Diff to previous 1.12 (colored)

 Detect USB 3.1.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:01 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.11: +2 -7 lines
Diff to previous 1.11 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.12 / (download) - annotate - [select for diffs], Mon Apr 9 16:21:10 2018 UTC (5 years, 10 months ago) by jakllsch
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415
Branch point for: phil-wifi
Changes since 1.11: +2 -7 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Thu Dec 28 05:43:42 2017 UTC (6 years, 2 months ago) by msaitoh
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.10: +9 -8 lines
Diff to previous 1.10 (colored)

- Fix panic in xhci_pci_detach() if xhci_pci_attach() failed.
- Fallback from MSI to INTx correctly.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Dec 25 08:39:38 2017 UTC (6 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.9: +31 -10 lines
Diff to previous 1.9 (colored)

- Fix a panic while cleaning PCI interrupt.
- Fallback to INTx if MSI allocation succeeded but the establish failed.

Revision 1.3.10.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:29 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.3.10.2: +92 -34 lines
Diff to previous 1.3.10.2 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

update from HEAD

Revision 1.9 / (download) - annotate - [select for diffs], Tue Sep 5 08:01:43 2017 UTC (6 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.8: +15 -3 lines
Diff to previous 1.8 (colored)

Add an XHCI_DISABLE_MSI option

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:52 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.7: +6 -4 lines
Diff to previous 1.7 (colored) next main 1.8 (colored)

Sync with HEAD

Revision 1.3.8.1 / (download) - annotate - [select for diffs], Wed Apr 5 19:54:19 2017 UTC (6 years, 10 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.3: +76 -22 lines
Diff to previous 1.3 (colored) next main 1.4 (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.6.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:37 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.6.2.1: +6 -4 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Sync with HEAD

Revision 1.3.14.2 / (download) - annotate - [select for diffs], Thu Jan 26 21:54:24 2017 UTC (7 years, 1 month ago) by skrll
Branch: netbsd-7-nhusb
Changes since 1.3.14.1: +6 -4 lines
Diff to previous 1.3.14.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync with HEAD/nhusb

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jan 19 16:05:00 2017 UTC (7 years, 1 month 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, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.7: +6 -4 lines
Diff to previous 1.7 (colored)

Pull across xhci(4) improvemnts from nick-nhusb

Revision 1.4.2.8 / (download) - annotate - [select for diffs], Mon Jan 2 16:55:50 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.7: +6 -4 lines
Diff to previous 1.4.2.7 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Parse the extended capabilies to and log each controller port to SS/HS
bus root hub ports.

Create/attach the two buses and adapt the xhci_roothub_ctrl to deal with
both buses and sets of roothub ports.

XXX the roothub ub_devices entry needs work to interact with usbdevs(1)
XXX correctly

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

Sync with HEAD

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:15 2016 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

Sync with HEAD

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 13 20:05:06 2016 UTC (7 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

provide intr xname

Revision 1.3.14.1 / (download) - annotate - [select for diffs], Tue Sep 6 20:33:08 2016 UTC (7 years, 5 months ago) by skrll
Branch: netbsd-7-nhusb
Changes since 1.3: +73 -21 lines
Diff to previous 1.3 (colored)

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

Revision 1.4.2.6 / (download) - annotate - [select for diffs], Sun May 29 08:44:30 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.5: +3 -27 lines
Diff to previous 1.4.2.5 (colored) to branchpoint 1.4 (colored)

Sync with HEAD

Revision 1.6 / (download) - annotate - [select for diffs], Tue May 3 13:14:44 2016 UTC (7 years, 10 months ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.5: +3 -27 lines
Diff to previous 1.5 (colored)

Kill XHCI_QUIRK_FORCE_INTR and surrounding code

Revision 1.5 / (download) - annotate - [select for diffs], Sat Apr 23 10:15:31 2016 UTC (7 years, 10 months ago) by skrll
Branch: MAIN
Changes since 1.4: +101 -29 lines
Diff to previous 1.4 (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.4.2.5 / (download) - annotate - [select for diffs], Tue Apr 5 15:36:48 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.4: +12 -14 lines
Diff to previous 1.4.2.4 (colored) to branchpoint 1.4 (colored)

Switch PCI xhci(4) attachment from pci_intr_map() to
pci_intr_alloc()/pci_intr_release().

This enables MSI where available.

Revision 1.4.2.4 / (download) - annotate - [select for diffs], Mon Aug 31 08:33:03 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.3: +12 -14 lines
Diff to previous 1.4.2.3 (colored) to branchpoint 1.4 (colored)

Various improvements from t-hash (very very slightly tweaked by me)

    + Use usbd_xfer_isread().
    + Change mutex to be initialized at IPL_USB.
    + Add vendor init/portsc hook.
    + Modify xhci_trb_put() to take host byte order arguments and
      convert them to little endian byte order.
    + Return PCI vendor ID of xhci instead of NetBSD(0x0) as a root hub
      vendor ID like other HCs do.
    + Move sc_ih in struct xhci_softc to struct xhci_pci_softc.
    + Improve debug message.

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Wed May 27 07:22:51 2015 UTC (8 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.2: +81 -4 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored)

Add patch for intel chips quirk from ryoon@ in
    https://mail-index.netbsd.org/netbsd-bugs/2014/08/31/msg038109.html
slightly modified to set quirks before calling xhci_init.

Set special IMOD value and route ports to xhci for intel chips.

From Takahiro HAYASHI.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Mon Apr 6 12:17:30 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.1: +2 -3 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored)

Remove useless break;

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Wed Dec 3 12:52:07 2014 UTC (9 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

The grand renaming of structure members.

No functional change.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Sep 21 14:30:22 2014 UTC (9 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.3: +4 -8 lines
Diff to previous 1.3 (colored)

Merge the 3 copies of devlist2h.awk that deal with 16 bit key and value
pairs to the compressed one that matt wrote.

Revision 1.3.10.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:48 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.3.10.1: +231 -0 lines
Diff to previous 1.3.10.1 (colored) to branchpoint 1.3 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.3.6.2 / (download) - annotate - [select for diffs], Thu May 22 11:40:34 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.3.6.1: +231 -0 lines
Diff to previous 1.3.6.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (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.3.4.2 / (download) - annotate - [select for diffs], Sun May 18 17:45:44 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.3.4.1: +231 -0 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

sync with head

Revision 1.3.10.1, Sat Mar 29 19:28:25 2014 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.3: +0 -231 lines
FILE REMOVED

file xhci_pci.c was added on branch tls-maxphys on 2014-08-20 00:03:48 +0000

Revision 1.3.6.1, Sat Mar 29 19:28:25 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.3: +0 -231 lines
FILE REMOVED

file xhci_pci.c was added on branch yamt-pagecache on 2014-05-22 11:40:34 +0000

Revision 1.3.4.1, Sat Mar 29 19:28:25 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.3: +0 -231 lines
FILE REMOVED

file xhci_pci.c was added on branch rmind-smpnet on 2014-05-18 17:45:44 +0000

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 29 19:28:25 2014 UTC (9 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Branch point for: yamt-pagecache, tls-maxphys, rmind-smpnet, netbsd-7-nhusb, netbsd-7
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 10 13:10:41 2014 UTC (9 years, 11 months ago) by skrll
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.1: +6 -6 lines
Diff to previous 1.1 (colored)

Don't abuse usbd_status in xhci_init

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Nov 5 18:36:31 2013 UTC (10 years, 3 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.1.2.1: +230 -0 lines
Diff to previous 1.1.2.1 (colored) next main 1.2 (colored)

Pull down xhci support from HEAD

Revision 1.1.2.1, Sat Sep 14 00:40:31 2013 UTC (10 years, 5 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.1: +0 -230 lines
FILE REMOVED

file xhci_pci.c was added on branch matt-nb5-mips64 on 2013-11-05 18:36:31 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Sat Sep 14 00:40:31 2013 UTC (10 years, 5 months ago) by jakllsch
Branch: MAIN
Branch point for: matt-nb5-mips64

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

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>