Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/usb/xhcivar.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/usb/xhcivar.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.4.16.2 retrieving revision 1.5 diff -u -p -r1.4.16.2 -r1.5 --- src/sys/dev/usb/xhcivar.h 2017/01/26 21:54:25 1.4.16.2 +++ src/sys/dev/usb/xhcivar.h 2016/04/23 10:15:32 1.5 @@ -1,4 +1,4 @@ -/* $NetBSD: xhcivar.h,v 1.4.16.2 2017/01/26 21:54:25 skrll Exp $ */ +/* $NetBSD: xhcivar.h,v 1.5 2016/04/23 10:15:32 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -42,7 +42,6 @@ struct xhci_xfer { #define XHCI_BUS2SC(bus) ((bus)->ub_hcpriv) #define XHCI_PIPE2SC(pipe) XHCI_BUS2SC((pipe)->up_dev->ud_bus) #define XHCI_XFER2SC(xfer) XHCI_BUS2SC((xfer)->ux_bus) -#define XHCI_XFER2BUS(xfer) ((xfer)->ux_bus) #define XHCI_XPIPE2SC(d) XHCI_BUS2SC((d)->xp_pipe.up_dev->ud_bus) #define XHCI_XFER2XXFER(xfer) ((struct xhci_xfer *)(xfer)) @@ -72,7 +71,6 @@ struct xhci_slot { struct xhci_softc { device_t sc_dev; device_t sc_child; - device_t sc_child2; bus_size_t sc_ios; bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; /* Base */ @@ -80,8 +78,7 @@ struct xhci_softc { bus_space_handle_t sc_obh; /* Operational Base */ bus_space_handle_t sc_rbh; /* Runtime Base */ bus_space_handle_t sc_dbh; /* Doorbell Registers */ - struct usbd_bus sc_bus; /* USB 3 bus */ - struct usbd_bus sc_bus2; /* USB 2 bus */ + struct usbd_bus sc_bus; kmutex_t sc_lock; kmutex_t sc_intr_lock; @@ -90,26 +87,22 @@ struct xhci_softc { char sc_vendor[32]; /* vendor string for root hub */ int sc_id_vendor; /* vendor ID for root hub */ + struct usbd_xfer *sc_intrxfer; + pool_cache_t sc_xferpool; bus_size_t sc_pgsz; /* xHCI page size */ uint32_t sc_ctxsz; int sc_maxslots; int sc_maxintrs; + int sc_maxports; int sc_maxspbuf; - /* - * Port routing and root hub - xHCI 4.19.7 - */ - int sc_maxports; /* number of controller ports */ - - uint8_t *sc_ctlrportbus; /* a bus bit per port */ - - int *sc_ctlrportmap; - int *sc_rhportmap[2]; - int sc_rhportcount[2]; - struct usbd_xfer *sc_intrxfer[2]; - + /* XXX suboptimal */ + int sc_hs_port_start; + int sc_hs_port_count; + int sc_ss_port_start; + int sc_ss_port_count; struct xhci_slot * sc_slots; @@ -121,11 +114,9 @@ struct xhci_softc { usb_dma_t sc_spbufarray_dma; usb_dma_t *sc_spbuf_dma; - kcondvar_t sc_cmdbusy_cv; kcondvar_t sc_command_cv; bus_addr_t sc_command_addr; struct xhci_trb sc_result_trb; - bool sc_resultpending; bool sc_ac64; bool sc_dying; @@ -134,7 +125,8 @@ struct xhci_softc { int (*sc_vendor_port_status)(struct xhci_softc *, uint32_t, int); int sc_quirks; -#define XHCI_QUIRK_INTEL __BIT(0) /* Intel xhci chip */ +#define XHCI_QUIRK_FORCE_INTR __BIT(0) /* force interrupt reading */ +#define XHCI_QUIRK_INTEL __BIT(1) /* Intel xhci chip */ }; int xhci_init(struct xhci_softc *);