ehci.c (188983) | ehci.c (189453) |
---|---|
1/*- 2 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 3 * Copyright (c) 2004 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 2004 Lennart Augustsson. All rights reserved. 5 * Copyright (c) 2004 Charles M. Hannum. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 30 unchanged lines hidden (view full) --- 39 */ 40 41/* 42 * TODO: 43 * 1) command failures are not recovered correctly 44 */ 45 46#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 3 * Copyright (c) 2004 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 2004 Lennart Augustsson. All rights reserved. 5 * Copyright (c) 2004 Charles M. Hannum. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 30 unchanged lines hidden (view full) --- 39 */ 40 41/* 42 * TODO: 43 * 1) command failures are not recovered correctly 44 */ 45 46#include <sys/cdefs.h> |
47__FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci.c 188983 2009-02-24 03:39:13Z thompsa $"); | 47__FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci.c 189453 2009-03-06 17:13:12Z thompsa $"); |
48 49#include <dev/usb/usb.h> 50#include <dev/usb/usb_mfunc.h> 51#include <dev/usb/usb_error.h> 52#include <dev/usb/usb_defs.h> 53 54#define USB_DEBUG_VAR ehcidebug 55 --- 2128 unchanged lines hidden (view full) --- 2184{ 2185 return; 2186} 2187 2188static void 2189ehci_device_bulk_start(struct usb2_xfer *xfer) 2190{ 2191 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); | 48 49#include <dev/usb/usb.h> 50#include <dev/usb/usb_mfunc.h> 51#include <dev/usb/usb_error.h> 52#include <dev/usb/usb_defs.h> 53 54#define USB_DEBUG_VAR ehcidebug 55 --- 2128 unchanged lines hidden (view full) --- 2184{ 2185 return; 2186} 2187 2188static void 2189ehci_device_bulk_start(struct usb2_xfer *xfer) 2190{ 2191 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); |
2192 uint32_t temp; |
|
2192 2193 /* setup TD's and QH */ 2194 ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); 2195 2196 /* put transfer on interrupt queue */ 2197 ehci_transfer_intr_enqueue(xfer); | 2193 2194 /* setup TD's and QH */ 2195 ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); 2196 2197 /* put transfer on interrupt queue */ 2198 ehci_transfer_intr_enqueue(xfer); |
2199 2200 /* XXX Performance quirk: Some Host Controllers have a too low 2201 * interrupt rate. Issue an IAAD to stimulate the Host 2202 * Controller after queueing the BULK transfer. 2203 */ 2204 temp = EOREAD4(sc, EHCI_USBCMD); 2205 if (!(temp & EHCI_CMD_IAAD)) 2206 EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); |
|
2198} 2199 2200struct usb2_pipe_methods ehci_device_bulk_methods = 2201{ 2202 .open = ehci_device_bulk_open, 2203 .close = ehci_device_bulk_close, 2204 .enter = ehci_device_bulk_enter, 2205 .start = ehci_device_bulk_start, --- 1736 unchanged lines hidden --- | 2207} 2208 2209struct usb2_pipe_methods ehci_device_bulk_methods = 2210{ 2211 .open = ehci_device_bulk_open, 2212 .close = ehci_device_bulk_close, 2213 .enter = ehci_device_bulk_enter, 2214 .start = ehci_device_bulk_start, --- 1736 unchanged lines hidden --- |