usbhid.c (82e38b012cc832651ba195f5443e7f9fb64ce5d3) | usbhid.c (fcca9fd98ce40d586e3b0147ba880b9104589269) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-NetBSD 3 * 4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 5 * Copyright (c) 2019 Vladimir Kondratyev <wulf@FreeBSD.org> 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Lennart Augustsson (lennart@augustsson.net) at --- 55 unchanged lines hidden (view full) --- 64#include <dev/hid/hidquirk.h> 65 66#include <dev/usb/usb.h> 67#include <dev/usb/usbdi.h> 68#include <dev/usb/usbdi_util.h> 69#include <dev/usb/usbhid.h> 70#include <dev/usb/usb_core.h> 71#include <dev/usb/usb_ioctl.h> | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-NetBSD 3 * 4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 5 * Copyright (c) 2019 Vladimir Kondratyev <wulf@FreeBSD.org> 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Lennart Augustsson (lennart@augustsson.net) at --- 55 unchanged lines hidden (view full) --- 64#include <dev/hid/hidquirk.h> 65 66#include <dev/usb/usb.h> 67#include <dev/usb/usbdi.h> 68#include <dev/usb/usbdi_util.h> 69#include <dev/usb/usbhid.h> 70#include <dev/usb/usb_core.h> 71#include <dev/usb/usb_ioctl.h> |
72#include <dev/usb/usb_util.h> |
|
72 73#define USB_DEBUG_VAR usbhid_debug 74#include <dev/usb/usb_debug.h> 75 76#include <dev/usb/quirk/usb_quirk.h> 77 78#include "hid_if.h" 79 --- 609 unchanged lines hidden (view full) --- 689 switch (cmd) { 690 case USB_REQUEST: 691 ucr = (struct usb_ctl_request *)data; 692 req.ctrl = ucr->ucr_request; 693 error = usbhid_xfer_check_len( 694 sc, USBHID_CTRL_DT, UGETW(req.ctrl.wLength)); 695 if (error) 696 break; | 73 74#define USB_DEBUG_VAR usbhid_debug 75#include <dev/usb/usb_debug.h> 76 77#include <dev/usb/quirk/usb_quirk.h> 78 79#include "hid_if.h" 80 --- 609 unchanged lines hidden (view full) --- 690 switch (cmd) { 691 case USB_REQUEST: 692 ucr = (struct usb_ctl_request *)data; 693 req.ctrl = ucr->ucr_request; 694 error = usbhid_xfer_check_len( 695 sc, USBHID_CTRL_DT, UGETW(req.ctrl.wLength)); 696 if (error) 697 break; |
697 | 698 error = usb_check_request(sc->sc_udev, &req.ctrl); 699 if (error) 700 break; |
698 error = usbhid_sync_xfer( 699 sc, USBHID_CTRL_DT, &req, ucr->ucr_data); 700 if (error == 0) 701 ucr->ucr_actlen = UGETW(req.ctrl.wLength); 702 break; 703 default: 704 error = EINVAL; 705 } --- 192 unchanged lines hidden --- | 701 error = usbhid_sync_xfer( 702 sc, USBHID_CTRL_DT, &req, ucr->ucr_data); 703 if (error == 0) 704 ucr->ucr_actlen = UGETW(req.ctrl.wLength); 705 break; 706 default: 707 error = EINVAL; 708 } --- 192 unchanged lines hidden --- |