Put USB ACPI code into own module, uacpi.ko.
The code needs more testing before being enabled by default. Sponsored by: Mellanox Technologies
This commit is contained in:
parent
28262d704c
commit
66028c137a
@ -3221,7 +3221,7 @@ dev/usb/usb_generic.c optional usb
|
||||
dev/usb/usb_handle_request.c optional usb
|
||||
dev/usb/usb_hid.c optional usb
|
||||
dev/usb/usb_hub.c optional usb
|
||||
dev/usb/usb_hub_acpi.c optional usb acpi
|
||||
dev/usb/usb_hub_acpi.c optional uacpi acpi
|
||||
dev/usb/usb_if.m optional usb
|
||||
dev/usb/usb_lookup.c optional usb
|
||||
dev/usb/usb_mbuf.c optional usb
|
||||
|
@ -440,6 +440,10 @@ static driver_t acpi_uhub_root_driver = {
|
||||
.baseclasses = uhub_baseclasses,
|
||||
};
|
||||
|
||||
DRIVER_MODULE(acpi_uhub, uhub, acpi_uhub_driver, uhub_devclass, 0, 0);
|
||||
MODULE_DEPEND(acpi_uhub, acpi, 1, 1, 1);
|
||||
DRIVER_MODULE(acpi_uhub, usbus, acpi_uhub_root_driver, uhub_devclass, 0, 0);
|
||||
DRIVER_MODULE(uacpi, uhub, acpi_uhub_driver, uhub_devclass, 0, 0);
|
||||
DRIVER_MODULE(uacpi, usbus, acpi_uhub_root_driver, uhub_devclass, 0, 0);
|
||||
|
||||
MODULE_DEPEND(uacpi, acpi, 1, 1, 1);
|
||||
MODULE_DEPEND(uacpi, usb, 1, 1, 1);
|
||||
|
||||
MODULE_VERSION(uacpi, 1);
|
||||
|
@ -55,6 +55,7 @@ SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth
|
||||
SUBDIR += muge
|
||||
SUBDIR += ure urndis
|
||||
SUBDIR += usfs umass urio
|
||||
SUBDIR += ${_uacpi}
|
||||
SUBDIR += quirk template
|
||||
SUBDIR += ${_g_audio} ${_g_keyboard} ${_g_modem} ${_g_mouse}
|
||||
|
||||
@ -102,4 +103,9 @@ _avr32dci= avr32dci
|
||||
_saf1761otg= saf1761otg
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
|
||||
${MACHINE_CPUARCH} == "i386"
|
||||
_uacpi= uacpi
|
||||
.endif
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
36
sys/modules/usb/uacpi/Makefile
Normal file
36
sys/modules/usb/uacpi/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Copyright (c) 2019 Hans Petter Selasky. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
.PATH: ${SRCTOP}/sys/dev/usb
|
||||
|
||||
KMOD= uacpi
|
||||
SRCS= bus_if.h device_if.h usb_if.h usb_if.c vnode_if.h \
|
||||
opt_usb.h opt_bus.h opt_ddb.h \
|
||||
opt_acpi.h acpi_if.h \
|
||||
usb_hub_acpi.c
|
||||
|
||||
.include <bsd.kmod.mk>
|
@ -25,9 +25,7 @@
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
S= ${SRCTOP}/sys
|
||||
|
||||
.PATH: $S/dev/usb $S/dev/usb/controller
|
||||
.PATH: ${SRCTOP}/sys/dev/usb ${SRCTOP}/sys/dev/usb/controller
|
||||
|
||||
KMOD= usb
|
||||
SRCS= bus_if.h device_if.h usb_if.h usb_if.c vnode_if.h \
|
||||
@ -39,11 +37,6 @@ SRCS= bus_if.h device_if.h usb_if.h usb_if.c vnode_if.h \
|
||||
usb_msctest.c usb_parse.c usb_pf.c usb_process.c usb_request.c \
|
||||
usb_transfer.c usb_util.c
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
|
||||
${MACHINE_CPUARCH} == "i386"
|
||||
SRCS += opt_acpi.h usb_hub_acpi.c acpi_if.h
|
||||
.endif
|
||||
|
||||
.if !empty(OPT_FDT)
|
||||
SRCS+= usb_fdt_support.c ofw_bus_if.h
|
||||
.endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user