Deleted Added
full compact
ehci.c (189496) ehci.c (190174)
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 189496 2009-03-07 19:49:47Z thompsa $");
47__FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci.c 190174 2009-03-20 19:04:31Z thompsa $");
48
49#include <dev/usb/usb.h>
50#include <dev/usb/usb_mfunc.h>
51#include <dev/usb/usb_error.h>
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
56#include <dev/usb/usb_core.h>
57#include <dev/usb/usb_debug.h>
58#include <dev/usb/usb_busdma.h>
59#include <dev/usb/usb_process.h>
60#include <dev/usb/usb_sw_transfer.h>

--- 3102 unchanged lines hidden (view full) ---

3163 USETW(sc->sc_hub_desc.stat.wStatus, UDS_SELF_POWERED);
3164 break;
3165 case C(UR_GET_STATUS, UT_READ_INTERFACE):
3166 case C(UR_GET_STATUS, UT_READ_ENDPOINT):
3167 std->len = 2;
3168 USETW(sc->sc_hub_desc.stat.wStatus, 0);
3169 break;
3170 case C(UR_SET_ADDRESS, UT_WRITE_DEVICE):
52
53#define USB_DEBUG_VAR ehcidebug
54
55#include <dev/usb/usb_core.h>
56#include <dev/usb/usb_debug.h>
57#include <dev/usb/usb_busdma.h>
58#include <dev/usb/usb_process.h>
59#include <dev/usb/usb_sw_transfer.h>

--- 3102 unchanged lines hidden (view full) ---

3162 USETW(sc->sc_hub_desc.stat.wStatus, UDS_SELF_POWERED);
3163 break;
3164 case C(UR_GET_STATUS, UT_READ_INTERFACE):
3165 case C(UR_GET_STATUS, UT_READ_ENDPOINT):
3166 std->len = 2;
3167 USETW(sc->sc_hub_desc.stat.wStatus, 0);
3168 break;
3169 case C(UR_SET_ADDRESS, UT_WRITE_DEVICE):
3171 if (value >= USB_MAX_DEVICES) {
3170 if (value >= EHCI_MAX_DEVICES) {
3172 std->err = USB_ERR_IOERROR;
3173 goto done;
3174 }
3175 sc->sc_addr = value;
3176 break;
3177 case C(UR_SET_CONFIG, UT_WRITE_DEVICE):
3178 if ((value != 0) && (value != 1)) {
3179 std->err = USB_ERR_IOERROR;

--- 766 unchanged lines hidden ---
3171 std->err = USB_ERR_IOERROR;
3172 goto done;
3173 }
3174 sc->sc_addr = value;
3175 break;
3176 case C(UR_SET_CONFIG, UT_WRITE_DEVICE):
3177 if ((value != 0) && (value != 1)) {
3178 std->err = USB_ERR_IOERROR;

--- 766 unchanged lines hidden ---