sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
show more ...
[mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code.* Target module have ic plus etherswitch ip175c.* Also add etherswitch support code on rt driver.Reviewed by: mizhkaDifferential R
[mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code.* Target module have ic plus etherswitch ip175c.* Also add etherswitch support code on rt driver.Reviewed by: mizhkaDifferential Revision: https://reviews.freebsd.org/D10336
rt_attach(): double assignment.Found with: coccinelle (da.cocci)
Set GDMA1 Frames Destination Port to Port 0 (CPU)Some U-Boot versions do not initialize MT7620's Frame Engine.Then it is not possible to receive packets from the network.Setting GDMA1 Frames Dest
Set GDMA1 Frames Destination Port to Port 0 (CPU)Some U-Boot versions do not initialize MT7620's Frame Engine.Then it is not possible to receive packets from the network.Setting GDMA1 Frames Destination Port to Port 0 (CPU) in GDM ForwardingConfiguration register solves this issue.Submitted by: Hiroki Mori ([email protected])Reviewed by: adrian mizhka (previous version)Differential Revision: https://reviews.freebsd.org/D9301
Add compat strings used by OpenWRT to some Mediatek/Ralink driversApproved by: adrian (mentor)Sponsored by: Smartcom - Bulgaria ADDifferential Revision: https://reviews.freebsd.org/D5995
Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitionsThis revision gets our Mediatek/Ralink drivers closer to OpenWRT's dtsdefinitions, so we can reuse them with less modifications la
Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitionsThis revision gets our Mediatek/Ralink drivers closer to OpenWRT's dtsdefinitions, so we can reuse them with less modifications later in orderto bring support for a lot of boards at once.Approved by: adrian (mentor)Sponsored by: Smartcom - Bulgaria ADDifferential Revision: https://reviews.freebsd.org/D5961
Cleanup unnecessary semicolons from the kernel.Found with devel/coccinelle.
This revision adds support to if_rt for more SoCs.The SoCs I've tried the driver with include the following:RT3050, RT5350, RT3662, RT3883, MT7620, MT7621, MT7688.On boards, based on the above So
This revision adds support to if_rt for more SoCs.The SoCs I've tried the driver with include the following:RT3050, RT5350, RT3662, RT3883, MT7620, MT7621, MT7688.On boards, based on the above SoCs traffic is passing through correctlyand the boards survive a flood ping with very little or no drops (dropsmay be caused elsewhere in my test setup, however).One issue still remains and needs to be fixed in the future: if_rt doesnot survive an ifconfig rt0 down/ifconfig rt0 up cycle.This issue existed before this commit as well, however.Reviewed by: rayApproved by: adrian (mentor)Sponsored by: Smartcom - Bulgaria ADDifferential Revision: https://reviews.freebsd.org/D5864
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd.org/D5373
Eliminate code for walking through the early static env data. This codeis called from a device attach routine, and thus cannot be called beforethe cutover from static to dynamic kernel env.
[rt] add support for the RT5350 and MT7620 SoCs.This is a work in progress; bringing the interface down stops furtheruse. It only happens on RT5350/MT7620.This is based on work by Alexander A.
[rt] add support for the RT5350 and MT7620 SoCs.This is a work in progress; bringing the interface down stops furtheruse. It only happens on RT5350/MT7620.This is based on work by Alexander A. Mityaev <[email protected]>.Submitted by: Stanislav Galabov <[email protected]>
Fix multiple incorrect SYSCTL arguments in the kernel:- Wrong integer type was specified.- Wrong or missing "access" specifier. The "access" specifiersometimes included the SYSCTL type, which it
Fix multiple incorrect SYSCTL arguments in the kernel:- Wrong integer type was specified.- Wrong or missing "access" specifier. The "access" specifiersometimes included the SYSCTL type, which it should not, except forprocedural SYSCTL nodes.- Logical OR where binary OR was expected.- Properly assert the "access" argument passed to all SYSCTL macros,using the CTASSERT macro. This applies to both static- and dynamicallycreated SYSCTLs.- Properly assert the the data type for both static and dynamicSYSCTLs. In the case of static SYSCTLs we only assert that the datapointed to by the SYSCTL data pointer has the correct size, hencethere is no easy way to assert types in the C language outside aC-function.- Rewrote some code which doesn't pass a constant "access" specifierwhen creating dynamic SYSCTL nodes, which is now a requirement.- Updated "EXAMPLES" section in SYSCTL manual page.MFC after: 3 daysSponsored by: Mellanox Technologies
Follow up to r225617. In order to maximize the re-usability of kernel codein userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv().This fixes a namespace collision with libc sy
Follow up to r225617. In order to maximize the re-usability of kernel codein userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv().This fixes a namespace collision with libc symbols.Submitted by: kmacyTested by: make universe
Mechanically convert to if_inc_counter().
Use define from if_var.h to access a field inside struct if_data,that resides in struct ifnet.Sponsored by: Nginx, Inc.
Pull in r267961 and r267973 again. Fix for issues reported will follow.
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statica
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statically anddynamically created ones, except for the SYSCTL NODE type and SYSCTLswhich belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added tobe used in the case a tunable sysctl has a custom initialisationfunction allowing the sysctl to still be marked as a tunable. Thekernel SYSCTL API is mostly the same, with a few exceptions for somespecial operations like iterating childrens of a static/extern SYSCTLnode. This operation should probably be made into a factored outcommon macro, hence some device drivers use this. The reason forchanging the SYSCTL API was the need for a SYSCTL parent OID pointerand not only the SYSCTL parent OID list pointer in order to quicklygenerate the sysctl path. The motivation behind this patch is to avoidparameter loading cludges inside the OFED driver subsystem. Instead ofadding special code to the OFED driver subsystem to post-load tunablesinto dynamically created sysctls, we generalize this in the kernel.Other changes:- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"to "hw.pcic.intr_mask".- Removed redundant TUNABLE statements throughout the kernel.- Some minor code rewrites in connection to removing not neededTUNABLE statements.- Added a missing SYSCTL_DECL().- Wrapped two very long lines.- Avoid malloc()/free() inside sysctl string handling, in case it iscalled to initialize a sysctl from a tunable, hence malloc()/free() isnot ready when sysctls from the sysctl dataset are registered.- Bumped FreeBSD version to indicate SYSCTL API change.MFC after: 2 weeksSponsored by: Mellanox Technologies
More BUS_PROBE_NOWILDCARD sweeping. Some devices here (if_ath_ahb and siba)resist easy conversion since they implement a great deal of their attachlogic inside probe(). Some of this could be fixed
More BUS_PROBE_NOWILDCARD sweeping. Some devices here (if_ath_ahb and siba)resist easy conversion since they implement a great deal of their attachlogic inside probe(). Some of this could be fixed by moving it to attach(),but some requires something more subtle than BUS_PROBE_NOWILDCARD.
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareto this event, adding if_var.h to files that do need it. Also, includeall includes that now are included due to implicit po
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareto this event, adding if_var.h to files that do need it. Also, includeall includes that now are included due to implicit pollution via if_var.hSponsored by: NetflixSponsored by: Nginx, Inc.
- Use the consistenly PHY-specific reset routine PHY_RESET() rather than generic mii_phy_reset().- Return the result of mii_mediachg() rather than blindly returning 0.- on smsc(4), driver lock sh
- Use the consistenly PHY-specific reset routine PHY_RESET() rather than generic mii_phy_reset().- Return the result of mii_mediachg() rather than blindly returning 0.- on smsc(4), driver lock should be held to get current mii_media_active/mii_media_status value.Reviewed by: yongari
Mechanically substitute flags from historic mbuf allocator withmalloc(9) flags in sys/dev.
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againReviewed by: yongari
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel- While at it, use DEVMETHOD_END. Discussed with: jhb- Also while at it, use __FBSDID.
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.The SYSCTL_NODE macro defines a list that stores all child-elements ofthat node. If there's no SYSCTL_DECL macro anywhere else,
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.The SYSCTL_NODE macro defines a list that stores all child-elements ofthat node. If there's no SYSCTL_DECL macro anywhere else, there's noreason why it shouldn't be static.
12