uhci.c (188983) | uhci.c (190174) |
---|---|
1/*- 2 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 3 * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 1998 Lennart Augustsson. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 3 * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 1998 Lennart Augustsson. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/usb/controller/uhci.c 188983 2009-02-24 03:39:13Z thompsa $"); | 29__FBSDID("$FreeBSD: head/sys/dev/usb/controller/uhci.c 190174 2009-03-20 19:04:31Z thompsa $"); |
30 31/* 32 * USB Universal Host Controller driver. 33 * Handles e.g. PIIX3 and PIIX4. 34 * 35 * UHCI spec: http://developer.intel.com/design/USB/UHCI11D.htm 36 * USB spec: http://www.usb.org/developers/docs/usbspec.zip 37 * PIIXn spec: ftp://download.intel.com/design/intarch/datashts/29055002.pdf 38 * ftp://download.intel.com/design/intarch/datashts/29056201.pdf 39 */ 40 41#include <dev/usb/usb.h> 42#include <dev/usb/usb_mfunc.h> 43#include <dev/usb/usb_error.h> | 30 31/* 32 * USB Universal Host Controller driver. 33 * Handles e.g. PIIX3 and PIIX4. 34 * 35 * UHCI spec: http://developer.intel.com/design/USB/UHCI11D.htm 36 * USB spec: http://www.usb.org/developers/docs/usbspec.zip 37 * PIIXn spec: ftp://download.intel.com/design/intarch/datashts/29055002.pdf 38 * ftp://download.intel.com/design/intarch/datashts/29056201.pdf 39 */ 40 41#include <dev/usb/usb.h> 42#include <dev/usb/usb_mfunc.h> 43#include <dev/usb/usb_error.h> |
44#include <dev/usb/usb_defs.h> | |
45 46#define USB_DEBUG_VAR uhcidebug 47 48#include <dev/usb/usb_core.h> 49#include <dev/usb/usb_debug.h> 50#include <dev/usb/usb_busdma.h> 51#include <dev/usb/usb_process.h> 52#include <dev/usb/usb_sw_transfer.h> --- 2568 unchanged lines hidden (view full) --- 2621 USETW(sc->sc_hub_desc.stat.wStatus, UDS_SELF_POWERED); 2622 break; 2623 case C(UR_GET_STATUS, UT_READ_INTERFACE): 2624 case C(UR_GET_STATUS, UT_READ_ENDPOINT): 2625 std->len = 2; 2626 USETW(sc->sc_hub_desc.stat.wStatus, 0); 2627 break; 2628 case C(UR_SET_ADDRESS, UT_WRITE_DEVICE): | 44 45#define USB_DEBUG_VAR uhcidebug 46 47#include <dev/usb/usb_core.h> 48#include <dev/usb/usb_debug.h> 49#include <dev/usb/usb_busdma.h> 50#include <dev/usb/usb_process.h> 51#include <dev/usb/usb_sw_transfer.h> --- 2568 unchanged lines hidden (view full) --- 2620 USETW(sc->sc_hub_desc.stat.wStatus, UDS_SELF_POWERED); 2621 break; 2622 case C(UR_GET_STATUS, UT_READ_INTERFACE): 2623 case C(UR_GET_STATUS, UT_READ_ENDPOINT): 2624 std->len = 2; 2625 USETW(sc->sc_hub_desc.stat.wStatus, 0); 2626 break; 2627 case C(UR_SET_ADDRESS, UT_WRITE_DEVICE): |
2629 if (value >= USB_MAX_DEVICES) { | 2628 if (value >= UHCI_MAX_DEVICES) { |
2630 std->err = USB_ERR_IOERROR; 2631 goto done; 2632 } 2633 sc->sc_addr = value; 2634 break; 2635 case C(UR_SET_CONFIG, UT_WRITE_DEVICE): 2636 if ((value != 0) && (value != 1)) { 2637 std->err = USB_ERR_IOERROR; --- 721 unchanged lines hidden --- | 2629 std->err = USB_ERR_IOERROR; 2630 goto done; 2631 } 2632 sc->sc_addr = value; 2633 break; 2634 case C(UR_SET_CONFIG, UT_WRITE_DEVICE): 2635 if ((value != 0) && (value != 1)) { 2636 std->err = USB_ERR_IOERROR; --- 721 unchanged lines hidden --- |