| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Some IVAR indices are special in that they have global meaning across
multiple buses where as other IVARs are always private to the local bus.
Try to document this a bit and add constants for the various ranges to
avoid future conflicts.
This is a no-op, but IVAR indices are now generally defined as enums
as that makes it easier to define them in terms of ranges.
Reviewed by: imp, royger, andrew
Differential Revision: https://reviews.freebsd.org/D54159
|
| |
|
|
|
|
|
|
|
|
|
| |
Realtek changed how it styled its name 25 or so years ago, but the old
style persisted in many places. These products use the new styling in
their datasheets.
Signed-off-by: ykla yklaxds@gmail.com
Sponsored by: Chinese FreeBSD Community
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1901
|
| |
|
|
|
|
| |
Reported by: GCC -Wmaybe-uninitialized, -Wtautological-compare
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D45919
|
| |
|
|
|
|
|
|
| |
Otherwise I get an unused function warning during amd64 kernel builds.
Fixes: a592b5fd9d9c ("mccomphy: add support for YT8531")
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D50191
|
| |
|
|
|
|
|
|
|
| |
Reapply e69623451ea6, this time with proper conditions for code
requiring FDT.
Co-authored-by: mhorne
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D50074
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reset sequence doesn't clear the power down / isolate bits during
power up and configuration. Change that to make sure things are
consistent.
If the PHY is initialised by something external (eg a bootloader,
config EEPROM driving a switch chip, etc) which sets the power down
and/or isolate bits in E1000_CR, then the reset path wouldn't
undo it and the PHY will look permanently down. Even when we
configure autonegotiate or statically nail the port up, it's still
not coming out of the power mode.
Differential Revision: https://reviews.freebsd.org/D50045
|
| |
|
|
|
|
|
|
|
| |
The new code makes use of FDT/OFW types and interfaces, and obviously
fails to build on amd64. Revert to fix.
Pointy-hat-to: mhorne
This reverts commit e69623451ea62d2c3c76e0d0e775aa3f7317f2eb.
|
| |
|
|
|
|
|
| |
Reviewed by: mhorne
Tested by: mhorne
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D45600
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47675
|
| |
|
|
|
|
|
|
| |
This is a more common name for the parent of the port nodes.
PR: 280770
MFC after: 2 weeks
Reported by: Mike Belanger <mibelanger@qnx.com>
|
| |
|
|
|
|
|
|
|
|
| |
If a device was detached (e.g. via devctl) and then re-attached, the
ivars would be freed by the previous bus_child_detached method during
detach, but device_get_ivars during the subsequent attach would return
a stale pointer resulting in a use after free.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47371
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The RTL8211F-VD is a replacement/upgrade for the RTL8211F. Based on
https://github.com/torvalds/linux/commit/bb726b753f75a4eeda291438f89dfd9b94783569,
the only difference is the lack of the PCR2 register, which FreeBSD
doesn't use.
This fixes autonegotiation problems using the RTL8211F with ukphy(4).
Reviewed by: manu, bz
MFC after: 1 month
Differential Revision: <https://reviews.freebsd.org/D45109
|
| |
|
|
|
|
| |
Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/959
|
| |
|
|
|
| |
PR: 270040
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
The VSC8514 Quad-Port 10/100/1000BASE-T PHY seems to match the handling
for the VSC8504 (for the little we support of what we could) and while
it works with our generic ukphy add it as vscphy for porper display of
names in the system message buffer and the like (or in case we decide
to implement some extra features).
Tested on: Ten64
MFC after: 3 days
|
| |
|
|
|
|
|
| |
VSC8641 is a ciphy not a vscphy.
Sort it with the other entries of ciphy to avoid confusion.
MFC after: 3 days
|
| |
|
|
| |
Remove /^\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| |
|
|
| |
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
| |
Obtained from: Juniper Networks, Inc.
Sponsored by: Juniper Networks, Inc.
|
| |
|
|
|
|
|
|
|
| |
After removing the -FreeBSD and -NetBSD, we're left with a nuber of
BSD-2-Clause AND BSD-2-Clause, so tidy that up.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD 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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Partially from: https://reviews.freebsd.org/D36093
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This driver supports the auto negotiation mode between the copper and fiber
ports.
This PHY has two independent PHYs (one for copper and other for fiber) but in
this case the functionality is presented as a single PHY for easy management.
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Reviewed by: jhb
Obtained from: NetBSD via Andrius V
Differential Revision: https://reviews.freebsd.org/D35034
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to support various types of data stored in device
tree properties or ACPI _DSD packages, create a new enum so
the caller can specify the expected type of a property they
want to read, according to the binding. The bus logic will use
that information to process the underlying data.
For example in DT all integer properties are stored in BE format.
In order to get constant results across different platforms we
need to convert its endianness to match the host.
Another example are ACPI_TYPE_INTEGER properties stored
as uint64_t. Before this patch the ACPI logic would refuse
to read them if the provided buffer was smaller than 8 bytes.
Now this can be handled by using DEVICE_PROP_UINT32 type.
Modify the existing consumers of this API to reflect the changes
and update the man pages accordingly.
Reviewed by: mw
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33457
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are multiple buses that pretend to be ofw compatible,
e.g ofw_pci, mii_fdt. We now need to provide an implementation
of BUS_GET_PROPERTY for every one of them. Instead of modifying
them one by one it's better to just provide a default
implementation that simply traverses up the device tree.
Remove the now unneeded BUS_GET_PROPERTY implementation in mii_fdt.
Reviewed by: andrew, bz
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34031
|
| |
|
|
|
| |
Found by: CHERI
Fixes: 0c9156faeccb ("Introduce DP83822 PHY driver")
|
| |
|
|
|
| |
Found by: CHERI
Fixes: e85c94b8d6ca ("Introduce DP83867 PHY driver")
|
| |
|
|
|
|
|
|
|
|
| |
Add bus_topo_assert() and implmement it as GIANT_REQUIRED for the
moment. This will allow us to change more easily to a newbus-specific
lock int he future.
Sponsored by: Netflix
Reviewed by: wulf, mav, jhb
Differential Revision: https://reviews.freebsd.org/D31833
|
| |
|
|
| |
Fixes: 0c9156faeccb ("Introduce DP83822 PHY driver")
|
| |
|
|
|
|
|
|
|
|
|
| |
They're allocated using standard newbus API,
which means that we rely on miibus to handle the allocation.
Add VSC8504 to the list of supported PHYs, as it is similar enough
to the VSC8501 that is already supported by this driver.
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32816
|
| |
|
|
|
|
|
|
|
|
|
| |
DP83822 is a 10/100 Texas Instruments PHY.
Link status change interrupts are supported by the driver,
however not all boards have the PHY interrupt wired.
Because of that if failure to allocate an IRQ is not treated as an error.
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32815
|
| |
|
|
|
|
|
|
|
|
|
| |
DP83867 is a 10/100/1000 Texas Instruments PHY.
Only SGMII mode is supported.
Link status changes can be checked through an interrupt generated by the PHY,
if available
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32813
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Create a new miibus OFW specific layer leveraging miibus_fdt.c code.
PHY drivers can than read the properties using device_get_property(9) API.
Resource(interrupt) allocation is also supported.
In order to enable this each NIC/switch driver will have to be modified,
because of how miibus is attached to the parent driver.
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32812
|
| |
|
|
|
|
|
|
|
| |
It is used to limit the max advertised speed.
The value is read from DT by mii_fdt code.
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32816
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases we might want to limit the max speed advertised below of what
the PHY is capable of.
This is usually the case when we connect 1G capable PHY to 100M MAC, or when
some exotic physical connection is used.
Add a new mii_maxspeed field to mii_softc and parse it in mii_phy_dev_attach.
Speed limit is normally located in DT.
The property is already parsed in mii_fdt.c, but its value still has to be
passed by the PHY driver.
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32727
|
| |
|
|
| |
Update the URL for OUIs as the old one is 404 not even 301 anymore.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would only search for a PHY xref in node of the miibus
parent.
That didn't work very well with switches.
Fix that by searching through "ports" subnode, checking if any of its
children have a valid PHY xref.
Since switches tend to have multiple ports we also have multiple
candidates.
Use the PHY address read from mii_attach_args to find the right one.
Obtained from: Semihalf
Sponsored by: Alstom Group
Reviewed by: mw
Differential revision: https://reviews.freebsd.org/D32690
|
| |
|
|
|
|
|
|
|
| |
- s/priviledged/privileged/
- s/funtion/function/
- s/doens't/doesn't/
- s/sychronization/synchronization/
MFC after: 3 days
|