| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functional change intended.
Reviewed by: kp, imp, glebius, stevek
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D45740
(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
|
| |
|
|
|
|
|
|
| |
No functional change intended.
MFC after: 1 week
(cherry picked from commit 54482989d34c94c6894cb51f65250a4d5946eb1b)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 469290648005e13b819a19353032ca53dda4378f made e6000sw's
implementation of miibus_(read|write)reg assume that the softc lock is
held. I presume that is to avoid lock recursion in e6000sw_attach() ->
e6000sw_attach_miibus() -> mii_attach() -> MIIBUS_READREG().
However, the lock assertion in e6000sw_readphy_locked() can fail if a
different driver uses the interface to probe registers. Work around the
problem by providing implementations which lock the softc if it is not
already locked.
PR: 274795
Fixes: 469290648005 ("e6000sw: add readphy and writephy wrappers")
Reviewed by: kp, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42466
(cherry picked from commit 725962a9f4c050b21488edd58d317e87c76d6f66)
|
| |
|
|
|
|
|
| |
This enables the use of this driver on platorms without device tree,
such as Netgate's XG-7100.
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
| |
Sponsored by: Juniper Networks, Inc.
|
| |
|
|
|
| |
Sponsored by: Juniper Networks, Inc.
Fixes: 2e6a8c1ae
|
| |
|
|
|
|
| |
Reviewed by: kd
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37813
|
| |
|
|
|
|
| |
- s/the the/the/
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During attach we release the lock to call e6000sw_attach_miibus(), which
calls mii_attach(). The mii_attach() function calls miibus_readreg() /
miibus_writereg(). However, these are set to be
e6000sw_readphy_locked().
That is, the read/write phy functions do not acquire the lock, but
expect to be called while locked. Simply do not unlock and relock while
calling mii_attach().
Reviewed by: Hubert Mazur <hum@semihalf.com>
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D36117
|
| |
|
|
|
|
|
|
|
|
|
|
| |
New functions take lock and give lock after operation.
Removed locking and unlocking within other methods,
to prevent from recursive locking on non recursive lock.
Tested on EspressoBin.
Reviewed by: mw
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D35656
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When accessing a register directly from etherswitchcfg one must specify
a register group(e.g. registers of portN) and the register offset within
the group. The latter is passed as the 5 least significant bits.
Extract the former by dividing the register address by 32, not by 5.
Approved by: mw(mentor)
Obtained from: Semihalf
Sponsored by: Stormshield
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35672
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Most affect comments, very few have user-visible effects.
Notes:
svn path=/head/; revision=298955
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
own.
The mdio driver interface is generally useful for devices that require
MDIO without the full MII bus interface. This lifts the driver/interface
out of etherswitch(4), and adds a mdio(4) man page.
Submitted by: Landon Fuller <landon@landonf.org>
Differential Revision: https://reviews.freebsd.org/D4606
Notes:
svn path=/head/; revision=292738
|
|
|
Add e6000sw driver supporting Marvell 88E6352, 88E6172, 88E6176 switches.
It needs to be attached to mdio interface, exporting SMI access
functionality. e6000sw supports port-based VLAN configuration, per-port
media changing, accessing PHY and switch registers.
e6000sw attaches miibuses and PHY drivers as children. Instead of typical
tick as callout, kthread-based tick is used. This combined with SX locks
allows MDIO read/write calls to sleep. It is expected, because this
hardware requires long delays in SMI read/write procedures, which can not
be handled by busy-waiting.
Reviewed by: adrian
Obtained from: Semihalf
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D3902
Notes:
svn path=/head/; revision=289947
|