Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that arestill not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that arestill not MPSAFE (or already are but aren’t properly marked).Use it in preparation for a general review of all nodes.This is non-functional change that adds annotations to SYSCTL_NODE andSYSCTL_PROC nodes using one of the soon-to-be-required flags.Mark all obvious cases as MPSAFE. All entries that haven't been markedas MPSAFE before are by default marked as NEEDGIANTApproved by: kib (mentor, blanket)Commented by: kib, gallatin, melifaroDifferential Revision: https://reviews.freebsd.org/D23718
show more ...
[etherswitch] fix LINT build for rtl8366rbBuild with rtl8366rb has been broken due to incorrect retrieval of pointerto device_t.Reported by: lwhsuDifferential Revision: https://reviews.freebsd.
[etherswitch] fix LINT build for rtl8366rbBuild with rtl8366rb has been broken due to incorrect retrieval of pointerto device_t.Reported by: lwhsuDifferential Revision: https://reviews.freebsd.org/D14044
[etherswitch] check if_alloc returns NULLThis patch is cosmetic. It checks if allocation of ifnet structure failed.It's better to have this check rather than assume positive scenario.Submitted b
[etherswitch] check if_alloc returns NULLThis patch is cosmetic. It checks if allocation of ifnet structure failed.It's better to have this check rather than assume positive scenario.Submitted by: Dmitry Luhtionov <[email protected]>Reported by: Dmitry Luhtionov <[email protected]>
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.
[etherswitch] [rtl8366] add phy4cpu setting and support mdioproxyTested on WZR-HP-G301NH(RTL8366RB) and WZR-HP-G300NH(RTL8366SR).Submitted by: Hiroki Mori <[email protected]>Differential R
[etherswitch] [rtl8366] add phy4cpu setting and support mdioproxyTested on WZR-HP-G301NH(RTL8366RB) and WZR-HP-G300NH(RTL8366SR).Submitted by: Hiroki Mori <[email protected]>Differential Revision: https://reviews.freebsd.org/D10740
[etherswitch] add RTL8366SR supportAdd RTL8366SR support at etherswitch driver. Tested on RTL8366RB andRTL8366SR.Submitted by: Hiroki Mori <[email protected]>Reviewed by: adrian, mizhkaApp
[etherswitch] add RTL8366SR supportAdd RTL8366SR support at etherswitch driver. Tested on RTL8366RB andRTL8366SR.Submitted by: Hiroki Mori <[email protected]>Reviewed by: adrian, mizhkaApproved by: adrian(mentor)Differential Revision: https://reviews.freebsd.org/D6796
Revert r268543.We should probably fix sys/gpio.h instead.
Move iic.h to sys/ so that it's automatically installed in /usr/include/sys.This lets us call iic(4) ioctls without needing the kernel source codeand follows the same model of GPIO.MFC after: 3
Move iic.h to sys/ so that it's automatically installed in /usr/include/sys.This lets us call iic(4) ioctls without needing the kernel source codeand follows the same model of GPIO.MFC after: 3 weeks
Allow the PVID setting on CPU port.Return our static list of supported media for the CPU port.Tested on TP-Link 1043ND.
Initialize the switch vlan table at attachment.Update some comments on code, specifying the correct vlans used on switchsetup.Advertise the proper switch operation mode (the rtl8366rb only suppo
Initialize the switch vlan table at attachment.Update some comments on code, specifying the correct vlans used on switchsetup.Advertise the proper switch operation mode (the rtl8366rb only supportdot1q vlans).This fixes the breakage that i introduced on r249752 and make the rtl8366rbswitch works again with etherswitchcfg(8).Tested on TP-Link 1043ND.Tested by: me, Harm Weites (harm at weites.com)
Fix the reported status for the switch CPU port which was (wrongly)reporting half-duplex link.Tested on TP-Link WR1043ND.
Add the CPU port flag to the CPU port on rtl8366 (port 5).Do not allow any media change on the switch CPU port.Tested on TP-Link WR1043ND.
Fix the build of TP-WN1043ND kernel. Provide necessary includes and removeunnecessary includes for rtl8366rb.Approved by: adrian (mentor)
Add a new flag (ETHERSWITCH_VID_VALID) to say what vlangroups are in use.This fix the case when etherswitch is printing the information of port 0vlan group (in port based vlan mode) with no member
Add a new flag (ETHERSWITCH_VID_VALID) to say what vlangroups are in use.This fix the case when etherswitch is printing the information of port 0vlan group (in port based vlan mode) with no member ports.Add the ETHERSWITCH_VID_VALID support to ip17x driver.Add the ETHERSWITCH_VID_VALID support to rt8366 driver.arswitch doesn't need to be updated as it doesn't support vlans managementyet.Approved by: adrian (mentor)
Convert over the etherswitch framework to use VLAN IDs per port, ratherthan VLAN groups.Some chips (eg this rtl8366rb) has a VLAN group per port - you firstdefine a set of VLANs in a vlan group,
Convert over the etherswitch framework to use VLAN IDs per port, ratherthan VLAN groups.Some chips (eg this rtl8366rb) has a VLAN group per port - you firstdefine a set of VLANs in a vlan group, then you assign a VLAN groupto a port.Other chips (eg the AR8xxx switch chips) have a VLAN ID array perport - there's no group per se, just a list of vlans that can beconfigured.So for now, the switch API will use the latter and rely on driversdoing the heavy lifting if one wishes to use the VLAN group method.Maybe later on both can be supported.PR: kern/177878PR: kern/177873Submitted by: Luiz Otavio O Souza <[email protected]>Reviewed by: ray
Commit the first pass of the etherswitch support.This is designed to support the very basic ethernet switch chip behaviour,specifically:* accessing switch register space;* accessing per-PHY reg
Commit the first pass of the etherswitch support.This is designed to support the very basic ethernet switch chip behaviour,specifically:* accessing switch register space;* accessing per-PHY registers (for switches that actually expose PHYs);* basic vlan group support, which applies for the rtl8366 driver but not for the atheros switches.This also includes initial support for:* rtl8366rb support - which is a 10/100/1000 switch which supports vlan groups;* Initial Atheros AR8316 switch support - which is a 10/100/1000 switch which supports an alternate vlan configuration (so the vlan group methods are stubbed.)The general idea here is that the switch driver may speak to a variety ofbackend busses (mdio, i2c, spi, whatever) and expose:* If applicable, one or more MDIO busses which ethernet interfaces can then attach PHYs to via miiproxy/mdioproxy;* exposes miibusses, one for each port at the moment, so ..* .. a PHY can be exposed on each miibus, for each switch port, with all of the existing MII/ifnet framework.However:* The ifnet is manually created for now, and it isn't linked into the interface list, nor can you (currently) send/receive frames on this ifnet. At some point in the future there may be _some_ support for this, for switches with a multi-port, isolated mode.* I'm still in the process of sorting out correct(er) locking.TODO:* ray's switch code in zrouter (zrouter.org) includes a much more developed newbus API that covers the various switch methods, as well as a capability API so drivers, the switch layer and the userland utility can properly control the subset of supported features. The plan is to sort that out later, once the rest of ray's switch drivers are brought over and extended to export MII busses and PHYs.Submitted by: Stefan Bethke <[email protected]>Reviewed by: ray