summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Dooley <conor.dooley@microchip.com>2026-03-25 19:28:05 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-30 00:34:27 +0300
commit8ccf062c6770618cb19f72ec0202463e01e2c7b8 (patch)
tree5064ac918f69731288414c7380eb67850a820dc8
parent57ec1622b62ae8dcd88a0084c49c5b72b1850e68 (diff)
downloadlinux-8ccf062c6770618cb19f72ec0202463e01e2c7b8.tar.xz
Revert "net: macb: Clean up the .usrio settings in macb_config instances"
Commit 0ae998c4efd69 ("net: macb: Clean up the .usrio settings in macb_config instances") was a misguided attempt to clean up the driver that actually just propagated problematic code. The default for usrio is actually no usrio, and already there are issues with people using the problematically named "macb_default_usrio" on platforms where the usrio does not have this so-called default behaviour. usrio is platform specific and using the default at91 usrio settings should be opt-in only. Revert the "cleanup" patch. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20260325-rundown-unrushed-dd82c9f5c56c@spud Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index c8182559edf6..6623b91b5efa 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -5513,31 +5513,37 @@ static const struct macb_config fu540_c000_config = {
.clk_init = fu540_c000_clk_init,
.init = fu540_c000_init,
.jumbo_max_len = 10240,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config at91sam9260_config = {
.caps = MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config sama5d3macb_config = {
.caps = MACB_CAPS_SG_DISABLED |
MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config pc302gem_config = {
.caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE,
.dma_burst_length = 16,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config sama5d2_config = {
.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_JUMBO,
.dma_burst_length = 16,
.jumbo_max_len = 10240,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config sama5d29_config = {
.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_GEM_HAS_PTP,
.dma_burst_length = 16,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config sama5d3_config = {
@@ -5545,21 +5551,25 @@ static const struct macb_config sama5d3_config = {
MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_JUMBO,
.dma_burst_length = 16,
.jumbo_max_len = 10240,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config sama5d4_config = {
.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
.dma_burst_length = 4,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config emac_config = {
.caps = MACB_CAPS_NEEDS_RSTONUBR | MACB_CAPS_MACB_IS_EMAC,
.clk_init = at91ether_clk_init,
.init = at91ether_init,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config np4_config = {
.caps = MACB_CAPS_USRIO_DISABLED,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config zynqmp_config = {
@@ -5569,12 +5579,14 @@ static const struct macb_config zynqmp_config = {
.dma_burst_length = 16,
.init = init_reset_optional,
.jumbo_max_len = 10240,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config zynq_config = {
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_NO_GIGABIT_HALF |
MACB_CAPS_NEEDS_RSTONUBR,
.dma_burst_length = 16,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config mpfs_config = {
@@ -5583,6 +5595,7 @@ static const struct macb_config mpfs_config = {
MACB_CAPS_GEM_HAS_PTP,
.dma_burst_length = 16,
.init = init_reset_optional,
+ .usrio = &macb_default_usrio,
.max_tx_length = 4040, /* Cadence Erratum 1686 */
.jumbo_max_len = 4040,
};
@@ -5611,6 +5624,7 @@ static const struct macb_config versal_config = {
.dma_burst_length = 16,
.init = init_reset_optional,
.jumbo_max_len = 10240,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config eyeq5_config = {
@@ -5620,6 +5634,7 @@ static const struct macb_config eyeq5_config = {
.dma_burst_length = 16,
.init = eyeq5_init,
.jumbo_max_len = 10240,
+ .usrio = &macb_default_usrio,
};
static const struct macb_config raspberrypi_rp1_config = {
@@ -5628,6 +5643,7 @@ static const struct macb_config raspberrypi_rp1_config = {
MACB_CAPS_GEM_HAS_PTP |
MACB_CAPS_EEE,
.dma_burst_length = 16,
+ .usrio = &macb_default_usrio,
.jumbo_max_len = 10240,
};
@@ -5675,6 +5691,7 @@ static const struct macb_config default_gem_config = {
MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP,
.dma_burst_length = 16,
+ .usrio = &macb_default_usrio,
.jumbo_max_len = 10240,
};
@@ -5761,7 +5778,7 @@ static int macb_probe(struct platform_device *pdev)
bp->wol = 0;
device_set_wakeup_capable(&pdev->dev, 1);
- bp->usrio = macb_config->usrio ? : &macb_default_usrio;
+ bp->usrio = macb_config->usrio;
/* By default we set to partial store and forward mode for zynqmp.
* Disable if not set in devicetree.