aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/etherswitch/felix
Commit message (Collapse)AuthorAgeFilesLines
* Check for errors from bus_generic_detach in various driversJohn Baldwin2025-01-021-2/+3
| | | | | | | | In some cases, move the call to bus_generic_detach earlier so that any detach failures from child devices do not leave the parent device partially detached. Differential Revision: https://reviews.freebsd.org/D47966
* bus_generic_detach: Delete children after detaching themJohn Baldwin2025-01-021-2/+0
| | | | | | | | | | | | | | | | | This provides better semantics as a standalone DEVMETHOD for device_attach as bus drivers should remove child devices they created as part of detach cleanup. The implementation calls bus_detach_children() first to permit child devices an opportunity to veto the detach operation. If that succeeds, device_delete_children() is used to delete the child devices. This requires fixing various drivers that were deleting devices explicitly (via a device_t pointer cached in the softc) after calling bus_generic_detach to stop doing that and just rely on bus_generic_detach to remove child devices. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47959
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-061-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* Replace calls to bus_generic_probe with bus_identify_childrenJohn Baldwin2024-12-061-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47674
* net: Remove unneeded NULL check for the allocated ifnetZhenlei Huang2024-06-281-3/+0
| | | | | | | | | | | 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
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-123-3/+3
| | | | | | | | | 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
* etherswitch: Fix leftovers from IfAPI conversionJustin Hibbits2023-02-141-2/+2
| | | | Sponsored by: Juniper Networks, Inc.
* etherswitch: Clean up whitespace after IfAPI conversionJustin Hibbits2023-01-311-2/+2
| | | | | Sponsored by: Juniper Networks, Inc. Fixes: 2e6a8c1ae
* Mechanically convert etherswitch drivers to IfAPIJustin Hibbits2023-01-242-12/+12
| | | | | | Reviewed by: kd Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37813
* sys: Nuke double-semicolonsElliott Mitchell2022-11-021-1/+1
| | | | | | | | | A distinct number of double-semicolons have ended up in FreeBSD. Take a pass at getting rid of many of these harmless typos. Reviewed by: emaste, rrs Pull Request: https://github.com/freebsd/freebsd-src/pull/609 Differential Revision: https://reviews.freebsd.org/D31716
* etherswitch drivers: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-091-3/+1
|
* Remove unused etherswitch_devclass.John Baldwin2022-05-091-2/+1
|
* Remove unused miibus_devclass and miibus_fdt_devclass.John Baldwin2022-05-061-2/+1
|
* felix: Add support for PHY interruptsKornel Duleba2021-11-241-1/+8
| | | | | | | | - Replace miibus with newly created miibus_fdt. - Use generic passthrough resource allocation devmethods. Obtained from: Semihalf Sponsored by: Alstom Group
* etherswitch/felix: remove unused functionBjoern A. Zeeb2021-11-091-13/+0
| | | | | | | | Remove unused file-local static function felix_phyforport() which was missed in 29cf6a79acb7 to avoid compile time warning. Reviewed by: Kornel Duleba (mindal semihalf.com) Differential Revision: https://reviews.freebsd.org/D32906
* felix: Add a sysctl to control timer routine frequencyKornel Duleba2021-10-292-1/+39
| | | | | | | | | | Driver polls status of all PHYs connected to the switch in a fixed interval. Add a sysctl that allows to control frequency of that. The value is expressed in ticks and defaults to "hz", or 1 second. Obtained from: Semihalf Sponsored by: Alstom Group
* felix: Use internal MDIO regs for PHY communicationKornel Duleba2021-10-293-41/+33
| | | | | | | | | | Previously we would use an external MDIO device found on the PCI bus. Switch to using MDIO mapped in a separate BAR of the switch device. It is much easier this way since we don't have to depend on another driver anymore. Obtained from: Semihalf Sponsored by: Alstom Group
* enetc_mdio: Support building the driver as a loadable module.Kornel Duleba2021-08-031-0/+2
| | | | | | | | After recent arm64 GENERIC config cleanup the ENETC MDIO in NXP LS1028A SoC should support being loaded as a module. Obtained from: Semihalf Sponsored by: Alstom Group
* Introduce driver for Freescale Felix switchMarcin Wojtas2021-08-033-0/+1201
It is found on boards equipped with LS1028A SoC. 802.1q VLAN grouping is supported. An external MDIO device is used for communicating with PHYs. The driver is built as a module by default, it is not included in GENERIC kernel config. Submitted by: Lukasz Hajec <lha@semihalf.com> Kornel Duleba <mindal@semihalf.com> Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30923