diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2004-10-20 12:45:32 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2004-10-20 12:45:32 +0000 |
commit | 5ca85159004181139801964bee576b87be4abd22 (patch) | |
tree | 17a892f80e849ce7bba7dd6c3c3c5daeba3f99ce /sys/dev/usb/ehcivar.h | |
parent | 739696eb39583689f2b47fac0c0acbe5dd9958b3 (diff) |
interrupt transfer support on usb2 controllers. allows the use of usb2 hubs
with usb2 hardware.
Diffstat (limited to 'sys/dev/usb/ehcivar.h')
-rw-r--r-- | sys/dev/usb/ehcivar.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/usb/ehcivar.h b/sys/dev/usb/ehcivar.h index 447729f1b19..cc4d3fc1c93 100644 --- a/sys/dev/usb/ehcivar.h +++ b/sys/dev/usb/ehcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ehcivar.h,v 1.5 2004/10/19 08:10:27 dlg Exp $ */ +/* $OpenBSD: ehcivar.h,v 1.6 2004/10/20 12:45:31 dlg Exp $ */ /* $NetBSD: ehcivar.h,v 1.12 2001/12/31 12:16:57 augustss Exp $ */ /* @@ -53,6 +53,7 @@ typedef struct ehci_soft_qh { struct ehci_soft_qh *next; struct ehci_soft_qtd *sqtd; ehci_physaddr_t physaddr; + int islot; } ehci_soft_qh_t; #define EHCI_SQH_SIZE ((sizeof (struct ehci_soft_qh) + EHCI_QH_ALIGN - 1) / EHCI_QH_ALIGN * EHCI_QH_ALIGN) #define EHCI_SQH_CHUNK (EHCI_PAGE_SIZE / EHCI_SQH_SIZE) @@ -69,6 +70,18 @@ struct ehci_xfer { }; #define EXFER(xfer) ((struct ehci_xfer *)(xfer)) +/* Information about an entry in the interrupt list. */ +struct ehci_soft_islot { + ehci_soft_qh_t *sqh; /* Queue Head. */ +}; + +#define EHCI_FRAMELIST_MAXCOUNT 1024 +#define EHCI_IPOLLRATES 8 /* Poll rates (1ms, 2, 4, 8 .. 128) */ +#define EHCI_INTRQHS ((1 << EHCI_IPOLLRATES) - 1) +#define EHCI_IQHIDX(lev, pos) \ + ((((pos) & ((1 << (lev)) - 1)) | (1 << (lev))) - 1) +#define EHCI_ILEV_IVAL(lev) (1 << (lev)) + #define EHCI_HASH_SIZE 128 #define EHCI_COMPANION_MAX 8 @@ -92,7 +105,11 @@ typedef struct ehci_softc { struct usbd_bus *sc_comps[EHCI_COMPANION_MAX]; usb_dma_t sc_fldma; + ehci_link_t *sc_flist; u_int sc_flsize; + u_int sc_rand; /* XXX need proper intr scheduling */ + + struct ehci_soft_islot sc_islots[EHCI_INTRQHS]; LIST_HEAD(, ehci_xfer) sc_intrhead; |