Up to [cvs.NetBSD.org] / src / sys / dev / usb
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Pull up following revision(s) (requested by riastradh in ticket #281): sys/dev/usb/xhci.c: revision 1.177 sys/dev/usb/xhci.c: revision 1.180 sys/dev/usb/xhcivar.h: revision 1.24 xhci(4): Avoid crash in suspend/resume/resume if first resume fails. Rather than try to recover from this, just make new commands fail so at least we don't deadlock. xhci(4): Don't panic on suspend if previous suspend/resume failed. Trying to resume again probably won't make the situation much worse, but panicking can definitely make it worse.
Pull up following revision(s) (requested by riastradh in ticket #1869): sys/dev/usb/xhci.c: revision 1.176 sys/dev/usb/xhcivar.h: revision 1.23 xhci(4): Defer root intr xfers while polling. Root intr xfers require taking adaptive locks, which is forbidden while polling. This is not great -- any USB transfer completion callbacks might try to take adaptive locks, not just uhub_intr, and that will always causes trouble. We get lucky with ukbd_intr because it's not MP-safe, so it relies only on the kernel lock (a spin lock) anyway. But this change brings xhci in line with ehci. PR kern/57326
Pull up following revision(s) (requested by riastradh in ticket #1687): sys/dev/usb/xhci.c: revision 1.176 sys/dev/usb/xhcivar.h: revision 1.23 xhci(4): Defer root intr xfers while polling. Root intr xfers require taking adaptive locks, which is forbidden while polling. This is not great -- any USB transfer completion callbacks might try to take adaptive locks, not just uhub_intr, and that will always causes trouble. We get lucky with ukbd_intr because it's not MP-safe, so it relies only on the kernel lock (a spin lock) anyway. But this change brings xhci in line with ehci. PR kern/57326
Pull up following revision(s) (requested by riastradh in ticket #280): sys/dev/usb/xhci.c: revision 1.176 sys/dev/usb/xhcivar.h: revision 1.23 xhci(4): Defer root intr xfers while polling. Root intr xfers require taking adaptive locks, which is forbidden while polling. This is not great -- any USB transfer completion callbacks might try to take adaptive locks, not just uhub_intr, and that will always causes trouble. We get lucky with ukbd_intr because it's not MP-safe, so it relies only on the kernel lock (a spin lock) anyway. But this change brings xhci in line with ehci. PR kern/57326
xhci(4): Avoid crash in suspend/resume/resume if first resume fails. Rather than try to recover from this, just make new commands fail so at least we don't deadlock. XXX pullup-9 XXX pullup-10
xhci(4): Defer root intr xfers while polling. Root intr xfers require taking adaptive locks, which is forbidden while polling. This is not great -- any USB transfer completion callbacks might try to take adaptive locks, not just uhub_intr, and that will always causes trouble. We get lucky with ukbd_intr because it's not MP-safe, so it relies only on the kernel lock (a spin lock) anyway. But this change brings xhci in line with ehci. PR kern/57326 XXX pullup-8 XXX pullup-9 XXX pullup-10
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.
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.
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@.
xhci(4): Serialize access to portsc registers. Both xhci_roothub_ctrl and xhci_suspend/resume do r/m/w on them, so use a mutex to serialize access to avoid stomping on each other.
xhci(4): Add missing includes to xhcivar.h.
Fix pullup #1302 by adapting the changes to this branch (there was a misunderstanding in the ticket handling)
Pull up following revision(s) (requested by riastradh in ticket #1301): sys/dev/usb/xhci.c: revision 1.140 sys/dev/usb/xhci.c: revision 1.141 sys/dev/usb/xhci.c: revision 1.143 sys/dev/usb/xhcivar.h: revision 1.18 sys/dev/usb/xhcivar.h: revision 1.19 sys/dev/usb/xhcireg.h: revision 1.19 sys/dev/usb/xhci.c: revision 1.139 xhci(4): Draft suspend/resume. Work almost entirely done and tested by maya@ based on xhci 1.2 spec; tidied up and tweaked by me. Not sure about issuing Stop Endpoint commands or ensuring the Command Ring is in the Stopped or Idle state, but this seems to work as is, so it's already an improvement over what we had before which was no xhci suspend/resume at all. In particular, it's not clear to us: - if we don't have any pending USB activity whether we need to issue the Stop Endpoints or quiesce the command ring; but - if we do have any pending USB activity whether issuing Stop Endpoint is enough or whether we also need to do anything to synchronize with other software logic to quiesce it too. xhci(4): Block commands and issue Stop Endpoint on suspend. xhci: Fix logic in waiting for command queue access. _Either_ an existing command in progress, _or_ an existing suspend in progress that is not done by us, should block us; the logic I wrote previously erroneously blocked only if both conditions happened at the same time. Should fix issue reported by Andrius V in the PR kern/56050 followup discussion. xhci(4): Wait USB_RESUME_WAIT ms, not 20 ms. Better to use the named constant, and although the spec says 20 ms is enough, apparently for some devices it's not.
Sync w/ HEAD.
sync with head
xhci(4): Block commands and issue Stop Endpoint on suspend.
xhci(4): Draft suspend/resume. Work almost entirely done and tested by maya@ based on xhci 1.2 spec; tidied up and tweaked by me. Not sure about issuing Stop Endpoint commands or ensuring the Command Ring is in the Stopped or Idle state, but this seems to work as is, so it's already an improvement over what we had before which was no xhci suspend/resume at all. In particular, it's not clear to us: - if we don't have any pending USB activity whether we need to issue the Stop Endpoints or quiesce the command ring; but - if we do have any pending USB activity whether issuing Stop Endpoint is enough or whether we also need to do anything to synchronize with other software logic to quiesce it too.
xhci(4): initial support for Isochronous pipes Needs more cleanup, and more work, particularly transaction scheduling may need to be examined with bus analyzer (to check if too frequent/ infrequent) or various isoc pipe consumers (to check if too infrequent) and fixed if incorrect. Begins to address PR kern/55574.
xhci(4): copy HCCPARAMS regs to softc, use when needed We'll need more than just the AC64 bit for the Isoc support coming up; and we don't need to keep all the bits as bools in the softc.
xhci(4): dynamically allocate xhci_xfer->xx_trb buffer Allocation size remains the same for now.
Remove definition of unused struct xhci_endpoint.
Merge changes from current as of 20200406
Tweak a comment in previous
Reduce the memory footprint by allocating a ring per endpoint/pipe on pipe open. From sc.dying on tech-kern
Sync with HEAD
Synch with HEAD
Seperate xHCI and xhci(4) TRB structs so as to avoid some of them (the ones that the hardware doesn't touch) ending up less-aligned than the compiler assumed. Additionally, fix the most obvious problems that xhci(4) had on big endian systems. Briefly tested on a Jetson TK1 in LE and BE w/ evbarm GENERIC kernel.
Sync with HEAD Resolve a couple of conflicts (result of the uimin/uimax changes)
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
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
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.
Sync with HEAD, resolve some conflicts
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.
update from HEAD
If the bus glue calls xhci_init with interrupts enabled, there is a window between when xhci interrupts are enabled and the usb bus driver is attached. If an irq occurs in this window, xhci will attempt to schedule a softint with an invalid softint handle. Add a quirk flag, XHCI_DEFERRED_START, that when set skips starting the controller at the end of xhci_init. Bus glue that sets this is responsible to call xhci_start after attaching the child usb devices.
Sync with HEAD
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)
Sync with HEAD
Sync with HEAD/nhusb
Pull across xhci(4) improvemnts from nick-nhusb
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
First pass at netbsd-7 updated with USB code from HEAD
Serialise commands
Sync with HEAD
Kill XHCI_QUIRK_FORCE_INTR and surrounding code
Move the struct usb_task to struct usbd_xfer for everyone to use.
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
Fix xpipe->xp_pipe was xpipe->pipe. From Takahiro HAYASHI
Simplify *_XFER2SC using ux_bus
Consistently providei/use *_{XFER,PIPE,BUS}2SC, etc macros
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.
Some quirk flags. From Takahiro HAYASHI.
Do the same as OpenBSD and get rid of the *_handle typedefs and use plain structures insteads
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.
Remove unused and commented out sc_dma_reserve
Rebase to HEAD as of a few days ago.
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")
sync with head
file xhcivar.h was added on branch tls-maxphys on 2014-08-20 00:03:51 +0000
file xhcivar.h was added on branch yamt-pagecache on 2014-05-22 11:40:37 +0000
file xhcivar.h was added on branch rmind-smpnet on 2014-05-18 17:45:48 +0000
Whtiespace.
Don't abuse usbd_status in xhci_init
Pull down xhci support from HEAD
file xhcivar.h was added on branch matt-nb5-mips64 on 2013-11-05 18:36:31 +0000
Add support for scratchpad buffers (required for some XHCI devices). Fix an endian issue.
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.