Commit Graph

6 Commits

Author SHA1 Message Date
Warner Losh
b111430e54 mii: Add opt_platform.h to all miibus drivers
miivar.h includes opt_platform.h. Make sure all the drivers that use the
miibus_if.h interface file have opt_platform.h as well. While some of
these may not, strictly speaking, need it, it's easier to include it
universally for miibus.

Sponsored by:		Netflix
2022-04-05 13:52:55 -06:00
Kornel Duleba
29cf6a79ac felix: Use internal MDIO regs for PHY communication
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
2021-10-29 10:08:26 +02:00
Kornel Duleba
a75400c5ad modules: felix: Remove etherswitch_if.c from Makefile
Having it included confuses KOBJOPLOOKUP resulting in kobj_error_method
being called instead of a devmethod from the switch driver.
That in turn returns ENXIO which was treated as a pointer and
dereferenced by etherswitch ioctl logic causing the kernel to panic.

Fixes: b542c9e42b (modules: felix: Add needed dependencies)
2021-10-01 11:24:08 +02:00
Kornel Duleba
5f2fe88377 felix: Add autogenerated files to Makefile
A module makefile must list all the header files it uses which are
generated at build time from interface definitions (.m files) in its
SRCS list.

Fixes: 451bcf1b36

Reported by: ian
2021-08-08 22:27:15 +02:00
Emmanuel Vadot
b542c9e42b modules: felix: Add needed dependencies
Modules should list all needed _if dependencies in their makefile otherwise
if one compiles a kernel that didn't compile those files the module won't build.

Fixes: 451bcf1b36
2021-08-06 15:21:31 +02:00
Marcin Wojtas
451bcf1b36 Introduce driver for Freescale Felix switch
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
2021-08-03 12:07:49 +02:00