Build fixups for the new USB stack.
This commit is contained in:
parent
c89d41e5ff
commit
bf41796c4e
@ -120,10 +120,6 @@
|
||||
..
|
||||
usb
|
||||
..
|
||||
usb2
|
||||
include
|
||||
..
|
||||
..
|
||||
utopia
|
||||
..
|
||||
vkbd
|
||||
|
@ -54,7 +54,7 @@ LSUBDIRS= cam/scsi \
|
||||
security/mac_mls security/mac_partition \
|
||||
ufs/ffs ufs/ufs
|
||||
|
||||
LSUBSUBDIRS= dev/mpt/mpilib dev/usb2/include
|
||||
LSUBSUBDIRS= dev/mpt/mpilib
|
||||
|
||||
.if ${MACHINE_ARCH} == "powerpc"
|
||||
_dev_powermac_nvram= dev/powermac_nvram
|
||||
|
@ -39,11 +39,11 @@
|
||||
#include "libusb20_desc.h"
|
||||
#include "libusb20_int.h"
|
||||
|
||||
#include <dev/usb2/include/usb2_standard.h>
|
||||
#include <dev/usb2/include/usb2_ioctl.h>
|
||||
#include <dev/usb2/include/usb2_mfunc.h>
|
||||
#include <dev/usb2/include/usb2_error.h>
|
||||
#include <dev/usb2/include/usb2_revision.h>
|
||||
#include <dev/usb/usb.h>
|
||||
#include <dev/usb/usb_ioctl.h>
|
||||
#include <dev/usb/usb_mfunc.h>
|
||||
#include <dev/usb/usb_error.h>
|
||||
#include <dev/usb/usb_revision.h>
|
||||
|
||||
static libusb20_init_backend_t ugen20_init_backend;
|
||||
static libusb20_open_device_t ugen20_open_device;
|
||||
|
@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <dev/usb2/include/usb2_ioctl.h>
|
||||
#include <dev/usb/usb_ioctl.h>
|
||||
|
||||
#include "usbhid.h"
|
||||
#include "usbvar.h"
|
||||
@ -49,8 +49,10 @@ hid_set_immed(int fd, int enable)
|
||||
{
|
||||
int ret;
|
||||
ret = ioctl(fd, USB_SET_IMMED, &enable);
|
||||
#ifdef HID_COMPAT7
|
||||
if (ret < 0)
|
||||
ret = hid_set_immed_compat7(fd, enable);
|
||||
#endif
|
||||
return (ret);
|
||||
}
|
||||
|
||||
@ -61,9 +63,11 @@ hid_get_report_id(int fd)
|
||||
int ret;
|
||||
|
||||
ret = ioctl(fd, USB_GET_REPORT_ID, &temp);
|
||||
#ifdef HID_COMPAT7
|
||||
if (ret < 0)
|
||||
ret = hid_get_report_id_compat7(fd);
|
||||
else
|
||||
#endif
|
||||
ret = temp;
|
||||
|
||||
return (ret);
|
||||
@ -81,11 +85,13 @@ hid_get_report_desc(int fd)
|
||||
/* get actual length first */
|
||||
ugd.ugd_data = NULL;
|
||||
ugd.ugd_maxlen = 65535;
|
||||
#ifdef HID_COMPAT7
|
||||
if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
|
||||
/* could not read descriptor */
|
||||
/* try FreeBSD 7 compat code */
|
||||
return (hid_get_report_desc_compat7(fd));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: The kernel will return a failure if
|
||||
|
@ -28,6 +28,7 @@
|
||||
* This file contains fallback-compatibility code for the old FreeBSD
|
||||
* USB stack.
|
||||
*/
|
||||
#ifdef HID_COMPAT7
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
@ -75,3 +76,4 @@ hid_get_report_desc_compat7(int fd)
|
||||
|
||||
return (hid_use_report_desc(rep.ucrd_data, (unsigned int)rep.ucrd_size));
|
||||
}
|
||||
#endif /* HID_COMPAT7 */
|
||||
|
@ -36,6 +36,8 @@ struct report_desc {
|
||||
|
||||
/* internal backwards compatibility functions */
|
||||
|
||||
#ifdef HID_COMPAT7
|
||||
int hid_set_immed_compat7(int fd, int enable);
|
||||
int hid_get_report_id_compat7(int fd);
|
||||
report_desc_t hid_get_report_desc_compat7(int fd);
|
||||
#endif
|
||||
|
@ -232,8 +232,6 @@ see
|
||||
.Xr ppbus 4
|
||||
.It Pa usb/
|
||||
The USB subsystem
|
||||
.It Pa usb2/include
|
||||
The USB subsystem
|
||||
.It Pa utopia/
|
||||
Physical chip driver for ATM interfaces;
|
||||
see
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <dev/usb2/include/usb2_hid.h>
|
||||
#include <dev/usb/usbhid.h>
|
||||
#include <usbhid.h>
|
||||
#include <syslog.h>
|
||||
#include <signal.h>
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <usbhid.h>
|
||||
#include <dev/usb2/include/usb2_hid.h>
|
||||
#include <dev/usb/usbhid.h>
|
||||
|
||||
int verbose = 0;
|
||||
int all = 0;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <dev/usb/usb.h>
|
||||
#include <dev/usb/usb_ioctl.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <netgraph.h>
|
||||
|
Loading…
Reference in New Issue
Block a user