summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-09 14:02:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 10:29:38 +0200
commitbb80d9df8bac71eedee1a6787ca63aef972a7e48 (patch)
tree1b5cb9443c5ead5706c35afb618abbbd1592315e /freebsd/sys/dev
parentUpdate to FreeBSD head 2017-10-01 (diff)
downloadrtems-libbsd-bb80d9df8bac71eedee1a6787ca63aef972a7e48.tar.bz2
Update to FreeBSD head 2017-12-01
Git mirror commit e724f51f811a4b2bd29447f8b85ab5c2f9b88266. Update #3472.
Diffstat (limited to 'freebsd/sys/dev')
-rw-r--r--freebsd/sys/dev/bce/if_bce.c2
-rw-r--r--freebsd/sys/dev/bce/if_bcefw.h2
-rw-r--r--freebsd/sys/dev/bce/if_bcereg.h2
-rw-r--r--freebsd/sys/dev/bfe/if_bfe.c2
-rw-r--r--freebsd/sys/dev/bfe/if_bfereg.h2
-rw-r--r--freebsd/sys/dev/bge/if_bge.c2
-rw-r--r--freebsd/sys/dev/bge/if_bgereg.h2
-rw-r--r--freebsd/sys/dev/cadence/if_cgem.c2
-rw-r--r--freebsd/sys/dev/cadence/if_cgem_hw.h2
-rw-r--r--freebsd/sys/dev/dc/dcphy.c2
-rw-r--r--freebsd/sys/dev/dc/if_dc.c2
-rw-r--r--freebsd/sys/dev/dc/if_dcreg.h2
-rw-r--r--freebsd/sys/dev/dc/pnphy.c2
-rw-r--r--freebsd/sys/dev/e1000/e1000_80003es2lan.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_80003es2lan.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82540.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82541.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82541.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82542.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82543.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82543.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82571.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82571.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82575.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_82575.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_api.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_api.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_defines.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_hw.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_i210.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_i210.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_ich8lan.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_ich8lan.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_mac.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_mac.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_manage.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_manage.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_mbx.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_mbx.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_nvm.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_nvm.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_osdep.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_osdep.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_phy.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_phy.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_regs.h1
-rw-r--r--freebsd/sys/dev/e1000/e1000_vf.c1
-rw-r--r--freebsd/sys/dev/e1000/e1000_vf.h1
-rw-r--r--freebsd/sys/dev/e1000/if_em.c6
-rw-r--r--freebsd/sys/dev/e1000/if_em.h2
-rw-r--r--freebsd/sys/dev/evdev/evdev.c14
-rw-r--r--freebsd/sys/dev/evdev/evdev.h2
-rw-r--r--freebsd/sys/dev/evdev/evdev_utils.c19
-rw-r--r--freebsd/sys/dev/fdt/fdt_common.c2
-rw-r--r--freebsd/sys/dev/fdt/fdt_common.h2
-rw-r--r--freebsd/sys/dev/fdt/simplebus.c2
-rw-r--r--freebsd/sys/dev/ffec/if_ffec.c158
-rw-r--r--freebsd/sys/dev/ffec/if_ffecreg.h2
-rw-r--r--freebsd/sys/dev/fxp/if_fxp.c2
-rw-r--r--freebsd/sys/dev/fxp/if_fxpreg.h2
-rw-r--r--freebsd/sys/dev/fxp/if_fxpvar.h2
-rw-r--r--freebsd/sys/dev/fxp/rcvbundl.h2
-rw-r--r--freebsd/sys/dev/gpio/gpiobus.c2
-rw-r--r--freebsd/sys/dev/gpio/gpiobusvar.h2
-rw-r--r--freebsd/sys/dev/gpio/ofw_gpiobus.c2
-rw-r--r--freebsd/sys/dev/kbd/kbd.c2
-rw-r--r--freebsd/sys/dev/kbd/kbdreg.h2
-rw-r--r--freebsd/sys/dev/kbd/kbdtables.h2
-rw-r--r--freebsd/sys/dev/led/led.c2
-rw-r--r--freebsd/sys/dev/mii/brgphy.c2
-rw-r--r--freebsd/sys/dev/mii/brgphyreg.h2
-rw-r--r--freebsd/sys/dev/mii/e1000phy.c2
-rw-r--r--freebsd/sys/dev/mii/e1000phyreg.h2
-rwxr-xr-xfreebsd/sys/dev/mii/icsphy.c2
-rw-r--r--freebsd/sys/dev/mii/icsphyreg.h2
-rw-r--r--freebsd/sys/dev/mii/mii.c2
-rw-r--r--freebsd/sys/dev/mii/mii.h2
-rw-r--r--freebsd/sys/dev/mii/mii_bitbang.c2
-rw-r--r--freebsd/sys/dev/mii/mii_bitbang.h2
-rw-r--r--freebsd/sys/dev/mii/mii_physubr.c2
-rw-r--r--freebsd/sys/dev/mii/miivar.h2
-rw-r--r--freebsd/sys/dev/mii/rgephy.c2
-rw-r--r--freebsd/sys/dev/mii/rgephyreg.h2
-rw-r--r--freebsd/sys/dev/mii/ukphy.c2
-rw-r--r--freebsd/sys/dev/mii/ukphy_subr.c2
-rw-r--r--freebsd/sys/dev/mmc/bridge.h2
-rw-r--r--freebsd/sys/dev/mmc/mmc.c2
-rw-r--r--freebsd/sys/dev/mmc/mmcbrvar.h2
-rw-r--r--freebsd/sys/dev/mmc/mmcreg.h2
-rw-r--r--freebsd/sys/dev/mmc/mmcsd.c4
-rw-r--r--freebsd/sys/dev/mmc/mmcvar.h2
-rw-r--r--freebsd/sys/dev/nvme/nvme.h19
-rw-r--r--freebsd/sys/dev/ofw/ofw_bus.h2
-rw-r--r--freebsd/sys/dev/ofw/ofw_bus_subr.c2
-rw-r--r--freebsd/sys/dev/ofw/ofw_bus_subr.h4
-rw-r--r--freebsd/sys/dev/ofw/ofw_fdt.c2
-rw-r--r--freebsd/sys/dev/ofw/ofw_pci.h2
-rw-r--r--freebsd/sys/dev/ofw/ofwvar.h2
-rw-r--r--freebsd/sys/dev/ofw/openfirm.c8
-rw-r--r--freebsd/sys/dev/ofw/openfirm.h2
-rw-r--r--freebsd/sys/dev/pci/pci.c23
-rw-r--r--freebsd/sys/dev/pci/pci_pci.c2
-rw-r--r--freebsd/sys/dev/pci/pci_private.h2
-rw-r--r--freebsd/sys/dev/pci/pci_user.c2
-rw-r--r--freebsd/sys/dev/pci/pcib_private.h2
-rw-r--r--freebsd/sys/dev/pci/pcireg.h2
-rw-r--r--freebsd/sys/dev/pci/pcivar.h2
-rw-r--r--freebsd/sys/dev/re/if_re.c2
-rw-r--r--freebsd/sys/dev/rtwn/usb/rtwn_usb_attach.h2
-rw-r--r--freebsd/sys/dev/sdhci/sdhci.c2
-rw-r--r--freebsd/sys/dev/sdhci/sdhci.h2
-rw-r--r--freebsd/sys/dev/smc/if_smc.c2
-rw-r--r--freebsd/sys/dev/smc/if_smcreg.h2
-rw-r--r--freebsd/sys/dev/smc/if_smcvar.h2
-rw-r--r--freebsd/sys/dev/tsec/if_tsec.c2
-rw-r--r--freebsd/sys/dev/tsec/if_tsec.h2
-rw-r--r--freebsd/sys/dev/tsec/if_tsec_fdt.c2
-rw-r--r--freebsd/sys/dev/tsec/if_tsecreg.h2
-rw-r--r--freebsd/sys/dev/usb/controller/dwc_otg.c2
-rw-r--r--freebsd/sys/dev/usb/controller/dwc_otg.h2
-rw-r--r--freebsd/sys/dev/usb/controller/dwc_otg_fdt.c2
-rw-r--r--freebsd/sys/dev/usb/controller/dwc_otgreg.h2
-rw-r--r--freebsd/sys/dev/usb/controller/ehci.c2
-rw-r--r--freebsd/sys/dev/usb/controller/ehci.h2
-rw-r--r--freebsd/sys/dev/usb/controller/ehcireg.h2
-rw-r--r--freebsd/sys/dev/usb/controller/musb_otg.c2
-rw-r--r--freebsd/sys/dev/usb/controller/musb_otg.h2
-rw-r--r--freebsd/sys/dev/usb/controller/ohci.c2
-rwxr-xr-xfreebsd/sys/dev/usb/controller/ohci.h2
-rw-r--r--freebsd/sys/dev/usb/controller/ohcireg.h2
-rw-r--r--freebsd/sys/dev/usb/controller/uhcireg.h2
-rw-r--r--freebsd/sys/dev/usb/controller/usb_controller.c2
-rw-r--r--freebsd/sys/dev/usb/controller/xhcireg.h2
-rw-r--r--freebsd/sys/dev/usb/input/atp.c2
-rw-r--r--freebsd/sys/dev/usb/input/uep.c2
-rw-r--r--freebsd/sys/dev/usb/input/uhid.c2
-rw-r--r--freebsd/sys/dev/usb/input/ukbd.c2
-rw-r--r--freebsd/sys/dev/usb/input/ums.c8
-rw-r--r--freebsd/sys/dev/usb/input/usb_rdesc.h2
-rw-r--r--freebsd/sys/dev/usb/input/wsp.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_aue.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_auereg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_axe.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_axereg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_axge.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_axgereg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_cdce.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_cdcereg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_cue.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_cuereg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_ipheth.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_iphethvar.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_kue.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_kuefw.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_kuereg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_mos.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_mosreg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_rue.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_ruereg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_smsc.c69
-rw-r--r--freebsd/sys/dev/usb/net/if_smscreg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_udav.c2
-rw-r--r--freebsd/sys/dev/usb/net/if_udavreg.h2
-rw-r--r--freebsd/sys/dev/usb/net/if_ure.c1
-rw-r--r--freebsd/sys/dev/usb/net/ruephy.c2
-rw-r--r--freebsd/sys/dev/usb/net/ruephyreg.h2
-rw-r--r--freebsd/sys/dev/usb/net/usb_ethernet.c2
-rw-r--r--freebsd/sys/dev/usb/net/usb_ethernet.h2
-rw-r--r--freebsd/sys/dev/usb/quirk/usb_quirk.c2
-rw-r--r--freebsd/sys/dev/usb/quirk/usb_quirk.h2
-rw-r--r--freebsd/sys/dev/usb/serial/u3g.c2
-rw-r--r--freebsd/sys/dev/usb/serial/ubsa.c2
-rw-r--r--freebsd/sys/dev/usb/serial/ubser.c2
-rw-r--r--freebsd/sys/dev/usb/serial/uchcom.c2
-rw-r--r--freebsd/sys/dev/usb/serial/ucycom.c2
-rw-r--r--freebsd/sys/dev/usb/serial/ufoma.c2
-rw-r--r--freebsd/sys/dev/usb/serial/uftdi.c2
-rw-r--r--freebsd/sys/dev/usb/serial/ugensa.c4
-rw-r--r--freebsd/sys/dev/usb/serial/uipaq.c4
-rw-r--r--freebsd/sys/dev/usb/serial/ulpt.c2
-rw-r--r--freebsd/sys/dev/usb/serial/umcs.c2
-rw-r--r--freebsd/sys/dev/usb/serial/umcs.h2
-rw-r--r--freebsd/sys/dev/usb/serial/umct.c2
-rw-r--r--freebsd/sys/dev/usb/serial/umodem.c2
-rw-r--r--freebsd/sys/dev/usb/serial/uplcom.c2
-rw-r--r--freebsd/sys/dev/usb/serial/usb_serial.c2
-rw-r--r--freebsd/sys/dev/usb/serial/usb_serial.h2
-rw-r--r--freebsd/sys/dev/usb/serial/uvisor.c2
-rw-r--r--freebsd/sys/dev/usb/serial/uvscom.c2
-rw-r--r--freebsd/sys/dev/usb/storage/umass.c2
-rw-r--r--freebsd/sys/dev/usb/ufm_ioctl.h2
-rw-r--r--freebsd/sys/dev/usb/usb.h2
-rw-r--r--freebsd/sys/dev/usb/usb_bus.h2
-rw-r--r--freebsd/sys/dev/usb/usb_busdma.c2
-rw-r--r--freebsd/sys/dev/usb/usb_busdma.h2
-rw-r--r--freebsd/sys/dev/usb/usb_cdc.h2
-rw-r--r--freebsd/sys/dev/usb/usb_controller.h2
-rw-r--r--freebsd/sys/dev/usb/usb_core.c2
-rw-r--r--freebsd/sys/dev/usb/usb_core.h2
-rw-r--r--freebsd/sys/dev/usb/usb_debug.c2
-rw-r--r--freebsd/sys/dev/usb/usb_debug.h2
-rw-r--r--freebsd/sys/dev/usb/usb_dev.c2
-rw-r--r--freebsd/sys/dev/usb/usb_dev.h2
-rw-r--r--freebsd/sys/dev/usb/usb_device.c2
-rw-r--r--freebsd/sys/dev/usb/usb_device.h2
-rw-r--r--freebsd/sys/dev/usb/usb_dynamic.c2
-rw-r--r--freebsd/sys/dev/usb/usb_dynamic.h2
-rw-r--r--freebsd/sys/dev/usb/usb_endian.h2
-rw-r--r--freebsd/sys/dev/usb/usb_error.c2
-rw-r--r--freebsd/sys/dev/usb/usb_freebsd.h2
-rw-r--r--freebsd/sys/dev/usb/usb_generic.c2
-rw-r--r--freebsd/sys/dev/usb/usb_generic.h2
-rw-r--r--freebsd/sys/dev/usb/usb_handle_request.c2
-rw-r--r--freebsd/sys/dev/usb/usb_hid.c2
-rw-r--r--freebsd/sys/dev/usb/usb_hub.c2
-rw-r--r--freebsd/sys/dev/usb/usb_hub.h2
-rw-r--r--freebsd/sys/dev/usb/usb_ioctl.h2
-rw-r--r--freebsd/sys/dev/usb/usb_lookup.c2
-rw-r--r--freebsd/sys/dev/usb/usb_mbuf.c2
-rw-r--r--freebsd/sys/dev/usb/usb_mbuf.h2
-rw-r--r--freebsd/sys/dev/usb/usb_msctest.c2
-rw-r--r--freebsd/sys/dev/usb/usb_msctest.h2
-rw-r--r--freebsd/sys/dev/usb/usb_parse.c2
-rw-r--r--freebsd/sys/dev/usb/usb_pf.h2
-rw-r--r--freebsd/sys/dev/usb/usb_process.c2
-rw-r--r--freebsd/sys/dev/usb/usb_process.h2
-rw-r--r--freebsd/sys/dev/usb/usb_request.c2
-rw-r--r--freebsd/sys/dev/usb/usb_request.h2
-rw-r--r--freebsd/sys/dev/usb/usb_transfer.c2
-rw-r--r--freebsd/sys/dev/usb/usb_transfer.h2
-rw-r--r--freebsd/sys/dev/usb/usb_util.c2
-rw-r--r--freebsd/sys/dev/usb/usb_util.h2
-rw-r--r--freebsd/sys/dev/usb/usbdi.h2
-rw-r--r--freebsd/sys/dev/usb/usbdi_util.h2
-rw-r--r--freebsd/sys/dev/usb/usbhid.h2
-rw-r--r--freebsd/sys/dev/usb/wlan/if_rsu.c118
-rw-r--r--freebsd/sys/dev/usb/wlan/if_uath.c2
-rw-r--r--freebsd/sys/dev/usb/wlan/if_zydfw.h2
238 files changed, 650 insertions, 220 deletions
diff --git a/freebsd/sys/dev/bce/if_bce.c b/freebsd/sys/dev/bce/if_bce.c
index 5901c472..a2e4c804 100644
--- a/freebsd/sys/dev/bce/if_bce.c
+++ b/freebsd/sys/dev/bce/if_bce.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
* Copyright (c) 2006-2014 QLogic Corporation
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/bce/if_bcefw.h b/freebsd/sys/dev/bce/if_bcefw.h
index cae01fea..4ba86701 100644
--- a/freebsd/sys/dev/bce/if_bcefw.h
+++ b/freebsd/sys/dev/bce/if_bcefw.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
* Copyright (c) 2006-2014 QLogic Corporation
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/bce/if_bcereg.h b/freebsd/sys/dev/bce/if_bcereg.h
index 2f166ead..d9bd23cc 100644
--- a/freebsd/sys/dev/bce/if_bcereg.h
+++ b/freebsd/sys/dev/bce/if_bcereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 2006-2014 QLogic Corporation
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/bfe/if_bfe.c b/freebsd/sys/dev/bfe/if_bfe.c
index c0bd4b26..63825a99 100644
--- a/freebsd/sys/dev/bfe/if_bfe.c
+++ b/freebsd/sys/dev/bfe/if_bfe.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2003 Stuart Walsh<stu@ipng.org.uk>
* and Duncan Barclay<dmlb@dmlb.org>
*
diff --git a/freebsd/sys/dev/bfe/if_bfereg.h b/freebsd/sys/dev/bfe/if_bfereg.h
index b50627ed..668d2604 100644
--- a/freebsd/sys/dev/bfe/if_bfereg.h
+++ b/freebsd/sys/dev/bfe/if_bfereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2003 Stuart Walsh
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/bge/if_bge.c b/freebsd/sys/dev/bge/if_bge.c
index fad66e1e..956ee52f 100644
--- a/freebsd/sys/dev/bge/if_bge.c
+++ b/freebsd/sys/dev/bge/if_bge.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2001
* Bill Paul <wpaul@windriver.com>. All rights reserved.
diff --git a/freebsd/sys/dev/bge/if_bgereg.h b/freebsd/sys/dev/bge/if_bgereg.h
index 0cf9ca18..eb7686e7 100644
--- a/freebsd/sys/dev/bge/if_bgereg.h
+++ b/freebsd/sys/dev/bge/if_bgereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2001
* Bill Paul <wpaul@windriver.com>. All rights reserved.
diff --git a/freebsd/sys/dev/cadence/if_cgem.c b/freebsd/sys/dev/cadence/if_cgem.c
index 4f4114cf..42fd4213 100644
--- a/freebsd/sys/dev/cadence/if_cgem.c
+++ b/freebsd/sys/dev/cadence/if_cgem.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2012-2014 Thomas Skibo <thomasskibo@yahoo.com>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/cadence/if_cgem_hw.h b/freebsd/sys/dev/cadence/if_cgem_hw.h
index 30fb6dd3..1569857d 100644
--- a/freebsd/sys/dev/cadence/if_cgem_hw.h
+++ b/freebsd/sys/dev/cadence/if_cgem_hw.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2012-2013 Thomas Skibo
* All rights reserved.
*
diff --git a/freebsd/sys/dev/dc/dcphy.c b/freebsd/sys/dev/dc/dcphy.c
index 35ab0353..de8fec09 100644
--- a/freebsd/sys/dev/dc/dcphy.c
+++ b/freebsd/sys/dev/dc/dcphy.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/dc/if_dc.c b/freebsd/sys/dev/dc/if_dc.c
index a0efd5ba..3339b83d 100644
--- a/freebsd/sys/dev/dc/if_dc.c
+++ b/freebsd/sys/dev/dc/if_dc.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/dc/if_dcreg.h b/freebsd/sys/dev/dc/if_dcreg.h
index e290881f..9ae26cc6 100644
--- a/freebsd/sys/dev/dc/if_dcreg.h
+++ b/freebsd/sys/dev/dc/if_dcreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/dc/pnphy.c b/freebsd/sys/dev/dc/pnphy.c
index 9848b461..c6f191fa 100644
--- a/freebsd/sys/dev/dc/pnphy.c
+++ b/freebsd/sys/dev/dc/pnphy.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/e1000/e1000_80003es2lan.c b/freebsd/sys/dev/e1000/e1000_80003es2lan.c
index bd666441..50175d2a 100644
--- a/freebsd/sys/dev/e1000/e1000_80003es2lan.c
+++ b/freebsd/sys/dev/e1000/e1000_80003es2lan.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_80003es2lan.h b/freebsd/sys/dev/e1000/e1000_80003es2lan.h
index 89b15512..cbf0eafa 100644
--- a/freebsd/sys/dev/e1000/e1000_80003es2lan.h
+++ b/freebsd/sys/dev/e1000/e1000_80003es2lan.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82540.c b/freebsd/sys/dev/e1000/e1000_82540.c
index e6311762..1243bdab 100644
--- a/freebsd/sys/dev/e1000/e1000_82540.c
+++ b/freebsd/sys/dev/e1000/e1000_82540.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82541.c b/freebsd/sys/dev/e1000/e1000_82541.c
index 770b3b7b..b6830b98 100644
--- a/freebsd/sys/dev/e1000/e1000_82541.c
+++ b/freebsd/sys/dev/e1000/e1000_82541.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82541.h b/freebsd/sys/dev/e1000/e1000_82541.h
index 7a01fd43..ce29548a 100644
--- a/freebsd/sys/dev/e1000/e1000_82541.h
+++ b/freebsd/sys/dev/e1000/e1000_82541.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82542.c b/freebsd/sys/dev/e1000/e1000_82542.c
index a21fec73..7bbcaead 100644
--- a/freebsd/sys/dev/e1000/e1000_82542.c
+++ b/freebsd/sys/dev/e1000/e1000_82542.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82543.c b/freebsd/sys/dev/e1000/e1000_82543.c
index 4930fc95..dbaa4a6e 100644
--- a/freebsd/sys/dev/e1000/e1000_82543.c
+++ b/freebsd/sys/dev/e1000/e1000_82543.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82543.h b/freebsd/sys/dev/e1000/e1000_82543.h
index e8edda5d..98289524 100644
--- a/freebsd/sys/dev/e1000/e1000_82543.h
+++ b/freebsd/sys/dev/e1000/e1000_82543.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82571.c b/freebsd/sys/dev/e1000/e1000_82571.c
index 2b72489a..fdef7284 100644
--- a/freebsd/sys/dev/e1000/e1000_82571.c
+++ b/freebsd/sys/dev/e1000/e1000_82571.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82571.h b/freebsd/sys/dev/e1000/e1000_82571.h
index 8e5ca56a..a39f63c5 100644
--- a/freebsd/sys/dev/e1000/e1000_82571.h
+++ b/freebsd/sys/dev/e1000/e1000_82571.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82575.c b/freebsd/sys/dev/e1000/e1000_82575.c
index ebf8371c..9958d98c 100644
--- a/freebsd/sys/dev/e1000/e1000_82575.c
+++ b/freebsd/sys/dev/e1000/e1000_82575.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_82575.h b/freebsd/sys/dev/e1000/e1000_82575.h
index f8179560..7e127ed7 100644
--- a/freebsd/sys/dev/e1000/e1000_82575.h
+++ b/freebsd/sys/dev/e1000/e1000_82575.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_api.c b/freebsd/sys/dev/e1000/e1000_api.c
index 829e7be0..393a22e2 100644
--- a/freebsd/sys/dev/e1000/e1000_api.c
+++ b/freebsd/sys/dev/e1000/e1000_api.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_api.h b/freebsd/sys/dev/e1000/e1000_api.h
index 074197bf..bf5f637c 100644
--- a/freebsd/sys/dev/e1000/e1000_api.h
+++ b/freebsd/sys/dev/e1000/e1000_api.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_defines.h b/freebsd/sys/dev/e1000/e1000_defines.h
index 4c2b0903..db7659e8 100644
--- a/freebsd/sys/dev/e1000/e1000_defines.h
+++ b/freebsd/sys/dev/e1000/e1000_defines.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_hw.h b/freebsd/sys/dev/e1000/e1000_hw.h
index e1464a7b..82e783fe 100644
--- a/freebsd/sys/dev/e1000/e1000_hw.h
+++ b/freebsd/sys/dev/e1000/e1000_hw.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_i210.c b/freebsd/sys/dev/e1000/e1000_i210.c
index 8f427b9a..5f09e4d2 100644
--- a/freebsd/sys/dev/e1000/e1000_i210.c
+++ b/freebsd/sys/dev/e1000/e1000_i210.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_i210.h b/freebsd/sys/dev/e1000/e1000_i210.h
index f940915b..c08a0dd7 100644
--- a/freebsd/sys/dev/e1000/e1000_i210.h
+++ b/freebsd/sys/dev/e1000/e1000_i210.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_ich8lan.c b/freebsd/sys/dev/e1000/e1000_ich8lan.c
index a620d126..b78b7283 100644
--- a/freebsd/sys/dev/e1000/e1000_ich8lan.c
+++ b/freebsd/sys/dev/e1000/e1000_ich8lan.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_ich8lan.h b/freebsd/sys/dev/e1000/e1000_ich8lan.h
index 6d812911..d61f4df8 100644
--- a/freebsd/sys/dev/e1000/e1000_ich8lan.h
+++ b/freebsd/sys/dev/e1000/e1000_ich8lan.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_mac.c b/freebsd/sys/dev/e1000/e1000_mac.c
index 2af37399..581659be 100644
--- a/freebsd/sys/dev/e1000/e1000_mac.c
+++ b/freebsd/sys/dev/e1000/e1000_mac.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_mac.h b/freebsd/sys/dev/e1000/e1000_mac.h
index ef9789bb..cb8da246 100644
--- a/freebsd/sys/dev/e1000/e1000_mac.h
+++ b/freebsd/sys/dev/e1000/e1000_mac.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_manage.c b/freebsd/sys/dev/e1000/e1000_manage.c
index 82456912..9f9ab336 100644
--- a/freebsd/sys/dev/e1000/e1000_manage.c
+++ b/freebsd/sys/dev/e1000/e1000_manage.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_manage.h b/freebsd/sys/dev/e1000/e1000_manage.h
index 303e99e3..2ef2e3a4 100644
--- a/freebsd/sys/dev/e1000/e1000_manage.h
+++ b/freebsd/sys/dev/e1000/e1000_manage.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_mbx.c b/freebsd/sys/dev/e1000/e1000_mbx.c
index 0c6bb2c2..dc1482da 100644
--- a/freebsd/sys/dev/e1000/e1000_mbx.c
+++ b/freebsd/sys/dev/e1000/e1000_mbx.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_mbx.h b/freebsd/sys/dev/e1000/e1000_mbx.h
index fadd8494..f0b21992 100644
--- a/freebsd/sys/dev/e1000/e1000_mbx.h
+++ b/freebsd/sys/dev/e1000/e1000_mbx.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_nvm.c b/freebsd/sys/dev/e1000/e1000_nvm.c
index a1e881ad..98cc0c98 100644
--- a/freebsd/sys/dev/e1000/e1000_nvm.c
+++ b/freebsd/sys/dev/e1000/e1000_nvm.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_nvm.h b/freebsd/sys/dev/e1000/e1000_nvm.h
index 64a4083e..4f40f9ae 100644
--- a/freebsd/sys/dev/e1000/e1000_nvm.h
+++ b/freebsd/sys/dev/e1000/e1000_nvm.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_osdep.c b/freebsd/sys/dev/e1000/e1000_osdep.c
index 45aae330..2e8dca62 100644
--- a/freebsd/sys/dev/e1000/e1000_osdep.c
+++ b/freebsd/sys/dev/e1000/e1000_osdep.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_osdep.h b/freebsd/sys/dev/e1000/e1000_osdep.h
index c7c23e58..d9f956f3 100644
--- a/freebsd/sys/dev/e1000/e1000_osdep.h
+++ b/freebsd/sys/dev/e1000/e1000_osdep.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_phy.c b/freebsd/sys/dev/e1000/e1000_phy.c
index 87753e19..c656a6f1 100644
--- a/freebsd/sys/dev/e1000/e1000_phy.c
+++ b/freebsd/sys/dev/e1000/e1000_phy.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_phy.h b/freebsd/sys/dev/e1000/e1000_phy.h
index d3d563f7..6d0687fc 100644
--- a/freebsd/sys/dev/e1000/e1000_phy.h
+++ b/freebsd/sys/dev/e1000/e1000_phy.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_regs.h b/freebsd/sys/dev/e1000/e1000_regs.h
index 37d70172..d9949817 100644
--- a/freebsd/sys/dev/e1000/e1000_regs.h
+++ b/freebsd/sys/dev/e1000/e1000_regs.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_vf.c b/freebsd/sys/dev/e1000/e1000_vf.c
index 0e46641e..26f266e6 100644
--- a/freebsd/sys/dev/e1000/e1000_vf.c
+++ b/freebsd/sys/dev/e1000/e1000_vf.c
@@ -1,6 +1,7 @@
#include <machine/rtems-bsd-kernel-space.h>
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/e1000_vf.h b/freebsd/sys/dev/e1000/e1000_vf.h
index e6f834e7..9c76b632 100644
--- a/freebsd/sys/dev/e1000/e1000_vf.h
+++ b/freebsd/sys/dev/e1000/e1000_vf.h
@@ -1,4 +1,5 @@
/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/e1000/if_em.c b/freebsd/sys/dev/e1000/if_em.c
index dba6ef0a..07acaad9 100644
--- a/freebsd/sys/dev/e1000/if_em.c
+++ b/freebsd/sys/dev/e1000/if_em.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
* Copyright (c) 2016 Matt Macy <mmacy@nextbsd.org>
* All rights reserved.
*
@@ -1956,7 +1958,9 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix)
rid = vector + 1;
snprintf(buf, sizeof(buf), "txq%d", i);
tx_que = &adapter->tx_queues[i];
- iflib_softirq_alloc_generic(ctx, rid, IFLIB_INTR_TX, tx_que, tx_que->me, buf);
+ iflib_softirq_alloc_generic(ctx,
+ &adapter->rx_queues[i % adapter->rx_num_queues].que_irq,
+ IFLIB_INTR_TX, tx_que, tx_que->me, buf);
tx_que->msix = (vector % adapter->tx_num_queues);
diff --git a/freebsd/sys/dev/e1000/if_em.h b/freebsd/sys/dev/e1000/if_em.h
index b7599291..4f9d34b8 100644
--- a/freebsd/sys/dev/e1000/if_em.h
+++ b/freebsd/sys/dev/e1000/if_em.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
* Copyright (c) 2016 Matt Macy <mmacy@nextbsd.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/evdev/evdev.c b/freebsd/sys/dev/evdev/evdev.c
index b3c786a5..6c2976d7 100644
--- a/freebsd/sys/dev/evdev/evdev.c
+++ b/freebsd/sys/dev/evdev/evdev.c
@@ -52,6 +52,9 @@
#ifdef FEATURE
FEATURE(evdev, "Input event devices support");
+#ifdef EVDEV_SUPPORT
+FEATURE(evdev_support, "Evdev support in hybrid drivers");
+#endif
#endif
enum evdev_sparse_result
@@ -70,12 +73,14 @@ int evdev_rcpt_mask = EVDEV_RCPT_HW_MOUSE | EVDEV_RCPT_HW_KBD;
#endif /* __rtems__ */
int evdev_sysmouse_t_axis = 0;
+#ifdef EVDEV_SUPPORT
SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW, 0, "Evdev args");
SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0,
"Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, "
"bit2 - mouse hardware, bit3 - keyboard hardware");
SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RW,
&evdev_sysmouse_t_axis, 0, "Extract T-axis from 0-none, 1-ums, 2-psm");
+#endif
static void evdev_start_repeat(struct evdev_dev *, uint16_t);
static void evdev_stop_repeat(struct evdev_dev *);
@@ -583,7 +588,8 @@ evdev_modify_event(struct evdev_dev *evdev, uint16_t type, uint16_t code,
*value = KEY_EVENT_REPEAT;
} else {
/* Start/stop callout for evdev repeats */
- if (bit_test(evdev->ev_key_states, code) == !*value) {
+ if (bit_test(evdev->ev_key_states, code) == !*value &&
+ !LIST_EMPTY(&evdev->ev_clients)) {
if (*value == KEY_EVENT_DOWN)
evdev_start_repeat(evdev, code);
else
@@ -638,8 +644,6 @@ evdev_sparse_event(struct evdev_dev *evdev, uint16_t type, uint16_t code,
break;
case EV_SND:
- if (bit_test(evdev->ev_snd_states, code) == value)
- return (EV_SKIP_EVENT);
bit_change(evdev->ev_snd_states, code, value);
break;
@@ -817,7 +821,11 @@ evdev_inject_event(struct evdev_dev *evdev, uint16_t type, uint16_t code,
case EV_ABS:
case EV_SW:
push:
+ if (evdev->ev_lock_type != EV_LOCK_INTERNAL)
+ EVDEV_LOCK(evdev);
ret = evdev_push_event(evdev, type, code, value);
+ if (evdev->ev_lock_type != EV_LOCK_INTERNAL)
+ EVDEV_UNLOCK(evdev);
break;
default:
diff --git a/freebsd/sys/dev/evdev/evdev.h b/freebsd/sys/dev/evdev/evdev.h
index 946913c4..31f0c2c3 100644
--- a/freebsd/sys/dev/evdev/evdev.h
+++ b/freebsd/sys/dev/evdev/evdev.h
@@ -197,7 +197,7 @@ static __inline int
evdev_push_snd(struct evdev_dev *evdev, uint16_t code, int32_t value)
{
- return (evdev_push_event(evdev, EV_SND, code, value != 0));
+ return (evdev_push_event(evdev, EV_SND, code, value));
}
static __inline int
diff --git a/freebsd/sys/dev/evdev/evdev_utils.c b/freebsd/sys/dev/evdev/evdev_utils.c
index caf81a46..9814ffeb 100644
--- a/freebsd/sys/dev/evdev/evdev_utils.c
+++ b/freebsd/sys/dev/evdev/evdev_utils.c
@@ -34,7 +34,9 @@
#include <sys/conf.h>
#include <sys/kbio.h>
#include <sys/kernel.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/systm.h>
#include <dev/evdev/evdev.h>
@@ -64,7 +66,7 @@ static uint16_t evdev_usb_scancodes[256] = {
KEY_PAUSE, KEY_INSERT, KEY_HOME, KEY_PAGEUP,
KEY_DELETE, KEY_END, KEY_PAGEDOWN, KEY_RIGHT,
KEY_LEFT, KEY_DOWN, KEY_UP, KEY_NUMLOCK,
- KEY_SLASH, KEY_KPASTERISK, KEY_KPMINUS, KEY_KPPLUS,
+ KEY_KPSLASH, KEY_KPASTERISK, KEY_KPMINUS, KEY_KPPLUS,
KEY_KPENTER, KEY_KP1, KEY_KP2, KEY_KP3,
KEY_KP4, KEY_KP5, KEY_KP6, KEY_KP7,
/* 0x60 - 0x7f */
@@ -131,7 +133,7 @@ static uint16_t evdev_at_set1_scancodes[] = {
KEY_APOSTROPHE, KEY_GRAVE, KEY_LEFTSHIFT, KEY_BACKSLASH,
KEY_Z, KEY_X, KEY_C, KEY_V,
KEY_B, KEY_N, KEY_M, KEY_COMMA,
- KEY_DOT, KEY_SLASH, KEY_RIGHTSHIFT, NONE,
+ KEY_DOT, KEY_SLASH, KEY_RIGHTSHIFT, KEY_KPASTERISK,
KEY_LEFTALT, KEY_SPACE, KEY_CAPSLOCK, KEY_F1,
KEY_F2, KEY_F3, KEY_F4, KEY_F5,
/* 0x40 - 0x5f */
@@ -140,7 +142,7 @@ static uint16_t evdev_at_set1_scancodes[] = {
KEY_KP8, KEY_KP9, KEY_KPMINUS, KEY_KP4,
KEY_KP5, KEY_KP6, KEY_KPPLUS, KEY_KP1,
KEY_KP2, KEY_KP3, KEY_KP0, KEY_KPDOT,
- NONE, NONE, NONE, KEY_F11,
+ NONE, NONE, KEY_102ND, KEY_F11,
KEY_F12, NONE, NONE, NONE,
NONE, NONE, NONE, NONE,
/* 0x60 - 0x7f */
@@ -167,7 +169,7 @@ static uint16_t evdev_at_set1_scancodes[] = {
NONE, NONE, NONE, NONE,
NONE, NONE, KEY_VOLUMEDOWN, NONE,
KEY_VOLUMEUP, NONE, KEY_HOMEPAGE, NONE,
- NONE, KEY_KPASTERISK, NONE, KEY_SYSRQ,
+ NONE, KEY_KPSLASH, NONE, KEY_SYSRQ,
KEY_RIGHTALT, NONE, NONE, NONE,
NONE, NONE, NONE, NONE,
/* 0x40 - 0x5f. 0xE0 prefixed */
@@ -316,19 +318,26 @@ evdev_ev_kbd_event(struct evdev_dev *evdev, void *softc, uint16_t type,
leds |= 1 << i;
else
leds &= ~(1 << i);
- if (leds != oleds)
+ if (leds != oleds) {
+ mtx_lock(&Giant);
kbdd_ioctl(kbd, KDSETLED,
(caddr_t)&leds);
+ mtx_unlock(&Giant);
+ }
break;
}
}
} else if (type == EV_REP && code == REP_DELAY) {
delay[0] = value;
delay[1] = kbd->kb_delay2;
+ mtx_lock(&Giant);
kbdd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay);
+ mtx_unlock(&Giant);
} else if (type == EV_REP && code == REP_PERIOD) {
delay[0] = kbd->kb_delay1;
delay[1] = value;
+ mtx_lock(&Giant);
kbdd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay);
+ mtx_unlock(&Giant);
}
}
diff --git a/freebsd/sys/dev/fdt/fdt_common.c b/freebsd/sys/dev/fdt/fdt_common.c
index c8c777f1..26f73bc3 100644
--- a/freebsd/sys/dev/fdt/fdt_common.c
+++ b/freebsd/sys/dev/fdt/fdt_common.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009-2014 The FreeBSD Foundation
* All rights reserved.
*
diff --git a/freebsd/sys/dev/fdt/fdt_common.h b/freebsd/sys/dev/fdt/fdt_common.h
index 904d3e18..91522df5 100644
--- a/freebsd/sys/dev/fdt/fdt_common.h
+++ b/freebsd/sys/dev/fdt/fdt_common.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009-2010 The FreeBSD Foundation
* All rights reserved.
*
diff --git a/freebsd/sys/dev/fdt/simplebus.c b/freebsd/sys/dev/fdt/simplebus.c
index 9c85f751..54b17074 100644
--- a/freebsd/sys/dev/fdt/simplebus.c
+++ b/freebsd/sys/dev/fdt/simplebus.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2013 Nathan Whitehorn
* All rights reserved.
*
diff --git a/freebsd/sys/dev/ffec/if_ffec.c b/freebsd/sys/dev/ffec/if_ffec.c
index 22b2cdfc..1d842286 100644
--- a/freebsd/sys/dev/ffec/if_ffec.c
+++ b/freebsd/sys/dev/ffec/if_ffec.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2013 Ian Lepore <ian@freebsd.org>
* Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski
* Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski
@@ -103,18 +105,21 @@ enum {
FECTYPE_NONE,
FECTYPE_GENERIC,
FECTYPE_IMX53,
- FECTYPE_IMX6,
+ FECTYPE_IMX6, /* imx6 and imx7 */
FECTYPE_MVF,
};
/*
* Flags that describe general differences between the FEC hardware in various
- * SoCs. These are ORed into the FECTYPE enum values.
+ * SoCs. These are ORed into the FECTYPE enum values in the ofw_compat_data, so
+ * the low 8 bits are reserved for the type enum. In the softc, the type and
+ * flags are put into separate members, so that you don't need to mask the flags
+ * out of the type to compare it.
*/
-#define FECTYPE_MASK 0x0000ffff
-#define FECFLAG_GBE (1 << 16)
-#define FECFLAG_AVB (1 << 17)
-#define FECFLAG_RACC (1 << 18)
+#define FECTYPE_MASK 0x000000ff
+#define FECFLAG_GBE (1 << 8)
+#define FECFLAG_AVB (1 << 9)
+#define FECFLAG_RACC (1 << 10)
/*
* Table of supported FDT compat strings and their associated FECTYPE values.
@@ -122,12 +127,12 @@ enum {
static struct ofw_compat_data compat_data[] = {
{"fsl,imx51-fec", FECTYPE_GENERIC},
{"fsl,imx53-fec", FECTYPE_IMX53},
- {"fsl,imx6q-fec", FECTYPE_IMX6 | FECFLAG_GBE | FECFLAG_RACC},
- {"fsl,imx6ul-fec", FECTYPE_IMX6},
- {"fsl,mvf600-fec", FECTYPE_MVF | FECFLAG_RACC},
+ {"fsl,imx6q-fec", FECTYPE_IMX6 | FECFLAG_RACC | FECFLAG_GBE },
+ {"fsl,imx6ul-fec", FECTYPE_IMX6 | FECFLAG_RACC },
+ {"fsl,imx7d-fec", FECTYPE_IMX6 | FECFLAG_RACC | FECFLAG_GBE |
+ FECFLAG_AVB },
+ {"fsl,mvf600-fec", FECTYPE_MVF | FECFLAG_RACC },
{"fsl,mvf-fec", FECTYPE_MVF},
- {"fsl,imx7d-fec", FECTYPE_IMX6 | FECFLAG_GBE | FECFLAG_AVB |
- FECFLAG_RACC},
{NULL, FECTYPE_NONE},
};
@@ -161,12 +166,12 @@ struct ffec_softc {
int if_flags;
struct mtx mtx;
struct resource *irq_res[MAX_IRQ_COUNT];
- int irq_count;
struct resource *mem_res;
void * intr_cookie[MAX_IRQ_COUNT];
struct callout ffec_callout;
mii_contype_t phy_conn_type;
- uintptr_t fectype;
+ uint32_t fecflags;
+ uint8_t fectype;
boolean_t link_is_up;
boolean_t is_attached;
boolean_t is_detaching;
@@ -198,6 +203,13 @@ struct ffec_softc {
int tx_ic_count;
};
+static struct resource_spec irq_res_spec[MAX_IRQ_COUNT + 1] = {
+ { SYS_RES_IRQ, 0, RF_ACTIVE },
+ { SYS_RES_IRQ, 1, RF_ACTIVE | RF_OPTIONAL },
+ { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL },
+ RESOURCE_SPEC_END
+};
+
#define FFEC_LOCK(sc) mtx_lock(&(sc)->mtx)
#define FFEC_UNLOCK(sc) mtx_unlock(&(sc)->mtx)
#define FFEC_LOCK_INIT(sc) mtx_init(&(sc)->mtx, \
@@ -302,7 +314,7 @@ ffec_miigasket_setup(struct ffec_softc *sc)
* We only need the gasket for MII and RMII connections on certain SoCs.
*/
- switch (sc->fectype & FECTYPE_MASK)
+ switch (sc->fectype)
{
case FECTYPE_IMX53:
break;
@@ -842,10 +854,10 @@ ffec_setup_rxbuf(struct ffec_softc *sc, int idx, struct mbuf * m)
int error, nsegs;
struct bus_dma_segment seg;
- if ((sc->fectype & FECFLAG_RACC) == 0) {
+ if (!(sc->fecflags & FECFLAG_RACC)) {
/*
- * The RACC[SHIFT16] feature is not used. So, we need to leave
- * at least ETHER_ALIGN bytes free at the beginning of the
+ * The RACC[SHIFT16] feature is not available. So, we need to
+ * leave at least ETHER_ALIGN bytes free at the beginning of the
* buffer to allow the data to be re-aligned after receiving it
* (by copying it backwards ETHER_ALIGN bytes in the same
* buffer). We also have to ensure that the beginning of the
@@ -905,23 +917,6 @@ ffec_rxfinish_onebuf(struct ffec_softc *sc, int len, uint32_t flags2)
return;
}
- /*
- * Unfortunately, the protocol headers need to be aligned on a 32-bit
- * boundary for the upper layers. The hardware requires receive
- * buffers to be 16-byte aligned. The ethernet header is 14 bytes,
- * leaving the protocol header unaligned. We used m_adj() after
- * allocating the buffer to leave empty space at the start of the
- * buffer, now we'll use the alignment agnostic bcopy() routine to
- * shuffle all the data backwards 2 bytes and adjust m_data.
- *
- * XXX imx6 hardware is able to do this 2-byte alignment by setting the
- * SHIFT16 bit in the RACC register. Older hardware doesn't have that
- * feature, but for them could we speed this up by copying just the
- * protocol headers into their own small mbuf then chaining the cluster
- * to it? That way we'd only need to copy like 64 bytes or whatever
- * the biggest header is, instead of the whole 1530ish-byte frame.
- */
-
FFEC_UNLOCK(sc);
bmap = &sc->rxbuf_map[sc->rx_idx];
@@ -940,8 +935,17 @@ ffec_rxfinish_onebuf(struct ffec_softc *sc, int len, uint32_t flags2)
m->m_pkthdr.csum_data = 0xffff;
}
- if (sc->fectype & FECFLAG_RACC) {
- /* We use the RACC[SHIFT16] feature */
+ /*
+ * Align the protocol headers in the receive buffer on a 32-bit
+ * boundary. Newer hardware does the alignment for us. On hardware
+ * that doesn't support this feature, we have to copy-align the data.
+ *
+ * XXX for older hardware, could we speed this up by copying just the
+ * protocol headers into their own small mbuf then chaining the cluster
+ * to it? That way we'd only need to copy like 64 bytes or whatever the
+ * biggest header is, instead of the whole 1530ish-byte frame.
+ */
+ if (sc->fecflags & FECFLAG_RACC) {
m->m_data = mtod(m, uint8_t *) + 2;
} else {
uint8_t *dst, *src;
@@ -1325,7 +1329,7 @@ ffec_init_locked(struct ffec_softc *sc)
ffec_clear_stats(sc);
WR4(sc, FEC_MIBC_REG, regval & ~FEC_MIBC_DIS);
- if (sc->fectype & FECFLAG_RACC) {
+ if (sc->fecflags & FECFLAG_RACC) {
/*
* RACC - Receive Accelerator Function Configuration.
*/
@@ -1540,18 +1544,16 @@ ffec_detach(device_t dev)
bus_dmamap_destroy(sc->txdesc_tag, sc->txdesc_map);
}
if (sc->txdesc_tag != NULL)
- bus_dma_tag_destroy(sc->txdesc_tag);
+ bus_dma_tag_destroy(sc->txdesc_tag);
/* Release bus resources. */
- for (irq = 0; irq < sc->irq_count; ++irq) {
- if (sc->intr_cookie[irq])
+ for (irq = 0; irq < MAX_IRQ_COUNT; ++irq) {
+ if (sc->intr_cookie[irq] != NULL) {
bus_teardown_intr(dev, sc->irq_res[irq],
sc->intr_cookie[irq]);
-
- if (sc->irq_res[irq] != NULL)
- bus_release_resource(dev, SYS_RES_IRQ, 0,
- sc->irq_res[irq]);
+ }
}
+ bus_release_resources(dev, irq_res_spec, sc->irq_res);
if (sc->mem_res != NULL)
bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res);
@@ -1712,10 +1714,11 @@ ffec_attach(device_t dev)
struct ifnet *ifp = NULL;
struct mbuf *m;
void *dummy;
+ uintptr_t typeflags;
phandle_t ofw_node;
+ uint32_t idx, mscr;
int error, phynum, rid, irq;
uint8_t eaddr[ETHER_ADDR_LEN];
- uint32_t idx, mscr;
sc = device_get_softc(dev);
sc->dev = dev;
@@ -1726,7 +1729,17 @@ ffec_attach(device_t dev)
* There are differences in the implementation and features of the FEC
* hardware on different SoCs, so figure out what type we are.
*/
- sc->fectype = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+ typeflags = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+ sc->fectype = (uint8_t)(typeflags & FECTYPE_MASK);
+ sc->fecflags = (uint32_t)(typeflags & ~FECTYPE_MASK);
+
+ if (sc->fecflags & FECFLAG_AVB) {
+ sc->rxbuf_align = 64;
+ sc->txbuf_align = 1;
+ } else {
+ sc->rxbuf_align = 16;
+ sc->txbuf_align = 16;
+ }
if (sc->fectype & FECFLAG_AVB) {
sc->rxbuf_align = 64;
@@ -1768,17 +1781,10 @@ ffec_attach(device_t dev)
error = ENOMEM;
goto out;
}
- for (irq = 0; irq < MAX_IRQ_COUNT; ++irq) {
- rid = irq;
- sc->irq_res[irq] = bus_alloc_resource_any(dev, SYS_RES_IRQ,
- &rid, RF_ACTIVE);
- if (sc->irq_res[irq] == NULL)
- break;
- }
- sc->irq_count = irq;
- if (irq == 0) {
- device_printf(dev, "could not allocate interrupt resources.\n");
- error = ENOMEM;
+
+ error = bus_alloc_resources(dev, irq_res_spec, sc->irq_res);
+ if (error != 0) {
+ device_printf(dev, "could not allocate interrupt resources\n");
goto out;
}
@@ -1924,25 +1930,33 @@ ffec_attach(device_t dev)
/* Try to get the MAC address from the hardware before resetting it. */
ffec_get_hwaddr(sc, eaddr);
- /* Reset the hardware. Disables all interrupts. */
- if (sc->fectype & FECFLAG_AVB)
- /*
- * Avoid AXI bus issues due to a MAC reset, see Linux for more
- * details.
- */
+ /*
+ * Reset the hardware. Disables all interrupts.
+ *
+ * When the FEC is connected to the AXI bus (indicated by AVB flag), a
+ * MAC reset while a bus transaction is pending can hang the bus.
+ * Instead of resetting, turn off the ENABLE bit, which allows the
+ * hardware to complete any in-progress transfers (appending a bad CRC
+ * to any partial packet) and release the AXI bus. This could probably
+ * be done unconditionally for all hardware variants, but that hasn't
+ * been tested.
+ */
+ if (sc->fecflags & FECFLAG_AVB)
WR4(sc, FEC_ECR_REG, 0);
else
WR4(sc, FEC_ECR_REG, FEC_ECR_RESET);
/* Setup interrupt handler. */
- for (irq = 0; irq < sc->irq_count; ++irq) {
- error = bus_setup_intr(dev, sc->irq_res[irq],
- INTR_TYPE_NET | INTR_MPSAFE, NULL, ffec_intr, sc,
- &sc->intr_cookie[irq]);
- if (error != 0) {
- device_printf(dev,
- "could not setup interrupt handler.\n");
- goto out;
+ for (irq = 0; irq < MAX_IRQ_COUNT; ++irq) {
+ if (sc->irq_res[irq] != NULL) {
+ error = bus_setup_intr(dev, sc->irq_res[irq],
+ INTR_TYPE_NET | INTR_MPSAFE, NULL, ffec_intr, sc,
+ &sc->intr_cookie[irq]);
+ if (error != 0) {
+ device_printf(dev,
+ "could not setup interrupt handler.\n");
+ goto out;
+ }
}
}
@@ -2019,7 +2033,7 @@ ffec_attach(device_t dev)
}
error = mii_attach(dev, &sc->miibus, ifp, ffec_media_change,
ffec_media_status, BMSR_DEFCAPMASK, phynum, MII_OFFSET_ANY,
- (sc->fectype & FECTYPE_MVF) ? MIIF_FORCEANEG : 0);
+ (sc->fecflags & FECTYPE_MVF) ? MIIF_FORCEANEG : 0);
if (error != 0) {
device_printf(dev, "PHY attach failed\n");
goto out;
diff --git a/freebsd/sys/dev/ffec/if_ffecreg.h b/freebsd/sys/dev/ffec/if_ffecreg.h
index 9ec5b375..e2e7e816 100644
--- a/freebsd/sys/dev/ffec/if_ffecreg.h
+++ b/freebsd/sys/dev/ffec/if_ffecreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2013 Ian Lepore <ian@freebsd.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/fxp/if_fxp.c b/freebsd/sys/dev/fxp/if_fxp.c
index 20bdc988..ca933aa8 100644
--- a/freebsd/sys/dev/fxp/if_fxp.c
+++ b/freebsd/sys/dev/fxp/if_fxp.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1995, David Greenman
* Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
* All rights reserved.
diff --git a/freebsd/sys/dev/fxp/if_fxpreg.h b/freebsd/sys/dev/fxp/if_fxpreg.h
index 7ee85884..d1e6a45a 100644
--- a/freebsd/sys/dev/fxp/if_fxpreg.h
+++ b/freebsd/sys/dev/fxp/if_fxpreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1995, David Greenman
* Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
* All rights reserved.
diff --git a/freebsd/sys/dev/fxp/if_fxpvar.h b/freebsd/sys/dev/fxp/if_fxpvar.h
index 78200ce3..476a1a2c 100644
--- a/freebsd/sys/dev/fxp/if_fxpvar.h
+++ b/freebsd/sys/dev/fxp/if_fxpvar.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1995, David Greenman
* All rights reserved.
*
diff --git a/freebsd/sys/dev/fxp/rcvbundl.h b/freebsd/sys/dev/fxp/rcvbundl.h
index dac793df..e49889f0 100644
--- a/freebsd/sys/dev/fxp/rcvbundl.h
+++ b/freebsd/sys/dev/fxp/rcvbundl.h
@@ -1,4 +1,6 @@
/*-
+SPDX-License-Identifier: BSD-3-Clause
+
Copyright (c) 1999-2001, Intel Corporation
All rights reserved.
diff --git a/freebsd/sys/dev/gpio/gpiobus.c b/freebsd/sys/dev/gpio/gpiobus.c
index bbe8fc6c..2b1899e6 100644
--- a/freebsd/sys/dev/gpio/gpiobus.c
+++ b/freebsd/sys/dev/gpio/gpiobus.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009 Oleksandr Tymoshenko <gonzo@freebsd.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/gpio/gpiobusvar.h b/freebsd/sys/dev/gpio/gpiobusvar.h
index 9eee5a03..fbcfbb4e 100644
--- a/freebsd/sys/dev/gpio/gpiobusvar.h
+++ b/freebsd/sys/dev/gpio/gpiobusvar.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009 Oleksandr Tymoshenko <gonzo@freebsd.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/gpio/ofw_gpiobus.c b/freebsd/sys/dev/gpio/ofw_gpiobus.c
index e76059f9..70495a2a 100644
--- a/freebsd/sys/dev/gpio/ofw_gpiobus.c
+++ b/freebsd/sys/dev/gpio/ofw_gpiobus.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009, Nathan Whitehorn <nwhitehorn@FreeBSD.org>
* Copyright (c) 2013, Luiz Otavio O Souza <loos@FreeBSD.org>
* Copyright (c) 2013 The FreeBSD Foundation
diff --git a/freebsd/sys/dev/kbd/kbd.c b/freebsd/sys/dev/kbd/kbd.c
index 3187e8bf..c7512e89 100644
--- a/freebsd/sys/dev/kbd/kbd.c
+++ b/freebsd/sys/dev/kbd/kbd.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/kbd/kbdreg.h b/freebsd/sys/dev/kbd/kbdreg.h
index ff4a694b..5caafdda 100644
--- a/freebsd/sys/dev/kbd/kbdreg.h
+++ b/freebsd/sys/dev/kbd/kbdreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/kbd/kbdtables.h b/freebsd/sys/dev/kbd/kbdtables.h
index 5ff744c0..c1c6defc 100644
--- a/freebsd/sys/dev/kbd/kbdtables.h
+++ b/freebsd/sys/dev/kbd/kbdtables.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1992-1998 Sen Schmidt
* All rights reserved.
*
diff --git a/freebsd/sys/dev/led/led.c b/freebsd/sys/dev/led/led.c
index cb811ce9..70de95bb 100644
--- a/freebsd/sys/dev/led/led.c
+++ b/freebsd/sys/dev/led/led.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: Beerware
+ *
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
diff --git a/freebsd/sys/dev/mii/brgphy.c b/freebsd/sys/dev/mii/brgphy.c
index d476960f..0566f616 100644
--- a/freebsd/sys/dev/mii/brgphy.c
+++ b/freebsd/sys/dev/mii/brgphy.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/brgphyreg.h b/freebsd/sys/dev/mii/brgphyreg.h
index b3535d59..5cceb392 100644
--- a/freebsd/sys/dev/mii/brgphyreg.h
+++ b/freebsd/sys/dev/mii/brgphyreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/e1000phy.c b/freebsd/sys/dev/mii/e1000phy.c
index ee62b6c6..ae5a3922 100644
--- a/freebsd/sys/dev/mii/e1000phy.c
+++ b/freebsd/sys/dev/mii/e1000phy.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Principal Author: Parag Patel
* Copyright (c) 2001
* All rights reserved.
diff --git a/freebsd/sys/dev/mii/e1000phyreg.h b/freebsd/sys/dev/mii/e1000phyreg.h
index e5d5cf96..04c396e5 100644
--- a/freebsd/sys/dev/mii/e1000phyreg.h
+++ b/freebsd/sys/dev/mii/e1000phyreg.h
@@ -31,6 +31,8 @@
*/
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Derived by information released by Intel under the following license:
*
* Copyright (c) 1999 - 2001, Intel Corporation
diff --git a/freebsd/sys/dev/mii/icsphy.c b/freebsd/sys/dev/mii/icsphy.c
index e313afe1..bde90714 100755
--- a/freebsd/sys/dev/mii/icsphy.c
+++ b/freebsd/sys/dev/mii/icsphy.c
@@ -3,6 +3,8 @@
/* $NetBSD: icsphy.c,v 1.41 2006/11/16 21:24:07 christos Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/icsphyreg.h b/freebsd/sys/dev/mii/icsphyreg.h
index d92d0b51..80ebbded 100644
--- a/freebsd/sys/dev/mii/icsphyreg.h
+++ b/freebsd/sys/dev/mii/icsphyreg.h
@@ -1,6 +1,8 @@
/* $NetBSD: icsphyreg.h,v 1.2 2003/07/01 22:46:08 msaitoh Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/mii.c b/freebsd/sys/dev/mii/mii.c
index b7464bb6..2ed40543 100644
--- a/freebsd/sys/dev/mii/mii.c
+++ b/freebsd/sys/dev/mii/mii.c
@@ -3,6 +3,8 @@
/* $NetBSD: mii.c,v 1.12 1999/08/03 19:41:49 drochner Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/mii.h b/freebsd/sys/dev/mii/mii.h
index fa1ec84e..11b2d117 100644
--- a/freebsd/sys/dev/mii/mii.h
+++ b/freebsd/sys/dev/mii/mii.h
@@ -1,6 +1,8 @@
/* $NetBSD: mii.h,v 1.18 2014/06/16 14:43:22 msaitoh Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
* Copyright (c) 1997 Manuel Bouyer. All rights reserved.
*
* Modification to match BSD/OS 3.0 MII interface by Jason R. Thorpe,
diff --git a/freebsd/sys/dev/mii/mii_bitbang.c b/freebsd/sys/dev/mii/mii_bitbang.c
index 784aa4d8..0fd3bb47 100644
--- a/freebsd/sys/dev/mii/mii_bitbang.c
+++ b/freebsd/sys/dev/mii/mii_bitbang.c
@@ -3,6 +3,8 @@
/* $NetBSD: mii_bitbang.c,v 1.12 2008/05/04 17:06:09 xtraeme Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/mii_bitbang.h b/freebsd/sys/dev/mii/mii_bitbang.h
index 2bc74276..14e2c90f 100644
--- a/freebsd/sys/dev/mii/mii_bitbang.h
+++ b/freebsd/sys/dev/mii/mii_bitbang.h
@@ -1,6 +1,8 @@
/* $NetBSD: mii_bitbang.h,v 1.6 2009/05/12 14:31:27 cegger Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/mii_physubr.c b/freebsd/sys/dev/mii/mii_physubr.c
index 864f9968..9ba68190 100644
--- a/freebsd/sys/dev/mii/mii_physubr.c
+++ b/freebsd/sys/dev/mii/mii_physubr.c
@@ -3,6 +3,8 @@
/* $NetBSD: mii_physubr.c,v 1.5 1999/08/03 19:41:49 drochner Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/miivar.h b/freebsd/sys/dev/mii/miivar.h
index ef81bdb2..9def25c4 100644
--- a/freebsd/sys/dev/mii/miivar.h
+++ b/freebsd/sys/dev/mii/miivar.h
@@ -1,6 +1,8 @@
/* $NetBSD: miivar.h,v 1.8 1999/04/23 04:24:32 thorpej Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/rgephy.c b/freebsd/sys/dev/mii/rgephy.c
index de8a2975..8a045a7d 100644
--- a/freebsd/sys/dev/mii/rgephy.c
+++ b/freebsd/sys/dev/mii/rgephy.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/rgephyreg.h b/freebsd/sys/dev/mii/rgephyreg.h
index 35917daa..39efaee4 100644
--- a/freebsd/sys/dev/mii/rgephyreg.h
+++ b/freebsd/sys/dev/mii/rgephyreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/ukphy.c b/freebsd/sys/dev/mii/ukphy.c
index c9c59b06..14e42fc9 100644
--- a/freebsd/sys/dev/mii/ukphy.c
+++ b/freebsd/sys/dev/mii/ukphy.c
@@ -3,6 +3,8 @@
/* $NetBSD: ukphy.c,v 1.2 1999/04/23 04:24:32 thorpej Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mii/ukphy_subr.c b/freebsd/sys/dev/mii/ukphy_subr.c
index 06e1cc5f..b87717fb 100644
--- a/freebsd/sys/dev/mii/ukphy_subr.c
+++ b/freebsd/sys/dev/mii/ukphy_subr.c
@@ -3,6 +3,8 @@
/* $NetBSD: ukphy_subr.c,v 1.2 1998/11/05 04:08:02 thorpej Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/mmc/bridge.h b/freebsd/sys/dev/mmc/bridge.h
index b7d95ffc..7af811f1 100644
--- a/freebsd/sys/dev/mmc/bridge.h
+++ b/freebsd/sys/dev/mmc/bridge.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006 M. Warner Losh. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/mmc/mmc.c b/freebsd/sys/dev/mmc/mmc.c
index 77934e86..32599383 100644
--- a/freebsd/sys/dev/mmc/mmc.c
+++ b/freebsd/sys/dev/mmc/mmc.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006 Bernd Walter. All rights reserved.
* Copyright (c) 2006 M. Warner Losh. All rights reserved.
* Copyright (c) 2017 Marius Strobl <marius@FreeBSD.org>
diff --git a/freebsd/sys/dev/mmc/mmcbrvar.h b/freebsd/sys/dev/mmc/mmcbrvar.h
index c70af92a..6e4bec70 100644
--- a/freebsd/sys/dev/mmc/mmcbrvar.h
+++ b/freebsd/sys/dev/mmc/mmcbrvar.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006 Bernd Walter. All rights reserved.
* Copyright (c) 2006 M. Warner Losh. All rights reserved.
*
diff --git a/freebsd/sys/dev/mmc/mmcreg.h b/freebsd/sys/dev/mmc/mmcreg.h
index 8120b69f..5f58ce3f 100644
--- a/freebsd/sys/dev/mmc/mmcreg.h
+++ b/freebsd/sys/dev/mmc/mmcreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006 M. Warner Losh. All rights reserved.
* Copyright (c) 2017 Marius Strobl <marius@FreeBSD.org>
* Copyright (c) 2015-2016 Ilya Bakulin <kibab@FreeBSD.org>
diff --git a/freebsd/sys/dev/mmc/mmcsd.c b/freebsd/sys/dev/mmc/mmcsd.c
index 45bd9c50..df29b544 100644
--- a/freebsd/sys/dev/mmc/mmcsd.c
+++ b/freebsd/sys/dev/mmc/mmcsd.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006 Bernd Walter. All rights reserved.
* Copyright (c) 2006 M. Warner Losh. All rights reserved.
* Copyright (c) 2017 Marius Strobl <marius@FreeBSD.org>
@@ -554,7 +556,7 @@ mmcsd_attach(device_t dev)
(ext_csd[EXT_CSD_ENH_START_ADDR + 1] << 8) +
(ext_csd[EXT_CSD_ENH_START_ADDR + 2] << 16) +
(ext_csd[EXT_CSD_ENH_START_ADDR + 3] << 24)) *
- (sc->high_cap != 0 ? MMC_SECTOR_SIZE : 1);
+ (sc->high_cap == 0 ? MMC_SECTOR_SIZE : 1);
} else if (bootverbose)
device_printf(dev,
"enhanced user data area spans entire device\n");
diff --git a/freebsd/sys/dev/mmc/mmcvar.h b/freebsd/sys/dev/mmc/mmcvar.h
index d0f4e330..1604c306 100644
--- a/freebsd/sys/dev/mmc/mmcvar.h
+++ b/freebsd/sys/dev/mmc/mmcvar.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006 Bernd Walter. All rights reserved.
* Copyright (c) 2006 M. Warner Losh. All rights reserved.
*
diff --git a/freebsd/sys/dev/nvme/nvme.h b/freebsd/sys/dev/nvme/nvme.h
index d4fc131e..5d11f793 100644
--- a/freebsd/sys/dev/nvme/nvme.h
+++ b/freebsd/sys/dev/nvme/nvme.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (C) 2012-2013 Intel Corporation
* All rights reserved.
*
@@ -42,6 +44,13 @@
#define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test)
/*
+ * Macros to deal with NVME revisions, as defined VS register
+ */
+#define NVME_REV(x, y) (((x) << 16) | ((y) << 8))
+#define NVME_MAJOR(r) (((r) >> 16) & 0xffff)
+#define NVME_MINOR(r) (((r) >> 8) & 0xff)
+
+/*
* Use to mark a command to apply to all namespaces, or to retrieve global
* log pages.
*/
@@ -1068,7 +1077,12 @@ uint32_t nvme_ns_get_stripesize(struct nvme_namespace *ns);
int nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp,
nvme_cb_fn_t cb_fn);
-/* Command building helper functions -- shared with CAM */
+/*
+ * Command building helper functions -- shared with CAM
+ * These functions assume allocator zeros out cmd structure
+ * CAM's xpt_get_ccb and the request allocator for nvme both
+ * do zero'd allocations.
+ */
static inline
void nvme_ns_flush_cmd(struct nvme_command *cmd, uint32_t nsid)
{
@@ -1086,9 +1100,6 @@ void nvme_ns_rw_cmd(struct nvme_command *cmd, uint32_t rwcmd, uint32_t nsid,
cmd->cdw10 = lba & 0xffffffffu;
cmd->cdw11 = lba >> 32;
cmd->cdw12 = count-1;
- cmd->cdw13 = 0;
- cmd->cdw14 = 0;
- cmd->cdw15 = 0;
}
static inline
diff --git a/freebsd/sys/dev/ofw/ofw_bus.h b/freebsd/sys/dev/ofw/ofw_bus.h
index dff9a2b8..bfffcefa 100644
--- a/freebsd/sys/dev/ofw/ofw_bus.h
+++ b/freebsd/sys/dev/ofw/ofw_bus.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001, 2003 by Thomas Moestl <tmm@FreeBSD.org>
* Copyright (c) 2004 by Marius Strobl <marius@FreeBSD.org>
* All rights reserved.
diff --git a/freebsd/sys/dev/ofw/ofw_bus_subr.c b/freebsd/sys/dev/ofw/ofw_bus_subr.c
index 418304a0..c655e668 100644
--- a/freebsd/sys/dev/ofw/ofw_bus_subr.c
+++ b/freebsd/sys/dev/ofw/ofw_bus_subr.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001 - 2003 by Thomas Moestl <tmm@FreeBSD.org>.
* Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
* All rights reserved.
diff --git a/freebsd/sys/dev/ofw/ofw_bus_subr.h b/freebsd/sys/dev/ofw/ofw_bus_subr.h
index 4afd84e3..04f5a75b 100644
--- a/freebsd/sys/dev/ofw/ofw_bus_subr.h
+++ b/freebsd/sys/dev/ofw/ofw_bus_subr.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
* All rights reserved.
*
@@ -63,7 +65,7 @@ struct intr_map_data_fdt {
};
#endif
-#define SIMPLEBUS_PNP_DESCR "Z:compat;P:private;"
+#define SIMPLEBUS_PNP_DESCR "Z:compat;P:#;"
#define SIMPLEBUS_PNP_INFO(t) \
MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0]));
diff --git a/freebsd/sys/dev/ofw/ofw_fdt.c b/freebsd/sys/dev/ofw/ofw_fdt.c
index 282c3667..7bdf447b 100644
--- a/freebsd/sys/dev/ofw/ofw_fdt.c
+++ b/freebsd/sys/dev/ofw/ofw_fdt.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009-2010 The FreeBSD Foundation
* All rights reserved.
*
diff --git a/freebsd/sys/dev/ofw/ofw_pci.h b/freebsd/sys/dev/ofw/ofw_pci.h
index eb60c5ba..fe4e8b1a 100644
--- a/freebsd/sys/dev/ofw/ofw_pci.h
+++ b/freebsd/sys/dev/ofw/ofw_pci.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/ofw/ofwvar.h b/freebsd/sys/dev/ofw/ofwvar.h
index 38bf472b..559da72b 100644
--- a/freebsd/sys/dev/ofw/ofwvar.h
+++ b/freebsd/sys/dev/ofw/ofwvar.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2005 Peter Grehan
* Copyright (c) 2008 Nathan Whitehorn
* All rights reserved.
diff --git a/freebsd/sys/dev/ofw/openfirm.c b/freebsd/sys/dev/ofw/openfirm.c
index 7132c419..406e8dd6 100644
--- a/freebsd/sys/dev/ofw/openfirm.c
+++ b/freebsd/sys/dev/ofw/openfirm.c
@@ -3,6 +3,8 @@
/* $NetBSD: Locore.c,v 1.7 2000/08/20 07:04:59 tsubai Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
* Copyright (C) 1995, 1996 TooLs GmbH.
* All rights reserved.
@@ -210,6 +212,12 @@ OF_install(char *name, int prio)
ofw_def_t *ofwp, **ofwpp;
static int curr_prio = 0;
+ /* Allow OF layer to be uninstalled */
+ if (name == NULL) {
+ ofw_def_impl = NULL;
+ return (FALSE);
+ }
+
/*
* Try and locate the OFW kobj corresponding to the name.
*/
diff --git a/freebsd/sys/dev/ofw/openfirm.h b/freebsd/sys/dev/ofw/openfirm.h
index 4e9fb29c..e1701164 100644
--- a/freebsd/sys/dev/ofw/openfirm.h
+++ b/freebsd/sys/dev/ofw/openfirm.h
@@ -1,6 +1,8 @@
/* $NetBSD: openfirm.h,v 1.1 1998/05/15 10:16:00 tsubai Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
* Copyright (C) 1995, 1996 TooLs GmbH.
* All rights reserved.
diff --git a/freebsd/sys/dev/pci/pci.c b/freebsd/sys/dev/pci/pci.c
index 69497d2c..e492846d 100644
--- a/freebsd/sys/dev/pci/pci.c
+++ b/freebsd/sys/dev/pci/pci.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1997, Stefan Esser <se@freebsd.org>
* Copyright (c) 2000, Michael Smith <msmith@freebsd.org>
* Copyright (c) 2000, BSDi
@@ -323,9 +325,9 @@ SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI bus tuning parameters");
static int pci_enable_io_modes = 1;
SYSCTL_INT(_hw_pci, OID_AUTO, enable_io_modes, CTLFLAG_RWTUN,
&pci_enable_io_modes, 1,
- "Enable I/O and memory bits in the config register. Some BIOSes do not\n\
-enable these bits correctly. We'd like to do this all the time, but there\n\
-are some peripherals that this causes problems with.");
+ "Enable I/O and memory bits in the config register. Some BIOSes do not"
+ " enable these bits correctly. We'd like to do this all the time, but"
+ " there are some peripherals that this causes problems with.");
static int pci_do_realloc_bars = 0;
SYSCTL_INT(_hw_pci, OID_AUTO, realloc_bars, CTLFLAG_RWTUN,
@@ -336,10 +338,10 @@ SYSCTL_INT(_hw_pci, OID_AUTO, realloc_bars, CTLFLAG_RWTUN,
static int pci_do_power_nodriver = 0;
SYSCTL_INT(_hw_pci, OID_AUTO, do_power_nodriver, CTLFLAG_RWTUN,
&pci_do_power_nodriver, 0,
- "Place a function into D3 state when no driver attaches to it. 0 means\n\
-disable. 1 means conservatively place devices into D3 state. 2 means\n\
-aggressively place devices into D3 state. 3 means put absolutely everything\n\
-in D3 state.");
+ "Place a function into D3 state when no driver attaches to it. 0 means"
+ " disable. 1 means conservatively place devices into D3 state. 2 means"
+ " aggressively place devices into D3 state. 3 means put absolutely"
+ " everything in D3 state.");
int pci_do_power_resume = 1;
SYSCTL_INT(_hw_pci, OID_AUTO, do_power_resume, CTLFLAG_RWTUN,
@@ -374,9 +376,10 @@ static int pci_usb_takeover = 1;
static int pci_usb_takeover = 0;
#endif
SYSCTL_INT(_hw_pci, OID_AUTO, usb_early_takeover, CTLFLAG_RDTUN,
- &pci_usb_takeover, 1, "Enable early takeover of USB controllers.\n\
-Disable this if you depend on BIOS emulation of USB devices, that is\n\
-you use USB devices (like keyboard or mouse) but do not load USB drivers");
+ &pci_usb_takeover, 1,
+ "Enable early takeover of USB controllers. Disable this if you depend on"
+ " BIOS emulation of USB devices, that is you use USB devices (like"
+ " keyboard or mouse) but do not load USB drivers");
static int pci_clear_bars;
SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0,
diff --git a/freebsd/sys/dev/pci/pci_pci.c b/freebsd/sys/dev/pci/pci_pci.c
index ed4c1b50..5585bd32 100644
--- a/freebsd/sys/dev/pci/pci_pci.c
+++ b/freebsd/sys/dev/pci/pci_pci.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1994,1995 Stefan Esser, Wolfgang StanglMeier
* Copyright (c) 2000 Michael Smith <msmith@freebsd.org>
* Copyright (c) 2000 BSDi
diff --git a/freebsd/sys/dev/pci/pci_private.h b/freebsd/sys/dev/pci/pci_private.h
index 6c5a1677..dd254e66 100644
--- a/freebsd/sys/dev/pci/pci_private.h
+++ b/freebsd/sys/dev/pci/pci_private.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1997, Stefan Esser <se@freebsd.org>
* Copyright (c) 2000, Michael Smith <msmith@freebsd.org>
* Copyright (c) 2000, BSDi
diff --git a/freebsd/sys/dev/pci/pci_user.c b/freebsd/sys/dev/pci/pci_user.c
index edad1847..6e1cc3ef 100644
--- a/freebsd/sys/dev/pci/pci_user.c
+++ b/freebsd/sys/dev/pci/pci_user.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1997, Stefan Esser <se@freebsd.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/pci/pcib_private.h b/freebsd/sys/dev/pci/pcib_private.h
index 5482e12d..5cda3a38 100644
--- a/freebsd/sys/dev/pci/pcib_private.h
+++ b/freebsd/sys/dev/pci/pcib_private.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1994,1995 Stefan Esser, Wolfgang StanglMeier
* Copyright (c) 2000 Michael Smith <msmith@freebsd.org>
* Copyright (c) 2000 BSDi
diff --git a/freebsd/sys/dev/pci/pcireg.h b/freebsd/sys/dev/pci/pcireg.h
index b434b2e6..00589c4b 100644
--- a/freebsd/sys/dev/pci/pcireg.h
+++ b/freebsd/sys/dev/pci/pcireg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1997, Stefan Esser <se@freebsd.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/pci/pcivar.h b/freebsd/sys/dev/pci/pcivar.h
index 4652715a..430e29db 100644
--- a/freebsd/sys/dev/pci/pcivar.h
+++ b/freebsd/sys/dev/pci/pcivar.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1997, Stefan Esser <se@freebsd.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/re/if_re.c b/freebsd/sys/dev/re/if_re.c
index 0a2cb648..c8bb6db7 100644
--- a/freebsd/sys/dev/re/if_re.c
+++ b/freebsd/sys/dev/re/if_re.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998-2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
*
diff --git a/freebsd/sys/dev/rtwn/usb/rtwn_usb_attach.h b/freebsd/sys/dev/rtwn/usb/rtwn_usb_attach.h
index ee6d9137..6bbdf5bc 100644
--- a/freebsd/sys/dev/rtwn/usb/rtwn_usb_attach.h
+++ b/freebsd/sys/dev/rtwn/usb/rtwn_usb_attach.h
@@ -137,6 +137,8 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = {
RTWN_RTL8812AU_DEV(SENAO, EUB1200AC),
RTWN_RTL8812AU_DEV(SITECOMEU, WLA7100),
RTWN_RTL8812AU_DEV(TPLINK, T4U),
+ RTWN_RTL8812AU_DEV(TPLINK, T4UV2),
+ RTWN_RTL8812AU_DEV(TPLINK, T4UHV2),
RTWN_RTL8812AU_DEV(TRENDNET, TEW805UB),
RTWN_RTL8812AU_DEV(ZYXEL, NWD6605),
#undef RTWN_RTL8812AU_DEV
diff --git a/freebsd/sys/dev/sdhci/sdhci.c b/freebsd/sys/dev/sdhci/sdhci.c
index 8d1fed8f..496e8fac 100644
--- a/freebsd/sys/dev/sdhci/sdhci.c
+++ b/freebsd/sys/dev/sdhci/sdhci.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
* Copyright (c) 2017 Marius Strobl <marius@FreeBSD.org>
* All rights reserved.
diff --git a/freebsd/sys/dev/sdhci/sdhci.h b/freebsd/sys/dev/sdhci/sdhci.h
index ba66415f..f2a7a9b1 100644
--- a/freebsd/sys/dev/sdhci/sdhci.h
+++ b/freebsd/sys/dev/sdhci/sdhci.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/smc/if_smc.c b/freebsd/sys/dev/smc/if_smc.c
index fd1a0960..6b087a85 100644
--- a/freebsd/sys/dev/smc/if_smc.c
+++ b/freebsd/sys/dev/smc/if_smc.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Benno Rice. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/smc/if_smcreg.h b/freebsd/sys/dev/smc/if_smcreg.h
index 4b939076..4642966f 100644
--- a/freebsd/sys/dev/smc/if_smcreg.h
+++ b/freebsd/sys/dev/smc/if_smcreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006 Benno Rice. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/smc/if_smcvar.h b/freebsd/sys/dev/smc/if_smcvar.h
index fd42edbb..a58eb0df 100644
--- a/freebsd/sys/dev/smc/if_smcvar.h
+++ b/freebsd/sys/dev/smc/if_smcvar.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Benno Rice. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/tsec/if_tsec.c b/freebsd/sys/dev/tsec/if_tsec.c
index b7edc948..e07c21ce 100644
--- a/freebsd/sys/dev/tsec/if_tsec.c
+++ b/freebsd/sys/dev/tsec/if_tsec.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski
* Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski
* All rights reserved.
diff --git a/freebsd/sys/dev/tsec/if_tsec.h b/freebsd/sys/dev/tsec/if_tsec.h
index c8dca3bf..2caa2619 100644
--- a/freebsd/sys/dev/tsec/if_tsec.h
+++ b/freebsd/sys/dev/tsec/if_tsec.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski
* All rights reserved.
*
diff --git a/freebsd/sys/dev/tsec/if_tsec_fdt.c b/freebsd/sys/dev/tsec/if_tsec_fdt.c
index 476a5bf9..01718194 100644
--- a/freebsd/sys/dev/tsec/if_tsec_fdt.c
+++ b/freebsd/sys/dev/tsec/if_tsec_fdt.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski
* Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski
* All rights reserved.
diff --git a/freebsd/sys/dev/tsec/if_tsecreg.h b/freebsd/sys/dev/tsec/if_tsecreg.h
index 1994298c..18a81df7 100644
--- a/freebsd/sys/dev/tsec/if_tsecreg.h
+++ b/freebsd/sys/dev/tsec/if_tsecreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (C) 2008-2009 Semihalf, Piotr Ziecik
* Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski
* All rights reserved.
diff --git a/freebsd/sys/dev/usb/controller/dwc_otg.c b/freebsd/sys/dev/usb/controller/dwc_otg.c
index 421eb77f..abc23ac6 100644
--- a/freebsd/sys/dev/usb/controller/dwc_otg.c
+++ b/freebsd/sys/dev/usb/controller/dwc_otg.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2015 Daisuke Aoyama. All rights reserved.
* Copyright (c) 2012-2015 Hans Petter Selasky. All rights reserved.
* Copyright (c) 2010-2011 Aleksandr Rybalko. All rights reserved.
diff --git a/freebsd/sys/dev/usb/controller/dwc_otg.h b/freebsd/sys/dev/usb/controller/dwc_otg.h
index 7f5ede48..2de0214f 100644
--- a/freebsd/sys/dev/usb/controller/dwc_otg.h
+++ b/freebsd/sys/dev/usb/controller/dwc_otg.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c b/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c
index 791d9890..1cf96f4c 100644
--- a/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c
+++ b/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/controller/dwc_otgreg.h b/freebsd/sys/dev/usb/controller/dwc_otgreg.h
index 8b9538ae..3c50ca58 100644
--- a/freebsd/sys/dev/usb/controller/dwc_otgreg.h
+++ b/freebsd/sys/dev/usb/controller/dwc_otgreg.h
@@ -1,6 +1,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2010,2011 Aleksandr Rybalko. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/controller/ehci.c b/freebsd/sys/dev/usb/controller/ehci.c
index 9de1491e..557698f6 100644
--- a/freebsd/sys/dev/usb/controller/ehci.c
+++ b/freebsd/sys/dev/usb/controller/ehci.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
* Copyright (c) 2004 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 2004 Lennart Augustsson. All rights reserved.
diff --git a/freebsd/sys/dev/usb/controller/ehci.h b/freebsd/sys/dev/usb/controller/ehci.h
index dd20c0a5..3a5f6781 100644
--- a/freebsd/sys/dev/usb/controller/ehci.h
+++ b/freebsd/sys/dev/usb/controller/ehci.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/controller/ehcireg.h b/freebsd/sys/dev/usb/controller/ehcireg.h
index 2394b2c1..81939e20 100644
--- a/freebsd/sys/dev/usb/controller/ehcireg.h
+++ b/freebsd/sys/dev/usb/controller/ehcireg.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/controller/musb_otg.c b/freebsd/sys/dev/usb/controller/musb_otg.c
index 0f1953b6..16a3adef 100644
--- a/freebsd/sys/dev/usb/controller/musb_otg.c
+++ b/freebsd/sys/dev/usb/controller/musb_otg.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/controller/musb_otg.h b/freebsd/sys/dev/usb/controller/musb_otg.h
index 7fe19a7c..55ab7aa6 100644
--- a/freebsd/sys/dev/usb/controller/musb_otg.h
+++ b/freebsd/sys/dev/usb/controller/musb_otg.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/controller/ohci.c b/freebsd/sys/dev/usb/controller/ohci.c
index 9f0654e3..df1981cc 100644
--- a/freebsd/sys/dev/usb/controller/ohci.c
+++ b/freebsd/sys/dev/usb/controller/ohci.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
* Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 1998 Lennart Augustsson. All rights reserved.
diff --git a/freebsd/sys/dev/usb/controller/ohci.h b/freebsd/sys/dev/usb/controller/ohci.h
index 69fc9a62..72e825ec 100755
--- a/freebsd/sys/dev/usb/controller/ohci.h
+++ b/freebsd/sys/dev/usb/controller/ohci.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/controller/ohcireg.h b/freebsd/sys/dev/usb/controller/ohcireg.h
index 7f14875c..c6ea4113 100644
--- a/freebsd/sys/dev/usb/controller/ohcireg.h
+++ b/freebsd/sys/dev/usb/controller/ohcireg.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/controller/uhcireg.h b/freebsd/sys/dev/usb/controller/uhcireg.h
index 95eae494..fa0e4eb9 100644
--- a/freebsd/sys/dev/usb/controller/uhcireg.h
+++ b/freebsd/sys/dev/usb/controller/uhcireg.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/controller/usb_controller.c b/freebsd/sys/dev/usb/controller/usb_controller.c
index 5f198aed..a2633d0d 100644
--- a/freebsd/sys/dev/usb/controller/usb_controller.c
+++ b/freebsd/sys/dev/usb/controller/usb_controller.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/controller/xhcireg.h b/freebsd/sys/dev/usb/controller/xhcireg.h
index 0e588ecb..b49bc09a 100644
--- a/freebsd/sys/dev/usb/controller/xhcireg.h
+++ b/freebsd/sys/dev/usb/controller/xhcireg.h
@@ -1,6 +1,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/input/atp.c b/freebsd/sys/dev/usb/input/atp.c
index 17162411..d0fabe0d 100644
--- a/freebsd/sys/dev/usb/input/atp.c
+++ b/freebsd/sys/dev/usb/input/atp.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2014 Rohit Grover
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/input/uep.c b/freebsd/sys/dev/usb/input/uep.c
index d7af405f..701c8550 100644
--- a/freebsd/sys/dev/usb/input/uep.c
+++ b/freebsd/sys/dev/usb/input/uep.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright 2010, Gleb Smirnoff <glebius@FreeBSD.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/input/uhid.c b/freebsd/sys/dev/usb/input/uhid.c
index 6de5944d..90761ab7 100644
--- a/freebsd/sys/dev/usb/input/uhid.c
+++ b/freebsd/sys/dev/usb/input/uhid.c
@@ -10,6 +10,8 @@
__FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/input/ukbd.c b/freebsd/sys/dev/usb/input/ukbd.c
index d473d1ea..9b1d28fc 100644
--- a/freebsd/sys/dev/usb/input/ukbd.c
+++ b/freebsd/sys/dev/usb/input/ukbd.c
@@ -5,6 +5,8 @@ __FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/input/ums.c b/freebsd/sys/dev/usb/input/ums.c
index 36c1d1b4..79bc2291 100644
--- a/freebsd/sys/dev/usb/input/ums.c
+++ b/freebsd/sys/dev/usb/input/ums.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -298,7 +300,7 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error)
if ((info->sc_flags & UMS_FLAG_T_AXIS) &&
(id == info->sc_iid_t)) {
- dt -= hid_get_data(buf, len, &info->sc_loc_t);
+ dt += hid_get_data(buf, len, &info->sc_loc_t);
/* T-axis is translated into button presses */
buttons_found |= (1UL << 5) | (1UL << 6);
}
@@ -334,10 +336,10 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error)
/* translate T-axis into button presses until further */
if (dt > 0) {
ums_put_queue(sc, 0, 0, 0, 0, buttons);
- buttons |= 1UL << 5;
+ buttons |= 1UL << 6;
} else if (dt < 0) {
ums_put_queue(sc, 0, 0, 0, 0, buttons);
- buttons |= 1UL << 6;
+ buttons |= 1UL << 5;
}
sc->sc_status.button = buttons;
diff --git a/freebsd/sys/dev/usb/input/usb_rdesc.h b/freebsd/sys/dev/usb/input/usb_rdesc.h
index 23ea620b..00eea122 100644
--- a/freebsd/sys/dev/usb/input/usb_rdesc.h
+++ b/freebsd/sys/dev/usb/input/usb_rdesc.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2000 Nick Hibma <n_hibma@FreeBSD.org>
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/input/wsp.c b/freebsd/sys/dev/usb/input/wsp.c
index d3eae491..0eb2c024 100644
--- a/freebsd/sys/dev/usb/input/wsp.c
+++ b/freebsd/sys/dev/usb/input/wsp.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2012 Huang Wen Hui
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_aue.c b/freebsd/sys/dev/usb/net/if_aue.c
index 06ccd8ce..69951b70 100644
--- a/freebsd/sys/dev/usb/net/if_aue.c
+++ b/freebsd/sys/dev/usb/net/if_aue.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_auereg.h b/freebsd/sys/dev/usb/net/if_auereg.h
index 4d0843eb..dfbaac42 100644
--- a/freebsd/sys/dev/usb/net/if_auereg.h
+++ b/freebsd/sys/dev/usb/net/if_auereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_axe.c b/freebsd/sys/dev/usb/net/if_axe.c
index 728f8e3d..b77292ba 100644
--- a/freebsd/sys/dev/usb/net/if_axe.c
+++ b/freebsd/sys/dev/usb/net/if_axe.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000-2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_axereg.h b/freebsd/sys/dev/usb/net/if_axereg.h
index 64cb2352..2654bbba 100644
--- a/freebsd/sys/dev/usb/net/if_axereg.h
+++ b/freebsd/sys/dev/usb/net/if_axereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000-2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_axge.c b/freebsd/sys/dev/usb/net/if_axge.c
index 4e6f05b5..fc602b88 100644
--- a/freebsd/sys/dev/usb/net/if_axge.c
+++ b/freebsd/sys/dev/usb/net/if_axge.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2013-2014 Kevin Lo
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_axgereg.h b/freebsd/sys/dev/usb/net/if_axgereg.h
index c073610f..542ea6d1 100644
--- a/freebsd/sys/dev/usb/net/if_axgereg.h
+++ b/freebsd/sys/dev/usb/net/if_axgereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2013-2014 Kevin Lo
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_cdce.c b/freebsd/sys/dev/usb/net/if_cdce.c
index 777113da..ececc5b3 100644
--- a/freebsd/sys/dev/usb/net/if_cdce.c
+++ b/freebsd/sys/dev/usb/net/if_cdce.c
@@ -3,6 +3,8 @@
/* $NetBSD: if_cdce.c,v 1.4 2004/10/24 12:50:54 augustss Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
* Copyright (c) 2003-2005 Craig Boston
* Copyright (c) 2004 Daniel Hartmeier
diff --git a/freebsd/sys/dev/usb/net/if_cdcereg.h b/freebsd/sys/dev/usb/net/if_cdcereg.h
index 1bc2d603..26d037c5 100644
--- a/freebsd/sys/dev/usb/net/if_cdcereg.h
+++ b/freebsd/sys/dev/usb/net/if_cdcereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 2003-2005 Craig Boston
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_cue.c b/freebsd/sys/dev/usb/net/if_cue.c
index d5152dd4..63846a01 100644
--- a/freebsd/sys/dev/usb/net/if_cue.c
+++ b/freebsd/sys/dev/usb/net/if_cue.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_cuereg.h b/freebsd/sys/dev/usb/net/if_cuereg.h
index ff245c05..b5cccee4 100644
--- a/freebsd/sys/dev/usb/net/if_cuereg.h
+++ b/freebsd/sys/dev/usb/net/if_cuereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_ipheth.c b/freebsd/sys/dev/usb/net/if_ipheth.c
index 2eaf88b8..bb56c294 100644
--- a/freebsd/sys/dev/usb/net/if_ipheth.c
+++ b/freebsd/sys/dev/usb/net/if_ipheth.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
* Copyright (c) 2009 Diego Giagio. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_iphethvar.h b/freebsd/sys/dev/usb/net/if_iphethvar.h
index 65b0c940..4f990189 100644
--- a/freebsd/sys/dev/usb/net/if_iphethvar.h
+++ b/freebsd/sys/dev/usb/net/if_iphethvar.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
* Copyright (c) 2009 Diego Giagio. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_kue.c b/freebsd/sys/dev/usb/net/if_kue.c
index 26e09459..255a83bb 100644
--- a/freebsd/sys/dev/usb/net/if_kue.c
+++ b/freebsd/sys/dev/usb/net/if_kue.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_kuefw.h b/freebsd/sys/dev/usb/net/if_kuefw.h
index 2b055a92..8b799f01 100644
--- a/freebsd/sys/dev/usb/net/if_kuefw.h
+++ b/freebsd/sys/dev/usb/net/if_kuefw.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_kuereg.h b/freebsd/sys/dev/usb/net/if_kuereg.h
index 16ad044d..2f5d7ccb 100644
--- a/freebsd/sys/dev/usb/net/if_kuereg.h
+++ b/freebsd/sys/dev/usb/net/if_kuereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_mos.c b/freebsd/sys/dev/usb/net/if_mos.c
index 8cac9033..a25e9df6 100644
--- a/freebsd/sys/dev/usb/net/if_mos.c
+++ b/freebsd/sys/dev/usb/net/if_mos.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: 0BSD AND BSD-4-Clause
+ *
* Copyright (c) 2011 Rick van der Zwet <info@rickvanderzwet.nl>
*
* Permission to use, copy, modify, and distribute this software for any
diff --git a/freebsd/sys/dev/usb/net/if_mosreg.h b/freebsd/sys/dev/usb/net/if_mosreg.h
index c811d552..b8034feb 100644
--- a/freebsd/sys/dev/usb/net/if_mosreg.h
+++ b/freebsd/sys/dev/usb/net/if_mosreg.h
@@ -32,6 +32,8 @@
*/
/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1997, 1998, 1999, 2000-2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_rue.c b/freebsd/sys/dev/usb/net/if_rue.c
index e816a190..7b062755 100644
--- a/freebsd/sys/dev/usb/net/if_rue.c
+++ b/freebsd/sys/dev/usb/net/if_rue.c
@@ -27,6 +27,8 @@
* SUCH DAMAGE.
*/
/*-
+ * SPDX-License-Identifier: BSD-4-Clause AND BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_ruereg.h b/freebsd/sys/dev/usb/net/if_ruereg.h
index c90a9692..688ee24e 100644
--- a/freebsd/sys/dev/usb/net/if_ruereg.h
+++ b/freebsd/sys/dev/usb/net/if_ruereg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama@FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_smsc.c b/freebsd/sys/dev/usb/net/if_smsc.c
index 9c028b4e..88ecb618 100644
--- a/freebsd/sys/dev/usb/net/if_smsc.c
+++ b/freebsd/sys/dev/usb/net/if_smsc.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2012
* Ben Gray <bgray@freebsd.org>.
* All rights reserved.
@@ -1570,8 +1572,9 @@ smsc_fdt_find_eth_node(phandle_t start)
/* Traverse through entire tree to find usb ethernet nodes. */
for (node = OF_child(start); node != 0; node = OF_peer(node)) {
- if (ofw_bus_node_is_compatible(node, "net,ethernet") &&
- ofw_bus_node_is_compatible(node, "usb,device"))
+ if ((ofw_bus_node_is_compatible(node, "net,ethernet") &&
+ ofw_bus_node_is_compatible(node, "usb,device")) ||
+ ofw_bus_node_is_compatible(node, "usb424,ec00"))
return (node);
child = smsc_fdt_find_eth_node(node);
if (child != -1)
@@ -1638,6 +1641,37 @@ smsc_fdt_find_eth_node_by_path(phandle_t start)
return (-1);
}
+/*
+ * Look through known names that can contain mac address
+ * return 0 if valid MAC address has been found
+ */
+static int
+smsc_fdt_read_mac_property(phandle_t node, unsigned char *mac)
+{
+ int len;
+
+ /* Check if there is property */
+ if ((len = OF_getproplen(node, "local-mac-address")) > 0) {
+ if (len != ETHER_ADDR_LEN)
+ return (EINVAL);
+
+ OF_getprop(node, "local-mac-address", mac,
+ ETHER_ADDR_LEN);
+ return (0);
+ }
+
+ if ((len = OF_getproplen(node, "mac-address")) > 0) {
+ if (len != ETHER_ADDR_LEN)
+ return (EINVAL);
+
+ OF_getprop(node, "mac-address", mac,
+ ETHER_ADDR_LEN);
+ return (0);
+ }
+
+ return (ENXIO);
+}
+
/**
* Get MAC address from FDT blob. Firmware or loader should fill
* mac-address or local-mac-address property. Returns 0 if MAC address
@@ -1647,37 +1681,22 @@ static int
smsc_fdt_find_mac(unsigned char *mac)
{
phandle_t node, root;
- int len;
root = OF_finddevice("/");
node = smsc_fdt_find_eth_node(root);
+ if (node != -1) {
+ if (smsc_fdt_read_mac_property(node, mac) == 0)
+ return (0);
+ }
+
/*
* If it's not FreeBSD FDT blob for RPi, try more
* generic .../usb/hub/ethernet
*/
- if (node == -1)
- node = smsc_fdt_find_eth_node_by_path(root);
-
- if (node != -1) {
- /* Check if there is property */
- if ((len = OF_getproplen(node, "local-mac-address")) > 0) {
- if (len != ETHER_ADDR_LEN)
- return (EINVAL);
-
- OF_getprop(node, "local-mac-address", mac,
- ETHER_ADDR_LEN);
- return (0);
- }
+ node = smsc_fdt_find_eth_node_by_path(root);
- if ((len = OF_getproplen(node, "mac-address")) > 0) {
- if (len != ETHER_ADDR_LEN)
- return (EINVAL);
-
- OF_getprop(node, "mac-address", mac,
- ETHER_ADDR_LEN);
- return (0);
- }
- }
+ if (node != -1)
+ return smsc_fdt_read_mac_property(node, mac);
return (ENXIO);
}
diff --git a/freebsd/sys/dev/usb/net/if_smscreg.h b/freebsd/sys/dev/usb/net/if_smscreg.h
index 31a63828..5ad79b9e 100644
--- a/freebsd/sys/dev/usb/net/if_smscreg.h
+++ b/freebsd/sys/dev/usb/net/if_smscreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2012
* Ben Gray <bgray@freebsd.org>.
* All rights reserved.
diff --git a/freebsd/sys/dev/usb/net/if_udav.c b/freebsd/sys/dev/usb/net/if_udav.c
index b8393abc..21019265 100644
--- a/freebsd/sys/dev/usb/net/if_udav.c
+++ b/freebsd/sys/dev/usb/net/if_udav.c
@@ -4,6 +4,8 @@
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 2003
* Shingo WATANABE <nabe@nabechan.org>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_udavreg.h b/freebsd/sys/dev/usb/net/if_udavreg.h
index 7c35829b..d8927006 100644
--- a/freebsd/sys/dev/usb/net/if_udavreg.h
+++ b/freebsd/sys/dev/usb/net/if_udavreg.h
@@ -2,6 +2,8 @@
/* $nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $ */
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 2003
* Shingo WATANABE <nabe@nabechan.org>. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/if_ure.c b/freebsd/sys/dev/usb/net/if_ure.c
index 89ce723b..0e45a6c9 100644
--- a/freebsd/sys/dev/usb/net/if_ure.c
+++ b/freebsd/sys/dev/usb/net/if_ure.c
@@ -72,6 +72,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = {
URE_DEV(LENOVO, RTL8153, 0),
URE_DEV(REALTEK, RTL8152, URE_FLAG_8152),
URE_DEV(REALTEK, RTL8153, 0),
+ URE_DEV(TPLINK, RTL8153, 0),
#undef URE_DEV
};
diff --git a/freebsd/sys/dev/usb/net/ruephy.c b/freebsd/sys/dev/usb/net/ruephy.c
index af01d23b..d16bc8ae 100644
--- a/freebsd/sys/dev/usb/net/ruephy.c
+++ b/freebsd/sys/dev/usb/net/ruephy.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama@FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/ruephyreg.h b/freebsd/sys/dev/usb/net/ruephyreg.h
index 01d3cc17..38c508d5 100644
--- a/freebsd/sys/dev/usb/net/ruephyreg.h
+++ b/freebsd/sys/dev/usb/net/ruephyreg.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama@FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/net/usb_ethernet.c b/freebsd/sys/dev/usb/net/usb_ethernet.c
index 32c0fa22..842e7987 100644
--- a/freebsd/sys/dev/usb/net/usb_ethernet.c
+++ b/freebsd/sys/dev/usb/net/usb_ethernet.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009 Andrew Thompson (thompsa@FreeBSD.org)
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/net/usb_ethernet.h b/freebsd/sys/dev/usb/net/usb_ethernet.h
index d22e5d9b..c7afc650 100644
--- a/freebsd/sys/dev/usb/net/usb_ethernet.h
+++ b/freebsd/sys/dev/usb/net/usb_ethernet.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/quirk/usb_quirk.c b/freebsd/sys/dev/usb/quirk/usb_quirk.c
index 3ea3f3c6..8c9e91cb 100644
--- a/freebsd/sys/dev/usb/quirk/usb_quirk.c
+++ b/freebsd/sys/dev/usb/quirk/usb_quirk.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 1998 Lennart Augustsson. All rights reserved.
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
diff --git a/freebsd/sys/dev/usb/quirk/usb_quirk.h b/freebsd/sys/dev/usb/quirk/usb_quirk.h
index bb9fe190..e7f2e02f 100644
--- a/freebsd/sys/dev/usb/quirk/usb_quirk.h
+++ b/freebsd/sys/dev/usb/quirk/usb_quirk.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/serial/u3g.c b/freebsd/sys/dev/usb/serial/u3g.c
index 3582b6d8..0f3933e6 100644
--- a/freebsd/sys/dev/usb/serial/u3g.c
+++ b/freebsd/sys/dev/usb/serial/u3g.c
@@ -238,6 +238,8 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(DLINK, DWR510, 0),
U3G_DEV(DLINK, DWM157_CD, U3GINIT_SCSIEJECT),
U3G_DEV(DLINK, DWM157, 0),
+ U3G_DEV(DLINK, DWM222_CD, U3GINIT_SCSIEJECT),
+ U3G_DEV(DLINK, DWM222, 0),
U3G_DEV(DLINK3, DWM652, 0),
U3G_DEV(HP, EV2200, 0),
U3G_DEV(HP, HS2300, 0),
diff --git a/freebsd/sys/dev/usb/serial/ubsa.c b/freebsd/sys/dev/usb/serial/ubsa.c
index 61005fa0..8b6284f0 100644
--- a/freebsd/sys/dev/usb/serial/ubsa.c
+++ b/freebsd/sys/dev/usb/serial/ubsa.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/ubser.c b/freebsd/sys/dev/usb/serial/ubser.c
index 534c5e75..9fdb1d3a 100644
--- a/freebsd/sys/dev/usb/serial/ubser.c
+++ b/freebsd/sys/dev/usb/serial/ubser.c
@@ -10,6 +10,8 @@
*/
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/uchcom.c b/freebsd/sys/dev/usb/serial/uchcom.c
index 3bee03d9..1e741ccd 100644
--- a/freebsd/sys/dev/usb/serial/uchcom.c
+++ b/freebsd/sys/dev/usb/serial/uchcom.c
@@ -3,6 +3,8 @@
/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2007, Takanori Watanabe
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/ucycom.c b/freebsd/sys/dev/usb/serial/ucycom.c
index 6f83d450..1166d36d 100644
--- a/freebsd/sys/dev/usb/serial/ucycom.c
+++ b/freebsd/sys/dev/usb/serial/ucycom.c
@@ -4,6 +4,8 @@
__FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/ufoma.c b/freebsd/sys/dev/usb/serial/ufoma.c
index bcd70308..97ffea63 100644
--- a/freebsd/sys/dev/usb/serial/ufoma.c
+++ b/freebsd/sys/dev/usb/serial/ufoma.c
@@ -6,6 +6,8 @@
__FBSDID("$FreeBSD$");
#define UFOMA_HANDSFREE
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2005, Takanori Watanabe
* Copyright (c) 2003, M. Warner Losh <imp@FreeBSD.org>.
* All rights reserved.
diff --git a/freebsd/sys/dev/usb/serial/uftdi.c b/freebsd/sys/dev/usb/serial/uftdi.c
index a40ee4f7..d07c055d 100644
--- a/freebsd/sys/dev/usb/serial/uftdi.c
+++ b/freebsd/sys/dev/usb/serial/uftdi.c
@@ -3,6 +3,8 @@
/* $NetBSD: uftdi.c,v 1.13 2002/09/23 05:51:23 simonb Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/ugensa.c b/freebsd/sys/dev/usb/serial/ugensa.c
index 15f6c9e3..2737227c 100644
--- a/freebsd/sys/dev/usb/serial/ugensa.c
+++ b/freebsd/sys/dev/usb/serial/ugensa.c
@@ -3,7 +3,9 @@
/* $FreeBSD$ */
/* $NetBSD: ugensa.c,v 1.9.2.1 2007/03/24 14:55:50 yamt Exp $ */
-/*
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/uipaq.c b/freebsd/sys/dev/usb/serial/uipaq.c
index b512b0e5..bf746295 100644
--- a/freebsd/sys/dev/usb/serial/uipaq.c
+++ b/freebsd/sys/dev/usb/serial/uipaq.c
@@ -3,7 +3,9 @@
/* $NetBSD: uipaq.c,v 1.4 2006/11/16 01:33:27 christos Exp $ */
/* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */
-/*
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2000-2005 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/ulpt.c b/freebsd/sys/dev/usb/serial/ulpt.c
index bd2d966a..c966e602 100644
--- a/freebsd/sys/dev/usb/serial/ulpt.c
+++ b/freebsd/sys/dev/usb/serial/ulpt.c
@@ -6,6 +6,8 @@ __FBSDID("$FreeBSD$");
/* $NetBSD: ulpt.c,v 1.60 2003/10/04 21:19:50 augustss Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/umcs.c b/freebsd/sys/dev/usb/serial/umcs.c
index 5d803e44..8f083ce3 100644
--- a/freebsd/sys/dev/usb/serial/umcs.c
+++ b/freebsd/sys/dev/usb/serial/umcs.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2010 Lev Serebryakov <lev@FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/umcs.h b/freebsd/sys/dev/usb/serial/umcs.h
index 8ba57c13..288988c2 100644
--- a/freebsd/sys/dev/usb/serial/umcs.h
+++ b/freebsd/sys/dev/usb/serial/umcs.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2010 Lev Serebryakov <lev@FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/umct.c b/freebsd/sys/dev/usb/serial/umct.c
index 5c00985d..e6877a36 100644
--- a/freebsd/sys/dev/usb/serial/umct.c
+++ b/freebsd/sys/dev/usb/serial/umct.c
@@ -4,6 +4,8 @@
__FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2003 Scott Long
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/umodem.c b/freebsd/sys/dev/usb/serial/umodem.c
index 2d36f125..c64600c8 100644
--- a/freebsd/sys/dev/usb/serial/umodem.c
+++ b/freebsd/sys/dev/usb/serial/umodem.c
@@ -6,6 +6,8 @@
__FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2003, M. Warner Losh <imp@FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/uplcom.c b/freebsd/sys/dev/usb/serial/uplcom.c
index 7ec41e97..2b90e4d6 100644
--- a/freebsd/sys/dev/usb/serial/uplcom.c
+++ b/freebsd/sys/dev/usb/serial/uplcom.c
@@ -6,6 +6,8 @@
__FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/usb_serial.c b/freebsd/sys/dev/usb/serial/usb_serial.c
index eb3adabd..46a18d63 100644
--- a/freebsd/sys/dev/usb/serial/usb_serial.c
+++ b/freebsd/sys/dev/usb/serial/usb_serial.c
@@ -3,6 +3,8 @@
/* $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2001-2003, 2005, 2008
* Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* All rights reserved.
diff --git a/freebsd/sys/dev/usb/serial/usb_serial.h b/freebsd/sys/dev/usb/serial/usb_serial.h
index 2c53f445..9a5e043e 100644
--- a/freebsd/sys/dev/usb/serial/usb_serial.h
+++ b/freebsd/sys/dev/usb/serial/usb_serial.h
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/uvisor.c b/freebsd/sys/dev/usb/serial/uvisor.c
index c749b415..18db98c7 100644
--- a/freebsd/sys/dev/usb/serial/uvisor.c
+++ b/freebsd/sys/dev/usb/serial/uvisor.c
@@ -16,6 +16,8 @@
*/
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/serial/uvscom.c b/freebsd/sys/dev/usb/serial/uvscom.c
index 04d92a41..f4cc6ee6 100644
--- a/freebsd/sys/dev/usb/serial/uvscom.c
+++ b/freebsd/sys/dev/usb/serial/uvscom.c
@@ -6,6 +6,8 @@
__FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/storage/umass.c b/freebsd/sys/dev/usb/storage/umass.c
index c99874e2..6b488cf7 100644
--- a/freebsd/sys/dev/usb/storage/umass.c
+++ b/freebsd/sys/dev/usb/storage/umass.c
@@ -4,6 +4,8 @@
__FBSDID("$FreeBSD$");
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
* Nick Hibma <n_hibma@FreeBSD.org>
* All rights reserved.
diff --git a/freebsd/sys/dev/usb/ufm_ioctl.h b/freebsd/sys/dev/usb/ufm_ioctl.h
index 5a233883..599d36d4 100644
--- a/freebsd/sys/dev/usb/ufm_ioctl.h
+++ b/freebsd/sys/dev/usb/ufm_ioctl.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2001 M. Warner Losh
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/usb.h b/freebsd/sys/dev/usb/usb.h
index 95b4f4ac..ff33cf00 100644
--- a/freebsd/sys/dev/usb/usb.h
+++ b/freebsd/sys/dev/usb/usb.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
* Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 1998 Lennart Augustsson. All rights reserved.
diff --git a/freebsd/sys/dev/usb/usb_bus.h b/freebsd/sys/dev/usb/usb_bus.h
index 3ceeb1ef..710436c1 100644
--- a/freebsd/sys/dev/usb/usb_bus.h
+++ b/freebsd/sys/dev/usb/usb_bus.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_busdma.c b/freebsd/sys/dev/usb/usb_busdma.c
index 446e36e6..9a70c687 100644
--- a/freebsd/sys/dev/usb/usb_busdma.c
+++ b/freebsd/sys/dev/usb/usb_busdma.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_busdma.h b/freebsd/sys/dev/usb/usb_busdma.h
index 077bf8b8..d75e67ee 100644
--- a/freebsd/sys/dev/usb/usb_busdma.h
+++ b/freebsd/sys/dev/usb/usb_busdma.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_cdc.h b/freebsd/sys/dev/usb/usb_cdc.h
index 86f35170..d77c24bb 100644
--- a/freebsd/sys/dev/usb/usb_cdc.h
+++ b/freebsd/sys/dev/usb/usb_cdc.h
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/usb_controller.h b/freebsd/sys/dev/usb/usb_controller.h
index 6a2f6b03..59139e64 100644
--- a/freebsd/sys/dev/usb/usb_controller.h
+++ b/freebsd/sys/dev/usb/usb_controller.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_core.c b/freebsd/sys/dev/usb/usb_core.c
index 3d9daa26..09bfdb2b 100644
--- a/freebsd/sys/dev/usb/usb_core.c
+++ b/freebsd/sys/dev/usb/usb_core.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_core.h b/freebsd/sys/dev/usb/usb_core.h
index 9f52e65a..01018ca9 100644
--- a/freebsd/sys/dev/usb/usb_core.h
+++ b/freebsd/sys/dev/usb/usb_core.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_debug.c b/freebsd/sys/dev/usb/usb_debug.c
index 000319b1..e3a1474e 100644
--- a/freebsd/sys/dev/usb/usb_debug.c
+++ b/freebsd/sys/dev/usb/usb_debug.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_debug.h b/freebsd/sys/dev/usb/usb_debug.h
index e30f2c2c..87c0dcfe 100644
--- a/freebsd/sys/dev/usb/usb_debug.h
+++ b/freebsd/sys/dev/usb/usb_debug.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_dev.c b/freebsd/sys/dev/usb/usb_dev.c
index b0ad9aaf..2b244d80 100644
--- a/freebsd/sys/dev/usb/usb_dev.c
+++ b/freebsd/sys/dev/usb/usb_dev.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2006-2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_dev.h b/freebsd/sys/dev/usb/usb_dev.h
index f87ba53b..ae851153 100644
--- a/freebsd/sys/dev/usb/usb_dev.h
+++ b/freebsd/sys/dev/usb/usb_dev.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_device.c b/freebsd/sys/dev/usb/usb_device.c
index 6a193a75..861f6029 100644
--- a/freebsd/sys/dev/usb/usb_device.c
+++ b/freebsd/sys/dev/usb/usb_device.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_device.h b/freebsd/sys/dev/usb/usb_device.h
index 22e15606..1cf48ea1 100644
--- a/freebsd/sys/dev/usb/usb_device.h
+++ b/freebsd/sys/dev/usb/usb_device.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_dynamic.c b/freebsd/sys/dev/usb/usb_dynamic.c
index c2ca9af6..9eb835ad 100644
--- a/freebsd/sys/dev/usb/usb_dynamic.c
+++ b/freebsd/sys/dev/usb/usb_dynamic.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_dynamic.h b/freebsd/sys/dev/usb/usb_dynamic.h
index e52c46fb..2d46afc8 100644
--- a/freebsd/sys/dev/usb/usb_dynamic.h
+++ b/freebsd/sys/dev/usb/usb_dynamic.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_endian.h b/freebsd/sys/dev/usb/usb_endian.h
index 0bbcb9bf..59761767 100644
--- a/freebsd/sys/dev/usb/usb_endian.h
+++ b/freebsd/sys/dev/usb/usb_endian.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_error.c b/freebsd/sys/dev/usb/usb_error.c
index 2cc49964..2c58c508 100644
--- a/freebsd/sys/dev/usb/usb_error.c
+++ b/freebsd/sys/dev/usb/usb_error.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_freebsd.h b/freebsd/sys/dev/usb/usb_freebsd.h
index bc5d2422..1eff3e14 100644
--- a/freebsd/sys/dev/usb/usb_freebsd.h
+++ b/freebsd/sys/dev/usb/usb_freebsd.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_generic.c b/freebsd/sys/dev/usb/usb_generic.c
index ae14bae3..29a27d53 100644
--- a/freebsd/sys/dev/usb/usb_generic.c
+++ b/freebsd/sys/dev/usb/usb_generic.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_generic.h b/freebsd/sys/dev/usb/usb_generic.h
index 835ec72a..d03f25cd 100644
--- a/freebsd/sys/dev/usb/usb_generic.h
+++ b/freebsd/sys/dev/usb/usb_generic.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_handle_request.c b/freebsd/sys/dev/usb/usb_handle_request.c
index c6b4db32..458d1fc1 100644
--- a/freebsd/sys/dev/usb/usb_handle_request.c
+++ b/freebsd/sys/dev/usb/usb_handle_request.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_hid.c b/freebsd/sys/dev/usb/usb_hid.c
index 5019aa1a..c2d93f3a 100644
--- a/freebsd/sys/dev/usb/usb_hid.c
+++ b/freebsd/sys/dev/usb/usb_hid.c
@@ -3,6 +3,8 @@
/* $FreeBSD$ */
/* $NetBSD: hid.c,v 1.17 2001/11/13 06:24:53 lukem Exp $ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/usb_hub.c b/freebsd/sys/dev/usb/usb_hub.c
index 0eaeeb60..a0ad462f 100644
--- a/freebsd/sys/dev/usb/usb_hub.c
+++ b/freebsd/sys/dev/usb/usb_hub.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 1998 Lennart Augustsson. All rights reserved.
* Copyright (c) 2008-2010 Hans Petter Selasky. All rights reserved.
diff --git a/freebsd/sys/dev/usb/usb_hub.h b/freebsd/sys/dev/usb/usb_hub.h
index 16430d9b..3d4e0837 100644
--- a/freebsd/sys/dev/usb/usb_hub.h
+++ b/freebsd/sys/dev/usb/usb_hub.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_ioctl.h b/freebsd/sys/dev/usb/usb_ioctl.h
index 683f3e61..7cf90649 100644
--- a/freebsd/sys/dev/usb/usb_ioctl.h
+++ b/freebsd/sys/dev/usb/usb_ioctl.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
* Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 1998 Lennart Augustsson. All rights reserved.
diff --git a/freebsd/sys/dev/usb/usb_lookup.c b/freebsd/sys/dev/usb/usb_lookup.c
index 533080ef..6f6a763f 100644
--- a/freebsd/sys/dev/usb/usb_lookup.c
+++ b/freebsd/sys/dev/usb/usb_lookup.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_mbuf.c b/freebsd/sys/dev/usb/usb_mbuf.c
index b1cc3276..62c14264 100644
--- a/freebsd/sys/dev/usb/usb_mbuf.c
+++ b/freebsd/sys/dev/usb/usb_mbuf.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_mbuf.h b/freebsd/sys/dev/usb/usb_mbuf.h
index 3b331ffc..2466e2e4 100644
--- a/freebsd/sys/dev/usb/usb_mbuf.h
+++ b/freebsd/sys/dev/usb/usb_mbuf.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_msctest.c b/freebsd/sys/dev/usb/usb_msctest.c
index f0eede28..d8d11eca 100644
--- a/freebsd/sys/dev/usb/usb_msctest.c
+++ b/freebsd/sys/dev/usb/usb_msctest.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008,2011 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_msctest.h b/freebsd/sys/dev/usb/usb_msctest.h
index d3f26c2b..6b5d3283 100644
--- a/freebsd/sys/dev/usb/usb_msctest.h
+++ b/freebsd/sys/dev/usb/usb_msctest.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_parse.c b/freebsd/sys/dev/usb/usb_parse.c
index 776e1f05..638aaf77 100644
--- a/freebsd/sys/dev/usb/usb_parse.c
+++ b/freebsd/sys/dev/usb/usb_parse.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_pf.h b/freebsd/sys/dev/usb/usb_pf.h
index 29fe6ebd..03f7ba98 100644
--- a/freebsd/sys/dev/usb/usb_pf.h
+++ b/freebsd/sys/dev/usb/usb_pf.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1990, 1991, 1993
* The Regents of the University of California. All rights reserved.
*
diff --git a/freebsd/sys/dev/usb/usb_process.c b/freebsd/sys/dev/usb/usb_process.c
index 88f09804..6c4cc7ad 100644
--- a/freebsd/sys/dev/usb/usb_process.c
+++ b/freebsd/sys/dev/usb/usb_process.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_process.h b/freebsd/sys/dev/usb/usb_process.h
index dd20afd4..7be78917 100644
--- a/freebsd/sys/dev/usb/usb_process.h
+++ b/freebsd/sys/dev/usb/usb_process.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_request.c b/freebsd/sys/dev/usb/usb_request.c
index ef8ed3e6..6be241c2 100644
--- a/freebsd/sys/dev/usb/usb_request.c
+++ b/freebsd/sys/dev/usb/usb_request.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 1998 Lennart Augustsson. All rights reserved.
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
diff --git a/freebsd/sys/dev/usb/usb_request.h b/freebsd/sys/dev/usb/usb_request.h
index 9f0a4e64..7c653132 100644
--- a/freebsd/sys/dev/usb/usb_request.h
+++ b/freebsd/sys/dev/usb/usb_request.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_transfer.c b/freebsd/sys/dev/usb/usb_transfer.c
index ee80d9bb..7ea25337 100644
--- a/freebsd/sys/dev/usb/usb_transfer.c
+++ b/freebsd/sys/dev/usb/usb_transfer.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_transfer.h b/freebsd/sys/dev/usb/usb_transfer.h
index f035240b..da632a73 100644
--- a/freebsd/sys/dev/usb/usb_transfer.h
+++ b/freebsd/sys/dev/usb/usb_transfer.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_util.c b/freebsd/sys/dev/usb/usb_util.c
index 4d8c9c56..aa705751 100644
--- a/freebsd/sys/dev/usb/usb_util.c
+++ b/freebsd/sys/dev/usb/usb_util.c
@@ -2,6 +2,8 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usb_util.h b/freebsd/sys/dev/usb/usb_util.h
index 7e52404f..87e54d35 100644
--- a/freebsd/sys/dev/usb/usb_util.h
+++ b/freebsd/sys/dev/usb/usb_util.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usbdi.h b/freebsd/sys/dev/usb/usbdi.h
index 6ad3e43e..2be8eef1 100644
--- a/freebsd/sys/dev/usb/usbdi.h
+++ b/freebsd/sys/dev/usb/usbdi.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009 Andrew Thompson
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usbdi_util.h b/freebsd/sys/dev/usb/usbdi_util.h
index 1e450f8f..d0ee6f9d 100644
--- a/freebsd/sys/dev/usb/usbdi_util.h
+++ b/freebsd/sys/dev/usb/usbdi_util.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2009 Andrew Thompson
*
* Redistribution and use in source and binary forms, with or without
diff --git a/freebsd/sys/dev/usb/usbhid.h b/freebsd/sys/dev/usb/usbhid.h
index 31aa7ea4..8870e291 100644
--- a/freebsd/sys/dev/usb/usbhid.h
+++ b/freebsd/sys/dev/usb/usbhid.h
@@ -1,5 +1,7 @@
/* $FreeBSD$ */
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-NetBSD
+ *
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
* Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
* Copyright (c) 1998 Lennart Augustsson. All rights reserved.
diff --git a/freebsd/sys/dev/usb/wlan/if_rsu.c b/freebsd/sys/dev/usb/wlan/if_rsu.c
index 2415d2f2..179de4e5 100644
--- a/freebsd/sys/dev/usb/wlan/if_rsu.c
+++ b/freebsd/sys/dev/usb/wlan/if_rsu.c
@@ -73,8 +73,11 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usbdi.h>
#include <rtems/bsd/local/usbdevs.h>
+#include <dev/rtwn/if_rtwn_ridx.h> /* XXX */
#include <dev/usb/wlan/if_rsureg.h>
+#define RSU_RATE_IS_CCK RTWN_RATE_IS_CCK
+
#ifdef USB_DEBUG
static int rsu_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW, 0, "USB rsu");
@@ -2387,44 +2390,6 @@ rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m)
rssi = rsu_hwrssi_to_rssi(sc, sc->sc_currssi);
}
- if (ieee80211_radiotap_active(ic)) {
- struct rsu_rx_radiotap_header *tap = &sc->sc_rxtap;
-
- /* Map HW rate index to 802.11 rate. */
- tap->wr_flags = 0; /* TODO */
- tap->wr_tsft = rsu_get_tsf_high(sc);
- if (le32toh(stat->tsf_low) > rsu_get_tsf_low(sc))
- tap->wr_tsft--;
- tap->wr_tsft = (uint64_t)htole32(tap->wr_tsft) << 32;
- tap->wr_tsft += stat->tsf_low;
-
- if (rate < 12) {
- switch (rate) {
- /* CCK. */
- case 0: tap->wr_rate = 2; break;
- case 1: tap->wr_rate = 4; break;
- case 2: tap->wr_rate = 11; break;
- case 3: tap->wr_rate = 22; break;
- /* OFDM. */
- case 4: tap->wr_rate = 12; break;
- case 5: tap->wr_rate = 18; break;
- case 6: tap->wr_rate = 24; break;
- case 7: tap->wr_rate = 36; break;
- case 8: tap->wr_rate = 48; break;
- case 9: tap->wr_rate = 72; break;
- case 10: tap->wr_rate = 96; break;
- case 11: tap->wr_rate = 108; break;
- }
- } else { /* MCS0~15. */
- /* Bit 7 set means HT MCS instead of rate. */
- tap->wr_rate = 0x80 | (rate - 12);
- }
-
- tap->wr_dbm_antsignal = rssi;
- tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
- tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
- };
-
/* Hardware does Rx TCP checksum offload. */
/*
* This flag can be set for some other
@@ -2470,65 +2435,34 @@ rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m)
rxs.c_nf = -96;
/* Rate */
- if (!(rxdw3 & R92S_RXDW3_HTC)) {
- switch (rate) {
- /* CCK. */
- case 0:
- rxs.c_rate = 2;
- rxs.c_pktflags |= IEEE80211_RX_F_CCK;
- break;
- case 1:
- rxs.c_rate = 4;
- rxs.c_pktflags |= IEEE80211_RX_F_CCK;
- break;
- case 2:
- rxs.c_rate = 11;
+ if (rate < 12) {
+ rxs.c_rate = ridx2rate[rate];
+ if (RSU_RATE_IS_CCK(rate))
rxs.c_pktflags |= IEEE80211_RX_F_CCK;
- break;
- case 3:
- rxs.c_rate = 22;
- rxs.c_pktflags |= IEEE80211_RX_F_CCK;
- break;
- /* OFDM. */
- case 4:
- rxs.c_rate = 12;
- rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- case 5:
- rxs.c_rate = 18;
- rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- case 6:
- rxs.c_rate = 24;
- rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- case 7:
- rxs.c_rate = 36;
- rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- case 8:
- rxs.c_rate = 48;
- rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- case 9:
- rxs.c_rate = 72;
- rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- case 10:
- rxs.c_rate = 96;
- rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- case 11:
- rxs.c_rate = 108;
+ else
rxs.c_pktflags |= IEEE80211_RX_F_OFDM;
- break;
- }
- } else if (rate >= 12) { /* MCS0~15. */
- /* Bit 7 set means HT MCS instead of rate. */
- rxs.c_rate = (rate - 12);
+ } else {
+ rxs.c_rate = IEEE80211_RATE_MCS | (rate - 12);
rxs.c_pktflags |= IEEE80211_RX_F_HT;
}
+ if (ieee80211_radiotap_active(ic)) {
+ struct rsu_rx_radiotap_header *tap = &sc->sc_rxtap;
+
+ /* Map HW rate index to 802.11 rate. */
+ tap->wr_flags = 0; /* TODO */
+ tap->wr_tsft = rsu_get_tsf_high(sc);
+ if (le32toh(stat->tsf_low) > rsu_get_tsf_low(sc))
+ tap->wr_tsft--;
+ tap->wr_tsft = (uint64_t)htole32(tap->wr_tsft) << 32;
+ tap->wr_tsft += stat->tsf_low;
+
+ tap->wr_rate = rxs.c_rate;
+ tap->wr_dbm_antsignal = rssi;
+ tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
+ tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
+ };
+
(void) ieee80211_add_rx_params(m, &rxs);
/* Drop descriptor. */
diff --git a/freebsd/sys/dev/usb/wlan/if_uath.c b/freebsd/sys/dev/usb/wlan/if_uath.c
index c4ebe5ed..e1aa5ec0 100644
--- a/freebsd/sys/dev/usb/wlan/if_uath.c
+++ b/freebsd/sys/dev/usb/wlan/if_uath.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND 0BSD
+ *
* Copyright (c) 2006 Sam Leffler, Errno Consulting
* Copyright (c) 2008-2009 Weongyo Jeong <weongyo@freebsd.org>
* All rights reserved.
diff --git a/freebsd/sys/dev/usb/wlan/if_zydfw.h b/freebsd/sys/dev/usb/wlan/if_zydfw.h
index 46f5c2ab..f18442e9 100644
--- a/freebsd/sys/dev/usb/wlan/if_zydfw.h
+++ b/freebsd/sys/dev/usb/wlan/if_zydfw.h
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (C) 2001, 2002, 2003,2004 ZyDAS Technology Corporation.
* All rights reserved.
*