| #
b670c9ba
|
| 11-Jun-2025 |
Ahmad Khalifa <vexeduxr@FreeBSD.org> |
newbus: replace leftover device unit wildcards
Reviewed by: imp, jhb Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D50913
|
| #
e453e498
|
| 11-Jun-2025 |
Brooks Davis <brooks@FreeBSD.org> |
machine/stdarg.h -> sys/stdarg.h
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 eas
machine/stdarg.h -> sys/stdarg.h
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
show more ...
|
| #
c8e97aa6
|
| 11-May-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
e6000sw: fix bus ordering; don't panic if miibus devices are destroyed
Unloading the e6000sw driver with a "fixed" ixgbe (which is doing MDIO transfers faster than 8ms per) has exposed another fun r
e6000sw: fix bus ordering; don't panic if miibus devices are destroyed
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
show more ...
|
| #
9b2a503a
|
| 24-Apr-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
e6000sw: add support for 88E6190X
This adds the minimum support required to probe/attach the 88E6190X.
I've tested this against an AT&T ATT-150 OCP device (Silicom i3000) with local changes to expo
e6000sw: add support for 88E6190X
This adds the minimum support required to probe/attach the 88E6190X.
I've tested this against an AT&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 <stas@alekseev.us> for the pull request and Stas / Jason Hensler <omegadraconis@gmail.com> for chasing down information about the chipset, linux stuff and AT&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
show more ...
|
| #
c78f603a
|
| 25-Apr-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
e6000sw: schedule e6000sw_tick() to occur once a second
Although all the machinery is present, the tick routine only ran once. It was never rescheduled. So, reschedule it.
However in practice I've
e6000sw: schedule e6000sw_tick() to occur once a second
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
show more ...
|
| #
ee7f62fa
|
| 25-Apr-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
e6000sw: stop / drain the taskqueue (and tick) during detach
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
e6000sw: stop / drain the taskqueue (and tick) during detach
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
show more ...
|
| #
af298663
|
| 25-Apr-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
e6000sw: unlock the driver lock in the error path during attach
The driver sleep lock was being held during most of the error paths, and not unlocking it will panic the kernel during detach. So, fi
e6000sw: unlock the driver lock in the error path during attach
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
show more ...
|
| #
322f3f58
|
| 24-Apr-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
e6000sw: correctly depend upon etherswitch
This fixes the driver to load correctly as a module when etherswitch is also a module.
Differential Revision: https://reviews.freebsd.org/D50027 Reviewed
e6000sw: correctly depend upon etherswitch
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
show more ...
|
| #
3ddaf820
|
| 02-Jan-2025 |
John Baldwin <jhb@FreeBSD.org> |
Use bus_generic_detach instead of device_delete_children in detach
While here, check for errors from bus_generic_detach and move it to the start of detach if necessary.
Differential Revision: https
Use bus_generic_detach instead of device_delete_children in detach
While here, check for errors from bus_generic_detach and move it to the start of detach if necessary.
Differential Revision: https://reviews.freebsd.org/D47969
show more ...
|
| #
18250ec6
|
| 06-Dec-2024 |
John Baldwin <jhb@FreeBSD.org> |
Replace calls to bus_generic_attach with bus_attach_children
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
|
| #
723da5d9
|
| 06-Dec-2024 |
John Baldwin <jhb@FreeBSD.org> |
Replace calls to bus_generic_probe with bus_identify_children
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47674
|
| #
a05a6804
|
| 25-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
newbus: replace -1 in BUS_ADD_CHILD(...-1) with DEVICE_UNIT_ANY
Sponsored by: Netflix
|
| #
aa386085
|
| 28-Jun-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
net: Remove unneeded NULL check for the allocated ifnet
Change 4787572d0580 made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functiona
net: Remove unneeded NULL check for the allocated ifnet
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
show more ...
|
| #
725962a9
|
| 06-Nov-2023 |
Mark Johnston <markj@FreeBSD.org> |
e6000sw: Fix locking in miibus_{read,write}reg implementations
Commit 469290648005e13b819a19353032ca53dda4378f made e6000sw's implementation of miibus_(read|write)reg assume that the softc lock is h
e6000sw: Fix locking in miibus_{read,write}reg implementations
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
show more ...
|
| #
2c135a2a
|
| 21-Aug-2023 |
Luiz Otavio O Souza <loos@FreeBSD.org> |
e6000sw: support building without FDT
This enables the use of this driver on platorms without device tree, such as Netgate's XG-7100.
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
74c592c0
|
| 31-Jan-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
etherswitch: Clean up whitespace after IfAPI conversion
Sponsored by: Juniper Networks, Inc. Fixes: 2e6a8c1ae
|
| #
2e6a8c1a
|
| 30-May-2022 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Mechanically convert etherswitch drivers to IfAPI
Reviewed by: kd Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37813
|
| #
8cf905e5
|
| 04-Sep-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
etherswitch(4): Remove a double word in a source code comment
- s/the the/the/
MFC after: 3 days
|
| #
7647626d
|
| 10-Aug-2022 |
Kristof Provost <kp@FreeBSD.org> |
e6000sw: fix incorrect locking
During attach we release the lock to call e6000sw_attach_miibus(), which calls mii_attach(). The mii_attach() function calls miibus_readreg() / miibus_writereg(). Howe
e6000sw: fix incorrect locking
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
show more ...
|
| #
46929064
|
| 06-Jul-2022 |
Albert Jakiela <aja@semihalf.com> |
e6000sw: add readphy and writephy wrappers
New functions take lock and give lock after operation. Removed locking and unlocking within other methods, to prevent from recursive locking on non recursi
e6000sw: add readphy and writephy wrappers
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
show more ...
|
| #
66548259
|
| 04-Jul-2022 |
Kornel Dulęba <kd@FreeBSD.org> |
e6000sw: Fix direct register write logic
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. T
e6000sw: Fix direct register write logic
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
show more ...
|
| #
42726c2f
|
| 09-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE.
|
| #
829a13fa
|
| 09-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
Remove unused etherswitch_devclass.
|
| #
3e38757d
|
| 19-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
Remove unused miibus_devclass and miibus_fdt_devclass.
|