From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Corentin Labbe <clabbe.montjoie@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>,
ulli.kroll@googlemail.com, davem@davemloft.net,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.15 173/188] net: gemini: allow any RGMII interface mode
Date: Mon, 17 Jan 2022 21:31:37 -0500 [thread overview]
Message-ID: <20220118023152.1948105-173-sashal@kernel.org> (raw)
In-Reply-To: <20220118023152.1948105-1-sashal@kernel.org>
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
[ Upstream commit 4e4f325a0a55907b14f579e6b1a38c53755e3de2 ]
The four RGMII interface modes take care of the required RGMII delay
configuration at the PHY and should not be limited by the network MAC
driver. Sadly, gemini was only permitting RGMII mode with no delays,
which would require the required delay to be inserted via PCB tracking
or by the MAC.
However, there are designs that require the PHY to add the delay, which
is impossible without Gemini permitting the other three PHY interface
modes. Fix the driver to allow these.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Link: https://lore.kernel.org/r/E1n4mpT-002PLd-Ha@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/cortina/gemini.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
index 6e745ca4c4333..012ca11a38cc1 100644
--- a/drivers/net/ethernet/cortina/gemini.c
+++ b/drivers/net/ethernet/cortina/gemini.c
@@ -305,21 +305,21 @@ static void gmac_speed_set(struct net_device *netdev)
switch (phydev->speed) {
case 1000:
status.bits.speed = GMAC_SPEED_1000;
- if (phydev->interface == PHY_INTERFACE_MODE_RGMII)
+ if (phy_interface_mode_is_rgmii(phydev->interface))
status.bits.mii_rmii = GMAC_PHY_RGMII_1000;
netdev_dbg(netdev, "connect %s to RGMII @ 1Gbit\n",
phydev_name(phydev));
break;
case 100:
status.bits.speed = GMAC_SPEED_100;
- if (phydev->interface == PHY_INTERFACE_MODE_RGMII)
+ if (phy_interface_mode_is_rgmii(phydev->interface))
status.bits.mii_rmii = GMAC_PHY_RGMII_100_10;
netdev_dbg(netdev, "connect %s to RGMII @ 100 Mbit\n",
phydev_name(phydev));
break;
case 10:
status.bits.speed = GMAC_SPEED_10;
- if (phydev->interface == PHY_INTERFACE_MODE_RGMII)
+ if (phy_interface_mode_is_rgmii(phydev->interface))
status.bits.mii_rmii = GMAC_PHY_RGMII_100_10;
netdev_dbg(netdev, "connect %s to RGMII @ 10 Mbit\n",
phydev_name(phydev));
@@ -389,6 +389,9 @@ static int gmac_setup_phy(struct net_device *netdev)
status.bits.mii_rmii = GMAC_PHY_GMII;
break;
case PHY_INTERFACE_MODE_RGMII:
+ case PHY_INTERFACE_MODE_RGMII_ID:
+ case PHY_INTERFACE_MODE_RGMII_TXID:
+ case PHY_INTERFACE_MODE_RGMII_RXID:
netdev_dbg(netdev,
"RGMII: set GMAC0 and GMAC1 to MII/RGMII mode\n");
status.bits.mii_rmii = GMAC_PHY_RGMII_100_10;
--
2.34.1
next prev parent reply other threads:[~2022-01-18 2:58 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 2:28 [PATCH AUTOSEL 5.15 001/188] Bluetooth: Fix debugfs entry leak in hci_register_dev() Sasha Levin
2022-01-18 2:28 ` [PATCH AUTOSEL 5.15 002/188] Bluetooth: Fix memory leak of hci device Sasha Levin
2022-01-18 2:28 ` [PATCH AUTOSEL 5.15 004/188] Bluetooth: Fix removing adv when processing cmd complete Sasha Levin
2022-01-18 2:28 ` [PATCH AUTOSEL 5.15 006/188] libbpf: Validate that .BTF and .BTF.ext sections contain data Sasha Levin
2022-01-18 2:28 ` [PATCH AUTOSEL 5.15 008/188] selftests/bpf: Fix memory leaks in btf_type_c_dump() helper Sasha Levin
2022-01-18 2:28 ` [PATCH AUTOSEL 5.15 009/188] selftests/bpf: Destroy XDP link correctly Sasha Levin
2022-01-18 2:28 ` [PATCH AUTOSEL 5.15 010/188] selftests/bpf: Fix bpf_object leak in skb_ctx selftest Sasha Levin
2022-01-18 2:28 ` [PATCH AUTOSEL 5.15 011/188] ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 020/188] batman-adv: allow netlink usage in unprivileged containers Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 022/188] ath11k: Fix crash caused by uninitialized TX ring Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 028/188] amd: lance: use eth_hw_addr_set() Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 029/188] amd: ni65: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 030/188] amd: a2065/ariadne: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 031/188] amd: hplance: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 032/188] amd: atarilance: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 033/188] amd: mvme147: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 034/188] 8390: smc-ultra: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 035/188] 8390: hydra: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 036/188] 8390: mac8390: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 037/188] 8390: wd: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 038/188] smc9194: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 039/188] lasi_82594: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 040/188] apple: macmace: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 041/188] cirrus: mac89x0: " Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 045/188] libbpf: Accommodate DWARF/compiler bug with duplicated structs Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 046/188] ethernet: renesas: Use div64_ul instead of do_div Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 047/188] 82596: use eth_hw_addr_set() Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 055/188] mlxsw: pci: Add shutdown method in PCI driver Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 063/188] rtw88: add quirk to disable pci caps on HP 250 G7 Notebook PC Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 064/188] mwifiex: Fix skb_over_panic in mwifiex_usb_recv() Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 065/188] rsi: Fix use-after-free in rsi_rx_done_handler() Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 066/188] rsi: Fix out-of-bounds read in rsi_read_pkt() Sasha Levin
2022-01-18 2:29 ` [PATCH AUTOSEL 5.15 067/188] ath11k: Avoid NULL ptr access during mgmt tx cleanup Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 090/188] iwlwifi: mvm: synchronize with FW after multicast commands Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 091/188] iwlwifi: mvm: avoid clearing a just saved session protection id Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 093/188] net: dsa: ocelot: felix: Remove requirement for PCS in felix devices Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 094/188] ath11k: avoid deadlock by change ieee80211_queue_work for regd_update_work Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 095/188] ath10k: Fix tx hanging Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 096/188] net-sysfs: update the queue counts in the unregistration path Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 097/188] net: phy: prefer 1000baseT over 1000baseKX Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 101/188] net: Enable neighbor sysctls that is save for userns root Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 102/188] ath11k: Avoid false DEADLOCK warning reported by lockdep Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 108/188] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 110/188] bpf: Do not WARN in bpf_warn_invalid_xdp_action() Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 130/188] mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy() Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 131/188] mt76: do not pass the received frame with decryption error Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 132/188] mt76: mt7615: improve wmm index allocation Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 133/188] ath9k_htc: fix NULL pointer dereference at ath9k_htc_rxep() Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 134/188] ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet() Sasha Levin
2022-01-18 2:30 ` [PATCH AUTOSEL 5.15 135/188] ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 136/188] rtw88: 8822c: update rx settings to prevent potential hw deadlock Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 138/188] iwlwifi: fix leaks/bad data after failed firmware load Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 139/188] iwlwifi: remove module loading failure message Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 140/188] iwlwifi: mvm: Fix calculation of frame length Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 141/188] iwlwifi: mvm: fix AUX ROC removal Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 142/188] iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 146/188] ath11k: Fix napi related hang Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 149/188] xfrm: rate limit SA mapping change message to user space Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 166/188] net: mdio: Demote probed message to debug print Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 167/188] mac80211: allow non-standard VHT MCS-10/11 Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 170/188] bpf/selftests: Fix namespace mount setup in tc_redirect Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 171/188] mlxsw: pci: Avoid flow control for EMAD packets Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 172/188] net: phy: marvell: configure RGMII delays for 88E1118 Sasha Levin
2022-01-18 2:31 ` Sasha Levin [this message]
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 174/188] net: dsa: hold rtnl_mutex when calling dsa_master_{setup,teardown} Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 180/188] net/mlx5: Update log_max_qp value to FW max capability Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 181/188] net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 184/188] can: flexcan: allow to change quirks at runtime Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 185/188] can: flexcan: rename RX modes Sasha Levin
2022-01-18 2:31 ` [PATCH AUTOSEL 5.15 186/188] can: flexcan: add more quirks to describe RX path capabilities Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220118023152.1948105-173-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=stable@vger.kernel.org \
--cc=ulli.kroll@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).