version 1.42, 2013/02/02 14:15:55 |
version 1.42.14.5, 2014/12/05 13:23:38 |
Line 42 typedef struct ehci_soft_qtd { |
|
Line 42 typedef struct ehci_soft_qtd { |
|
int offs; /* qTD's offset in usb_dma_t */ |
int offs; /* qTD's offset in usb_dma_t */ |
usbd_xfer_handle xfer; |
usbd_xfer_handle xfer; |
LIST_ENTRY(ehci_soft_qtd) hnext; |
LIST_ENTRY(ehci_soft_qtd) hnext; |
u_int16_t len; |
uint16_t len; |
} ehci_soft_qtd_t; |
} ehci_soft_qtd_t; |
#define EHCI_SQTD_ALIGN MAX(EHCI_QTD_ALIGN, CACHE_LINE_SIZE) |
#define EHCI_SQTD_ALIGN MAX(EHCI_QTD_ALIGN, CACHE_LINE_SIZE) |
#define EHCI_SQTD_SIZE ((sizeof (struct ehci_soft_qtd) + EHCI_SQTD_ALIGN - 1) & -EHCI_SQTD_ALIGN) |
#define EHCI_SQTD_SIZE ((sizeof (struct ehci_soft_qtd) + EHCI_SQTD_ALIGN - 1) & -EHCI_SQTD_ALIGN) |
Line 61 typedef struct ehci_soft_qh { |
|
Line 61 typedef struct ehci_soft_qh { |
|
#define EHCI_SQH_CHUNK (EHCI_PAGE_SIZE / EHCI_SQH_SIZE) |
#define EHCI_SQH_CHUNK (EHCI_PAGE_SIZE / EHCI_SQH_SIZE) |
|
|
typedef struct ehci_soft_itd { |
typedef struct ehci_soft_itd { |
ehci_itd_t itd; |
union { |
|
ehci_itd_t itd; |
|
ehci_sitd_t sitd; |
|
}; |
union { |
union { |
struct { |
struct { |
/* soft_itds links in a periodic frame*/ |
/* soft_itds links in a periodic frame*/ |
Line 81 typedef struct ehci_soft_itd { |
|
Line 84 typedef struct ehci_soft_itd { |
|
#define EHCI_ITD_SIZE ((sizeof(struct ehci_soft_itd) + EHCI_QH_ALIGN - 1) / EHCI_ITD_ALIGN * EHCI_ITD_ALIGN) |
#define EHCI_ITD_SIZE ((sizeof(struct ehci_soft_itd) + EHCI_QH_ALIGN - 1) / EHCI_ITD_ALIGN * EHCI_ITD_ALIGN) |
#define EHCI_ITD_CHUNK (EHCI_PAGE_SIZE / EHCI_ITD_SIZE) |
#define EHCI_ITD_CHUNK (EHCI_PAGE_SIZE / EHCI_ITD_SIZE) |
|
|
|
#define ehci_soft_sitd_t ehci_soft_itd_t |
|
#define ehci_soft_sitd ehci_soft_itd |
|
#define sc_softsitds sc_softitds |
|
#define EHCI_SITD_SIZE ((sizeof(struct ehci_soft_sitd) + EHCI_QH_ALIGN - 1) / EHCI_SITD_ALIGN * EHCI_SITD_ALIGN) |
|
#define EHCI_SITD_CHUNK (EHCI_PAGE_SIZE / EHCI_SITD_SIZE) |
|
|
struct ehci_xfer { |
struct ehci_xfer { |
struct usbd_xfer xfer; |
struct usbd_xfer xfer; |
struct usb_task abort_task; |
struct usb_task abort_task; |
Line 89 struct ehci_xfer { |
|
Line 98 struct ehci_xfer { |
|
ehci_soft_qtd_t *sqtdend; |
ehci_soft_qtd_t *sqtdend; |
ehci_soft_itd_t *itdstart; |
ehci_soft_itd_t *itdstart; |
ehci_soft_itd_t *itdend; |
ehci_soft_itd_t *itdend; |
|
ehci_soft_sitd_t *sitdstart; |
|
ehci_soft_sitd_t *sitdend; |
u_int isoc_len; |
u_int isoc_len; |
int isdone; /* used only when DIAGNOSTIC is defined */ |
int isdone; /* used only when DIAGNOSTIC is defined */ |
}; |
}; |
Line 132 typedef struct ehci_softc { |
|
Line 143 typedef struct ehci_softc { |
|
char sc_vendor[32]; /* vendor string for root hub */ |
char sc_vendor[32]; /* vendor string for root hub */ |
int sc_id_vendor; /* vendor ID for root hub */ |
int sc_id_vendor; /* vendor ID for root hub */ |
|
|
u_int32_t sc_cmd; /* shadow of cmd reg during suspend */ |
uint32_t sc_cmd; /* shadow of cmd reg during suspend */ |
|
|
u_int sc_ncomp; |
u_int sc_ncomp; |
u_int sc_npcomp; |
u_int sc_npcomp; |
Line 155 typedef struct ehci_softc { |
|
Line 166 typedef struct ehci_softc { |
|
ehci_soft_qh_t *sc_freeqhs; |
ehci_soft_qh_t *sc_freeqhs; |
ehci_soft_qtd_t *sc_freeqtds; |
ehci_soft_qtd_t *sc_freeqtds; |
LIST_HEAD(sc_freeitds, ehci_soft_itd) sc_freeitds; |
LIST_HEAD(sc_freeitds, ehci_soft_itd) sc_freeitds; |
|
LIST_HEAD(sc_freesitds, ehci_soft_sitd) sc_freesitds; |
|
|
int sc_noport; |
int sc_noport; |
u_int8_t sc_hasppc; /* has Port Power Control */ |
uint8_t sc_hasppc; /* has Port Power Control */ |
u_int8_t sc_addr; /* device address */ |
|
u_int8_t sc_conf; /* device configuration */ |
|
usbd_xfer_handle sc_intrxfer; |
usbd_xfer_handle sc_intrxfer; |
char sc_isreset[EHCI_MAX_PORTS]; |
char sc_isreset[EHCI_MAX_PORTS]; |
char sc_softwake; |
char sc_softwake; |
kcondvar_t sc_softwake_cv; |
kcondvar_t sc_softwake_cv; |
|
|
u_int32_t sc_eintrs; |
uint32_t sc_eintrs; |
ehci_soft_qh_t *sc_async_head; |
ehci_soft_qh_t *sc_async_head; |
|
|
pool_cache_t sc_xferpool; /* free xfer pool */ |
pool_cache_t sc_xferpool; /* free xfer pool */ |
Line 174 typedef struct ehci_softc { |
|
Line 184 typedef struct ehci_softc { |
|
|
|
device_t sc_child; /* /dev/usb# device */ |
device_t sc_child; /* /dev/usb# device */ |
char sc_dying; |
char sc_dying; |
struct usb_dma_reserve sc_dma_reserve; |
|
|
|
void (*sc_vendor_init)(struct ehci_softc *); |
void (*sc_vendor_init)(struct ehci_softc *); |
int (*sc_vendor_port_status)(struct ehci_softc *, uint32_t, int); |
int (*sc_vendor_port_status)(struct ehci_softc *, uint32_t, int); |
Line 193 typedef struct ehci_softc { |
|
Line 202 typedef struct ehci_softc { |
|
#define EOWRITE2(sc, a, x) bus_space_write_2((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x)) |
#define EOWRITE2(sc, a, x) bus_space_write_2((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x)) |
#define EOWRITE4(sc, a, x) bus_space_write_4((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x)) |
#define EOWRITE4(sc, a, x) bus_space_write_4((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x)) |
|
|
usbd_status ehci_init(ehci_softc_t *); |
int ehci_init(ehci_softc_t *); |
int ehci_intr(void *); |
int ehci_intr(void *); |
int ehci_detach(ehci_softc_t *, int); |
int ehci_detach(ehci_softc_t *, int); |
int ehci_activate(device_t, enum devact); |
int ehci_activate(device_t, enum devact); |