| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
e6000sw family automatically reflects PHY status in each port's registers.
Therefore it is not necessary to do a full PHY polling squence, which
results in much quicker operation and much less significant usage of
the SMI bus.
Care must be taken that the resulting ifmedia_active is identical to
what the PHY will compute, or gratuitous link status changes will
occur whenever the PHYs update function is called.
This patch implements above improvement. On the occasion set a pointer to
the proc structure to be part of software context instead of being
a global variable.
Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: loos
Differential revision: https://reviews.freebsd.org/D10714
Notes:
svn path=/head/; revision=318524
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hitherto implementation of PHY polling resulted in a risk of an
endless loop and very high occupation of the SMI bus. Improve the
operation by limiting the polling tries and adding sleepable
pause.
Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: loos
Differential revision: https://reviews.freebsd.org/D10713
Notes:
svn path=/head/; revision=318521
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds missing unlock on attach failure.
Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: loos
Differential revision: https://reviews.freebsd.org/D10712
Notes:
svn path=/head/; revision=318411
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Malloc should always return something when M_WAITOK flag is used,
but keep this code and change flag to M_NOWAIT as it is under a lock
(allows for possible future change). Free ifnet structure to avoid
memory leak on failure.
Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: loos
Differential revision: https://reviews.freebsd.org/D10711
Notes:
svn path=/head/; revision=318410
|
| |
|
|
|
|
|
|
|
| |
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Approved by: mizhka
Differential Revision: https://reviews.freebsd.org/D10563
Notes:
svn path=/head/; revision=317869
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add workaround mii access because of rt1310 is hang up on etherswitch mii poll.
And FDT away on arm platform.
Tested:
* wzr2-g300n
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka
Differential Revision: https://reviews.freebsd.org/D10295
Notes:
svn path=/head/; revision=317866
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tagging port can set by etherswitchcfg command.
Tested:
* on Netgear_WGR614Cv7
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka
Notes:
svn path=/head/; revision=317864
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cannot access the GLOBAL2 register directly.
Despite the comment in code (which was misleading), the indirect access is
only used to read the switch CONFIG data from the scrap register and not
for the GLOBAL2 access.
Use the dsa data to define when the switch is in the Multi Chip Addressing
Mode (a even address different than zero).
While here fix a typo.
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=317605
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This patch brings 802.1q support for Marvell 88E606x ethernet switches.
Test is done on 88E6065 chip (Aterm WR1200).
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10144
Notes:
svn path=/head/; revision=316052
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix an issue which prevents proper operation (addition/removal of members)
of RT305x vlan groups.
Tested by: yamori813@yahoo.co.jp
Submitted by: yamori813@yahoo.co.jp (initial version)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D9607
Notes:
svn path=/head/; revision=313988
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arswitch_setled() and a number of _global_setup functions did not acquire the
lock before calling arswitch_modifyreg(). With WITNESS enabled this would
instantly panic.
Discovered on a TPLink-3600:
("panic: mutex arswitch not owned at sys/dev/etherswitch/arswitch/arswitch_reg.c:236")
Reviewed by: adrian, kan
Differential Revision: https://reviews.freebsd.org/D9187
Notes:
svn path=/head/; revision=312224
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is Micrel KSZ8995MA driver code. KSZ8995MA uses SPI bus to control.
This code is written & tested on @SRCHACK's ksz8995ma board and FON2100
with gpiospi.
etherswitchcfg support commands: addtag, ingress, striptag, dropuntagged.
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka, adrian
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D8790
Notes:
svn path=/head/; revision=312204
|
| |
|
|
|
|
|
|
|
|
|
| |
where si_drv1 can be accessed before it gets set.
MFC after: 3 days
Suggested by: kib
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=311700
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- recognize ports and vlangroups based on DTS file
- support multi-chip addresing mode (required in upcoming
Armada-388-Clearfog support)
- refactor attachment function
Each port in 'dsa' node should have 'vlangroup' property. Otherwise,
e6000sw will fail to attach.
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Konrad Adamczyk <ka@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D7328
Notes:
svn path=/head/; revision=311448
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it.
Remove bogus wrappers and use the kernel defaults.
While here, use DEVMETHOD_END.
Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)
Notes:
svn path=/head/; revision=309461
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows to specify PHY register offset for ukswitch. For instance,
switch MAICREL KS8995XA connected via MDIO to SoC, but PHY register starts
at 1. So hint for this case is: hint.ukswitch.0.phyoffset=1
No change/effect if hint is not set.
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: adrian, mizhka
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D8584
Notes:
svn path=/head/; revision=308937
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is Infineon ADM6996FC/M/MX driver code on etherswitch framework.
Support PORT and DOT1Q VLAN.
This code suppose ADM6996FC SDC/SDIO connect to SOC network interface
MDC/MDIO.
This code tested on Netgear WGR614Cv7.
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: adrian, mizhka
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D8495
Notes:
svn path=/head/; revision=308744
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If MII1 interface is disabled, then enable phy4/mac4.
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka, adrian
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6832
Notes:
svn path=/head/; revision=308702
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add RTL8366SR support at etherswitch driver. Tested on RTL8366RB and
RTL8366SR.
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: adrian, mizhka
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D6796
Notes:
svn path=/head/; revision=308700
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add 88e6060 basic support: only port-based VLAN is supported.
No vlan(4) support.
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka, adrian
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D8344
Notes:
svn path=/head/; revision=308699
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.
Detected with devel/coccinelle following a hint from DragonFlyBSD.
MFC after: 1 month
Notes:
svn path=/head/; revision=303891
|
| |
|
|
|
|
|
| |
Sponsored by: Microsoft
Notes:
svn path=/head/; revision=303821
|