<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/etherswitch, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>IfAPI: Finish etherswitch driver conversions</title>
<updated>2025-06-25T19:53:13+00:00</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2025-02-11T21:13:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0d7abc6e1f785fa576909bbdba0a66a45be18a90'/>
<id>0d7abc6e1f785fa576909bbdba0a66a45be18a90</id>
<content type='text'>
These drivers are not compiled by default, so were missed in the
conversion.

Sponsored by:	Juniper Networks, Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These drivers are not compiled by default, so were missed in the
conversion.

Sponsored by:	Juniper Networks, Inc.
</pre>
</div>
</content>
</entry>
<entry>
<title>newbus: replace leftover device unit wildcards</title>
<updated>2025-06-21T02:57:45+00:00</updated>
<author>
<name>Ahmad Khalifa</name>
<email>vexeduxr@FreeBSD.org</email>
</author>
<published>2025-06-11T00:25:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b670c9bafc0e31c7609969bf374b2e80bdc00211'/>
<id>b670c9bafc0e31c7609969bf374b2e80bdc00211</id>
<content type='text'>
Reviewed by:	imp, jhb
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D50913
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	imp, jhb
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D50913
</pre>
</div>
</content>
</entry>
<entry>
<title>machine/stdarg.h -&gt; sys/stdarg.h</title>
<updated>2025-06-11T16:39:02+00:00</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2025-06-11T16:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e453e498cbb88570a3ff7b3679de65c88707da95'/>
<id>e453e498cbb88570a3ff7b3679de65c88707da95</id>
<content type='text'>
Switch to using sys/stdarg.h for va_list type and va_* builtins.

Make an attempt to insert the include in a sensible place.  Where
style(9) was followed this is easy, where it was ignored, aim for the
first block of sys/*.h headers and don't get too fussy or try to fix
other style bugs.

Reviewed by:	imp
Exp-run by:	antoine (PR 286274)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1595
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch to using sys/stdarg.h for va_list type and va_* builtins.

Make an attempt to insert the include in a sensible place.  Where
style(9) was followed this is easy, where it was ignored, aim for the
first block of sys/*.h headers and don't get too fussy or try to fix
other style bugs.

Reviewed by:	imp
Exp-run by:	antoine (PR 286274)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1595
</pre>
</div>
</content>
</entry>
<entry>
<title>e6000sw: fix bus ordering; don't panic if miibus devices are destroyed</title>
<updated>2025-05-16T02:34:26+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2025-05-11T02:31:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c8e97aa6ac77fa5cce7afc06849685599795c982'/>
<id>c8e97aa6ac77fa5cce7afc06849685599795c982</id>
<content type='text'>
Unloading the e6000sw driver with a "fixed" ixgbe (which is doing
MDIO transfers faster than 8ms per) has exposed another fun race
condition - the MII busses were being torn down before the etherswitch
device.

* Modify e6000sw_miiforphy() to return NULL if the mii bus device
  isn't setup, which stops the panic

* Change the module order so the e6000sw module is detached first,
  before the miibus entries and attached PHYs are destroyed.
  This ensures that the miibus entries aren't destroyed outside
  of the driver lock, and e6000sw_tick() doesn't try dereferencing
  dead miibus device_t's.

Differential Revision: https://reviews.freebsd.org/D50294
Reviewed by:	jhb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unloading the e6000sw driver with a "fixed" ixgbe (which is doing
MDIO transfers faster than 8ms per) has exposed another fun race
condition - the MII busses were being torn down before the etherswitch
device.

* Modify e6000sw_miiforphy() to return NULL if the mii bus device
  isn't setup, which stops the panic

* Change the module order so the e6000sw module is detached first,
  before the miibus entries and attached PHYs are destroyed.
  This ensures that the miibus entries aren't destroyed outside
  of the driver lock, and e6000sw_tick() doesn't try dereferencing
  dead miibus device_t's.

Differential Revision: https://reviews.freebsd.org/D50294
Reviewed by:	jhb
</pre>
</div>
</content>
</entry>
<entry>
<title>e6000sw: add support for 88E6190X</title>
<updated>2025-04-27T18:11:26+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2025-04-24T17:32:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9b2a503a1179e026a4efc0b2e0a910168bc806ed'/>
<id>9b2a503a1179e026a4efc0b2e0a910168bc806ed</id>
<content type='text'>
This adds the minimum support required to probe/attach the 88E6190X.

I've tested this against an AT&amp;T ATT-150 OCP device (Silicom i3000)
with local changes to export MDIO via ixge(4).

Hints are required to probe/attach/configure the switch on amd64,
but with the mentioned diffs, it does work.

Thanks to Stas Alekseev &lt;stas@alekseev.us&gt; for the pull request
and Stas / Jason Hensler &lt;omegadraconis@gmail.com&gt; for chasing
down information about the chipset, linux stuff and AT&amp;T OCP
hardware information.

PR:		kern/281211
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1408
Differential Revision:	https://reviews.freebsd.org/D50044
Reviewed by:	imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the minimum support required to probe/attach the 88E6190X.

I've tested this against an AT&amp;T ATT-150 OCP device (Silicom i3000)
with local changes to export MDIO via ixge(4).

Hints are required to probe/attach/configure the switch on amd64,
but with the mentioned diffs, it does work.

Thanks to Stas Alekseev &lt;stas@alekseev.us&gt; for the pull request
and Stas / Jason Hensler &lt;omegadraconis@gmail.com&gt; for chasing
down information about the chipset, linux stuff and AT&amp;T OCP
hardware information.

PR:		kern/281211
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1408
Differential Revision:	https://reviews.freebsd.org/D50044
Reviewed by:	imp
</pre>
</div>
</content>
</entry>
<entry>
<title>e6000sw: schedule e6000sw_tick() to occur once a second</title>
<updated>2025-04-27T18:11:19+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2025-04-25T18:44:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c78f603ab77ff3a2910d9b7ef190b30b611fc311'/>
<id>c78f603ab77ff3a2910d9b7ef190b30b611fc311</id>
<content type='text'>
Although all the machinery is present, the tick routine only ran once.
It was never rescheduled.  So, reschedule it.

However in practice I've discovered that the tick routine is running
whilst a bunch of phys are actually being probe/attached on each per-port
MII bus being created and probed off of the switch itself.

Until that's debugged (and likely the whole PHY management stuff is
cleaned up here), just add a NULL check and thus don't panic.

Differential Revision:	https://reviews.freebsd.org/D50031
Reviewed by:	imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although all the machinery is present, the tick routine only ran once.
It was never rescheduled.  So, reschedule it.

However in practice I've discovered that the tick routine is running
whilst a bunch of phys are actually being probe/attached on each per-port
MII bus being created and probed off of the switch itself.

Until that's debugged (and likely the whole PHY management stuff is
cleaned up here), just add a NULL check and thus don't panic.

Differential Revision:	https://reviews.freebsd.org/D50031
Reviewed by:	imp
</pre>
</div>
</content>
</entry>
<entry>
<title>e6000sw: stop / drain the taskqueue (and tick) during detach</title>
<updated>2025-04-27T18:05:05+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2025-04-25T18:41:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ee7f62faa893bd9bbe6650716579072724c427cb'/>
<id>ee7f62faa893bd9bbe6650716579072724c427cb</id>
<content type='text'>
Although the tick isn't running every hz right now, when it /is/
running at hz, the shutdown path will race with an existing running
tick routine, causing unpredictable panics.

* Introduce a shutdown flag which will abort doing the tick work if set
* set the shutdown flag and start cancel/draining the taskqueue during
  detach.

Differential Revision:	https://reviews.freebsd.org/D50030
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although the tick isn't running every hz right now, when it /is/
running at hz, the shutdown path will race with an existing running
tick routine, causing unpredictable panics.

* Introduce a shutdown flag which will abort doing the tick work if set
* set the shutdown flag and start cancel/draining the taskqueue during
  detach.

Differential Revision:	https://reviews.freebsd.org/D50030
</pre>
</div>
</content>
</entry>
<entry>
<title>e6000sw: unlock the driver lock in the error path during attach</title>
<updated>2025-04-27T18:04:39+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2025-04-25T18:38:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=af298663e9ff77e3a03da10d89d89e73a69a9ea7'/>
<id>af298663e9ff77e3a03da10d89d89e73a69a9ea7</id>
<content type='text'>
The driver sleep lock was being held during most of the error paths,
and not unlocking it will panic the kernel during detach.  So, fix it.

Differential Revision:	https://reviews.freebsd.org/D50029
Reviewed by:	imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver sleep lock was being held during most of the error paths,
and not unlocking it will panic the kernel during detach.  So, fix it.

Differential Revision:	https://reviews.freebsd.org/D50029
Reviewed by:	imp
</pre>
</div>
</content>
</entry>
<entry>
<title>e6000sw: correctly depend upon etherswitch</title>
<updated>2025-04-27T18:04:03+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2025-04-24T05:58:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=322f3f587e2cdba975a9ebc1561e7caf29840f77'/>
<id>322f3f587e2cdba975a9ebc1561e7caf29840f77</id>
<content type='text'>
This fixes the driver to load correctly as a module when etherswitch
is also a module.

Differential Revision:	https://reviews.freebsd.org/D50027
Reviewed by:	imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the driver to load correctly as a module when etherswitch
is also a module.

Differential Revision:	https://reviews.freebsd.org/D50027
Reviewed by:	imp
</pre>
</div>
</content>
</entry>
<entry>
<title>miiproxy: add missing dependency on mdio</title>
<updated>2025-04-27T18:02:30+00:00</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2025-04-24T02:39:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=331e1b33b39b87bce0805d01719c3e71c130c631'/>
<id>331e1b33b39b87bce0805d01719c3e71c130c631</id>
<content type='text'>
This is required for it to be a module

Differential Revision:	https://reviews.freebsd.org/D50024
Reviewed by:	imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is required for it to be a module

Differential Revision:	https://reviews.freebsd.org/D50024
Reviewed by:	imp
</pre>
</div>
</content>
</entry>
</feed>
