| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
| |
- s/accomodate/accommodate/
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This switch is based off of the AR8327/AR8337 external switch/PHY.
However unlike the AR8327/AR8337 it itself doesn't have any PHYs;
instead an external PHY connects to it using the PSGMII port.
Differential Revision: https://reviews.freebsd.org/D34112
Reviewed by: manu
This code is inspired by the ar40xx code in openwrt, which itself
is based on the Qualcomm QCA-SSDK. Both of these sources are, amusingly,
BSD licenced - and thus I have included some of the comments in the
hardware workaround paths to document some of the magic numbers.
|
| |
|
|
|
|
|
|
| |
- Replace miibus with newly created miibus_fdt.
- Use generic passthrough resource allocation devmethods.
Obtained from: Semihalf
Sponsored by: Alstom Group
|
| |
|
|
|
|
|
|
| |
Remove unused file-local static function felix_phyforport()
which was missed in 29cf6a79acb7 to avoid compile time warning.
Reviewed by: Kornel Duleba (mindal semihalf.com)
Differential Revision: https://reviews.freebsd.org/D32906
|
| |
|
|
|
|
|
|
|
|
| |
Driver polls status of all PHYs connected to the switch in a
fixed interval.
Add a sysctl that allows to control frequency of that.
The value is expressed in ticks and defaults to "hz", or 1 second.
Obtained from: Semihalf
Sponsored by: Alstom Group
|
| |
|
|
|
|
|
|
|
|
| |
Previously we would use an external MDIO device found on the PCI bus.
Switch to using MDIO mapped in a separate BAR of the switch device.
It is much easier this way since we don't have to depend on another
driver anymore.
Obtained from: Semihalf
Sponsored by: Alstom Group
|
| |
|
|
|
|
|
|
|
|
| |
Fix detach routine.
Driver was tested on EspressoBin.
Remove it from GENERIC, since now it can be loaded automatically.
Obtained from: Semihalf
Reviewed by: manu
Differential revision: https://reviews.freebsd.org/D31580
|
| |
|
|
|
|
|
|
|
| |
Previosuly the link status was pooled in an infinite loop in a separate
kproc. Use taskqueue subsytem instead. This is a prequisite for making
this driver work as a loadable module.
Obtained from: Semihalf
Differential revision: https://reviews.freebsd.org/D31579
|
| |
|
|
|
|
|
|
| |
After recent arm64 GENERIC config cleanup the ENETC MDIO
in NXP LS1028A SoC should support being loaded as a module.
Obtained from: Semihalf
Sponsored by: Alstom Group
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is found on boards equipped with LS1028A SoC.
802.1q VLAN grouping is supported.
An external MDIO device is used for communicating with PHYs.
The driver is built as a module by default, it is not included
in GENERIC kernel config.
Submitted by: Lukasz Hajec <lha@semihalf.com>
Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D30923
|
| |
|
|
|
|
|
|
|
|
|
| |
Felix switch found in LS1028A supports stripping VLAN tag on
ingress, instead of egress. The striptag flag excepts the latter
behaviour.
Add a new flag to support the feature.
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D30922
|
| |
|
|
|
|
|
|
|
|
| |
Some ethernet switches have very large register windows; for example
the AR8316 switch MIB starts at 0x20000.
Submitted by: Mori Hiroki <yamori813@yahoo.co.jp>
Notes:
svn path=/head/; revision=360827
|
| |
|
|
| |
Notes:
svn path=/head/; revision=359441
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still 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 and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
Notes:
svn path=/head/; revision=358333
|
| |
|
|
| |
Notes:
svn path=/head/; revision=356075
|
| |
|
|
|
|
|
|
|
|
|
| |
With more ports, some of the registers are shifted a bit to accommodate.
This switch also adds two high speed Serdes/SGMII interfaces (2.5 Gb/s).
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=349578
|
| |
|
|
|
|
|
|
| |
Tested on: espressobin, Clearfog, SG-3100 and others
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=349521
|
| |
|
|
|
|
|
|
|
| |
This is intended to drop all 802.1q tagged packets on a port.
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=349520
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixes the network on Espressobin.
The GENERIC kernel now boots over NFS.
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=348762
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the latest Linux kernel revisions the DSA (Distributed
Switch Architecture) device tree binding was changed.
Instead of the top level dsa@ node, the switch and its
ports is represented as a child node of the mdio bus.
With that other modifications were added, such as
relation with the ethernet port of the SoC. Adjust
e6000sw etherswitch and mvneta drivers to that.
Tested on Armada 3720 EspressoBin and Armada 388 Clearfog Pro boards.
Submitted by: Bert JW Regeer <xistence@0x58.com>
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D19036
Notes:
svn path=/head/; revision=345432
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices cannot rely on the switch MDIO address passed in the DTB
for specifying single/multi-chip addressing mode. Introduce new property
"single-chip-addressing" which added to DTS will force single-chip mode.
Submitted by: Michal Mazur <mkm@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14800
Notes:
svn path=/head/; revision=332354
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OF_getprop_alloc takes element size argument and returns number of
elements in the property. There are valid use cases for such behavior
but mostly API consumers pass 1 as element size to get string
properties. What API users would expect from OF_getprop_alloc is to be
a combination of malloc + OF_getprop with the same semantic of return
value. This patch modifies API signature to match these expectations.
For the valid use cases with element size != 1 and to reduce
modification scope new OF_getprop_alloc_multi function has been
introduced that behaves the same way OF_getprop_alloc behaved prior to
this patch.
Reviewed by: ian, manu
Differential Revision: https://reviews.freebsd.org/D14850
Notes:
svn path=/head/; revision=332310
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The placeholders are here for some future "set" MAC address API.
Tested:
* AR9340 switch
* AR8327 switch
Notes:
svn path=/head/; revision=328924
|
| |
|
|
|
|
|
|
|
|
|
|
| |
the switch MAC address.
Switches that originate their own frames (eg obvious ones like Pause frames)
need a MAC address to use to send those frames from.
This API will hopefully begin to allow that to be configurable.
Notes:
svn path=/head/; revision=328922
|
| |
|
|
|
|
|
|
|
|
|
| |
I'll have to go double check to see if it does indeed pass ARP frames between
switch ports with this disabled, but it seems required for the CPU port to see
ARP traffic.
I'll dig into this some more.
Notes:
svn path=/head/; revision=328901
|
| |
|
|
|
|
|
|
| |
Apparently the last time I checked building this it didn't pick up that the
header had changed.
Notes:
svn path=/head/; revision=328900
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This indeed uses the same registers as the AR8216 and later chips.
There seems to be an issue with ARP requests being sent out from the CPU
through this switch here, so figuring that out is next. Learning works fine on
the AR8327 ethernet switch on the /other/ gigabit ethernet port, so I don't
think it's the network stack or ethernet driver.
Tested:
* DB120 - AR9340 SOC + ethernet switch (and other bits.)
Notes:
svn path=/head/; revision=328873
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Whilst here, add some further fields for future experimenting.
Tested:
* AR9340 switch
* AR9330 switch
* AR7240 switch
Notes:
svn path=/head/; revision=328872
|
| |
|
|
|
|
|
| |
This fixes the AR9340 "unimplemented" thingy for now.
Notes:
svn path=/head/; revision=328871
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This correctly dumps the ethernet bridge contents on an AR8327 switch.
Tested:
* AP135 - QCA9550 + AR8327 ethernet switch:
# etherswitchcfg atu dump
[0] c0:3f:d5:7e:6f:45: portmask 0x00000004
[1] f6:b6:03:96:1e:ba: portmask 0x00000004
[2] 00:03:7f:11:38:4f: portmask 0x00000040
# arp -na
? (192.168.3.170) at 00:03:7f:11:38:4f on arge0 permanent [ethernet]
? (192.168.3.12) at c0:3f:d5:7e:6f:45 on arge0 expires in 1188 seconds [ethernet]
? (192.168.3.1) at f6:b6:03:96:1e:ba on arge0 expires in 1186 seconds [ethernet]
Notes:
svn path=/head/; revision=328838
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add the bulk of the ATU table read function
* Correct how the ATU function and WAIT bits work
TODO:
* more testing, figure out how the multi-vlan table stuff works and push that
up to userspace
Notes:
svn path=/head/; revision=328823
|
| |
|
|
|
|
|
| |
this.
Notes:
svn path=/head/; revision=328814
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactor the initial learning configuration (port learning, address expiry,
handling address moving between ports, etc, etc) into a separate HAL routine
* and ensure that it's consistent between switch chips - the AR8216,8316,724x,9331
SoCs all share the same switch code.
* .. the AR8327 needs doing - the defaults seem OK for now
* .. the AR9340 is different but it's also programmed now.
* Add support for flushing a single port worth of ATU entries
* Add support for fetching the ATU table from AR8216 and derived chips
Tested:
* AR9344, Carambola 2
TODO:
* Further testing on other chips
* Add AR9340 support
* Add AR8327 support
Notes:
svn path=/head/; revision=328812
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
address table from the ethernet switch.
This stuff may be a bit fluid during this -HEAD cycle as various other
switch features are added, but the current stuff is enough to drive
initial development and features on the atheros range of integrated
and external switches.
* add a method to flush the whole address table;
* add a method to flush all addresses on a given port;
* add a method to download the address table;
* .. and then a method to fetch entries from the address table.
The table fetch/read methods pass through to the drivers for now since
the drivers may implement different ways of fetching/caching the address
table data. The atheros devices for example fetch the table by
iterating over the table through a set of registers and so you need
to keep that locked whilst you iterate otherwise you may have the table
flushed half way by a port status change.
This is a no-op until the userland and arswitch code shows up.
Notes:
svn path=/head/; revision=328766
|
| |
|
|
|
|
|
| |
Doing a flush actually requires setting this bit.
Notes:
svn path=/head/; revision=328619
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The switch hardware requires this bit to be set in order to kick start the
actual ATU update. This was being masked on some chips by the learning
programming (what to do when a MAC address moves, hash table collision, etc)
which is currently inconsistent between chips.
Tested:
* AR9344 SoC (AR7240 style switch internal)
Notes:
svn path=/head/; revision=328618
|
| |
|
|
| |
Notes:
svn path=/head/; revision=328617
|
| |
|
|
|
|
|
|
|
|
|
| |
Build with rtl8366rb has been broken due to incorrect retrieval of pointer
to device_t.
Reported by: lwhsu
Differential Revision: https://reviews.freebsd.org/D14044
Notes:
svn path=/head/; revision=328389
|
| |
|
|
|
|
|
|
|
|
|
| |
This 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 <dmitryluhtionov@gmail.com>
Reported by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
Notes:
svn path=/head/; revision=328377
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326255
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reduce the use of local copies of switch register data.
The switch now works with the upstream dsa node (i.e. the upstream DTS).
Tested on: ClearFog Pro (88E6176), SG-3100 (88E6141)
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=321602
|
| |
|
|
|
|
|
|
|
|
| |
Force the switch port settings for fixed media types.
Tested with: 88E6176, 88E6141
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=320157
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r319886 ("Add the initial support for the Marvell 88E6141
and 88E6341 switches.") unveiled a problem with possible
multiple lock creation. Move its initialization
to the driver attach and for obtaining the switch ID
create a temprorary one, which is immediately destroyed
after the check.
Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Notes:
svn path=/head/; revision=319906
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Right now the driver only supports port VLANs, so make sure
etherswitch_getinfo() return the proper switch capabilities.
Handle the cases where not all ports are in use (that will also require
etherswitch cooperation).
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=319886
|
| |
|
|
|
|
|
|
|
| |
functions that are used as booleans return real boolean values.
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=319760
|
| |
|
|
|
|
|
|
|
|
|
| |
in some cases, shuffle the code around to simplify locking.
No functional changes.
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=319498
|
| |
|
|
|
|
|
|
|
|
| |
Tested on WZR-HP-G301NH(RTL8366RB) and WZR-HP-G300NH(RTL8366SR).
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D10740
Notes:
svn path=/head/; revision=319070
|
| |
|
|
| |
Notes:
svn path=/head/; revision=318690
|