<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/etherswitch/arswitch/arswitch.c, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>net: Remove unneeded NULL check for the allocated ifnet</title>
<updated>2024-10-08T10:07:18+00:00</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-06-28T10:16:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f500e5c6c99bd4520daa4524113462e3cf68f032'/>
<id>f500e5c6c99bd4520daa4524113462e3cf68f032</id>
<content type='text'>
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

MFC note: This is only a partial MFC, as some drivers do not exist in
stable/13 branch. The if_epair(4) drifts too much from stable/14 so not
included in this MFC.

(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
(cherry picked from commit 6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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

MFC note: This is only a partial MFC, as some drivers do not exist in
stable/13 branch. The if_epair(4) drifts too much from stable/14 so not
included in this MFC.

(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
(cherry picked from commit 6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3)
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:20+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f8167e0404dab9ffeaca95853dd237ab7c587f82'/>
<id>f8167e0404dab9ffeaca95853dd237ab7c587f82</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
</pre>
</div>
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-07-25T15:13:49+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=caa41f641755c935b036e17440a3b49329c904ed'/>
<id>caa41f641755c935b036e17440a3b49329c904ed</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</pre>
</div>
</content>
</entry>
<entry>
<title>[arswitch] Implement the switch MAC address fetch API.</title>
<updated>2018-02-06T08:35:49+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2018-02-06T08:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2ba4bf8fa549f002503f218ae503bf906bd71f3e'/>
<id>2ba4bf8fa549f002503f218ae503bf906bd71f3e</id>
<content type='text'>
The placeholders are here for some future "set" MAC address API.

Tested:

* AR9340 switch
* AR8327 switch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The placeholders are here for some future "set" MAC address API.

Tested:

* AR9340 switch
* AR8327 switch
</pre>
</div>
</content>
</entry>
<entry>
<title>[arswitch] Break out of the loop upon any error, not just -1.</title>
<updated>2018-02-05T05:51:37+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2018-02-05T05:51:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7ed0831923db7da247fd6bc2ee309eeec3f74d0a'/>
<id>7ed0831923db7da247fd6bc2ee309eeec3f74d0a</id>
<content type='text'>
This fixes the AR9340 "unimplemented" thingy for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the AR9340 "unimplemented" thingy for now.
</pre>
</div>
</content>
</entry>
<entry>
<title>[arswitch] begin tidying up the learning and ATU management, introduce ATU APIs.</title>
<updated>2018-02-02T22:05:36+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2018-02-02T22:05:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=62042c979db43298b8e3d569cb9fd5bd7adc60ac'/>
<id>62042c979db43298b8e3d569cb9fd5bd7adc60ac</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>[arswitch] Fix ATU flushing on AR8216/AR8316 and most of the later chips.</title>
<updated>2018-01-31T07:36:51+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2018-01-31T07:36:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2c6ceccadeea768efd08c4d85466c76a4f9ec574'/>
<id>2c6ceccadeea768efd08c4d85466c76a4f9ec574</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>[etherswitch] check if_alloc returns NULL</title>
<updated>2018-01-24T21:33:18+00:00</updated>
<author>
<name>Michael Zhilin</name>
<email>mizhka@FreeBSD.org</email>
</author>
<published>2018-01-24T21:33:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0774131e27d6764f90967f6e2571ca84e8e6590f'/>
<id>0774131e27d6764f90967f6e2571ca84e8e6590f</id>
<content type='text'>
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 &lt;dmitryluhtionov@gmail.com&gt;
Reported by:	Dmitry Luhtionov &lt;dmitryluhtionov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;dmitryluhtionov@gmail.com&gt;
Reported by:	Dmitry Luhtionov &lt;dmitryluhtionov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>arswitch: Ensure the lock is always held when calling arswitch_modifyreg()</title>
<updated>2017-01-15T10:21:25+00:00</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2017-01-15T10:21:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6d011946c556fcea72449f09bb3d95502db6b3b6'/>
<id>6d011946c556fcea72449f09bb3d95502db6b3b6</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
