Skip to content

Commit 3cb12d2

Browse files
committed
Merge tag 'net-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Cross-tree/merge window issues: - rtl8150: don't incorrectly assign random MAC addresses; fix late in the 5.9 cycle started depending on a return code from a function which changed with the 5.10 PR from the usb subsystem Current release regressions: - Revert "virtio-net: ethtool configurable RXCSUM", it was causing crashes at probe when control vq was not negotiated/available Previous release regressions: - ixgbe: fix probing of multi-port 10 Gigabit Intel NICs with an MDIO bus, only first device would be probed correctly - nexthop: Fix performance regression in nexthop deletion by effectively switching from recently added synchronize_rcu() to synchronize_rcu_expedited() - netsec: ignore 'phy-mode' device property on ACPI systems; the property is not populated correctly by the firmware, but firmware configures the PHY so just keep boot settings Previous releases - always broken: - tcp: fix to update snd_wl1 in bulk receiver fast path, addressing bulk transfers getting "stuck" - icmp: randomize the global rate limiter to prevent attackers from getting useful signal - r8169: fix operation under forced interrupt threading, make the driver always use hard irqs, even on RT, given the handler is light and only wants to schedule napi (and do so through a _irqoff() variant, preferably) - bpf: Enforce pointer id generation for all may-be-null register type to avoid pointers erroneously getting marked as null-checked - tipc: re-configure queue limit for broadcast link - net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels - fix various issues in chelsio inline tls driver Misc: - bpf: improve just-added bpf_redirect_neigh() helper api to support supplying nexthop by the caller - in case BPF program has already done a lookup we can avoid doing another one - remove unnecessary break statements - make MCTCP not select IPV6, but rather depend on it" * tag 'net-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits) tcp: fix to update snd_wl1 in bulk receiver fast path net: Properly typecast int values to set sk_max_pacing_rate netfilter: nf_fwd_netdev: clear timestamp in forwarding path ibmvnic: save changed mac address to adapter->mac_addr selftests: mptcp: depends on built-in IPv6 Revert "virtio-net: ethtool configurable RXCSUM" rtnetlink: fix data overflow in rtnl_calcit() net: ethernet: mtk-star-emac: select REGMAP_MMIO net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device bpf, libbpf: Guard bpf inline asm from bpf_tail_call_static bpf, selftests: Extend test_tc_redirect to use modified bpf_redirect_neigh() bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop mptcp: depends on IPV6 but not as a module sfc: move initialisation of efx->filter_sem to efx_init_struct() mpls: load mpls_gso after mpls_iptunnel net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action() net: dsa: bcm_sf2: make const array static, makes object smaller mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it ...
2 parents 0adc313 + 18ded91 commit 3cb12d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+676
-256
lines changed

Documentation/devicetree/bindings/net/socionext-netsec.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ Optional properties: (See ethernet.txt file in the same directory)
3030
- max-frame-size: See ethernet.txt in the same directory.
3131

3232
The MAC address will be determined using the optional properties
33-
defined in ethernet.txt.
33+
defined in ethernet.txt. The 'phy-mode' property is required, but may
34+
be set to the empty string if the PHY configuration is programmed by
35+
the firmware or set by hardware straps, and needs to be preserved.
3436

3537
Example:
3638
eth0: ethernet@522d0000 {

Documentation/networking/ip-sysctl.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,13 +1142,15 @@ icmp_ratelimit - INTEGER
11421142
icmp_msgs_per_sec - INTEGER
11431143
Limit maximal number of ICMP packets sent per second from this host.
11441144
Only messages whose type matches icmp_ratemask (see below) are
1145-
controlled by this limit.
1145+
controlled by this limit. For security reasons, the precise count
1146+
of messages per second is randomized.
11461147

11471148
Default: 1000
11481149

11491150
icmp_msgs_burst - INTEGER
11501151
icmp_msgs_per_sec controls number of ICMP packets sent per second,
11511152
while icmp_msgs_burst controls the burst size of these packets.
1153+
For security reasons, the precise burst size is randomized.
11521154

11531155
Default: 50
11541156

Documentation/networking/nf_flowtable.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ More reading
109109
This documentation is based on the LWN.net articles [1]_\ [2]_. Rafal Milecki
110110
also made a very complete and comprehensive summary called "A state of network
111111
acceleration" that describes how things were before this infrastructure was
112-
mailined [3]_ and it also makes a rough summary of this work [4]_.
112+
mainlined [3]_ and it also makes a rough summary of this work [4]_.
113113

114114
.. [1] https://lwn.net/Articles/738214/
115115
.. [2] https://lwn.net/Articles/742164/

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3244,7 +3244,8 @@ R: KP Singh <[email protected]>
32443244
32453245
32463246
S: Supported
3247-
Q: https://patchwork.ozlabs.org/project/netdev/list/?delegate=77147
3247+
W: https://bpf.io/
3248+
Q: https://patchwork.kernel.org/project/netdevbpf/list/?delegate=121173
32483249
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
32493250
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
32503251
F: Documentation/bpf/

drivers/net/dsa/bcm_sf2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void bcm_sf2_recalc_clock(struct dsa_switch *ds)
5454
unsigned long new_rate;
5555
unsigned int ports_active;
5656
/* Frequenty in Mhz */
57-
const unsigned long rate_table[] = {
57+
static const unsigned long rate_table[] = {
5858
59220000,
5959
60820000,
6060
62500000,

drivers/net/dsa/ocelot/seville_vsc9953.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ static const struct felix_info seville_info_vsc9953 = {
11811181
.stats_layout = vsc9953_stats_layout,
11821182
.num_stats = ARRAY_SIZE(vsc9953_stats_layout),
11831183
.vcap = vsc9953_vcap_props,
1184-
.shared_queue_sz = 2048 * 1024,
1184+
.shared_queue_sz = 256 * 1024,
11851185
.num_mact_rows = 2048,
11861186
.num_ports = 10,
11871187
.mdio_bus_alloc = vsc9953_mdio_bus_alloc,

drivers/net/ethernet/aquantia/atlantic/aq_nic.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,6 @@ int aq_nic_set_link_ksettings(struct aq_nic_s *self,
11631163
default:
11641164
err = -1;
11651165
goto err_exit;
1166-
break;
11671166
}
11681167
if (!(self->aq_nic_cfg.aq_hw_caps->link_speed_msk & rate)) {
11691168
err = -1;

drivers/net/ethernet/chelsio/inline_crypto/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ if CHELSIO_INLINE_CRYPTO
1616
config CRYPTO_DEV_CHELSIO_TLS
1717
tristate "Chelsio Crypto Inline TLS Driver"
1818
depends on CHELSIO_T4
19+
depends on TLS
1920
depends on TLS_TOE
2021
help
2122
Support Chelsio Inline TLS with Chelsio crypto accelerator.

drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ static void chtls_sock_release(struct kref *ref)
9292
static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
9393
struct sock *sk)
9494
{
95+
struct adapter *adap = pci_get_drvdata(cdev->pdev);
9596
struct net_device *ndev = cdev->ports[0];
9697
#if IS_ENABLED(CONFIG_IPV6)
9798
struct net_device *temp;
9899
int addr_type;
99100
#endif
101+
int i;
100102

101103
switch (sk->sk_family) {
102104
case PF_INET:
@@ -127,8 +129,12 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
127129
return NULL;
128130

129131
if (is_vlan_dev(ndev))
130-
return vlan_dev_real_dev(ndev);
131-
return ndev;
132+
ndev = vlan_dev_real_dev(ndev);
133+
134+
for_each_port(adap, i)
135+
if (cdev->ports[i] == ndev)
136+
return ndev;
137+
return NULL;
132138
}
133139

134140
static void assign_rxopt(struct sock *sk, unsigned int opt)
@@ -477,7 +483,6 @@ void chtls_destroy_sock(struct sock *sk)
477483
chtls_purge_write_queue(sk);
478484
free_tls_keyid(sk);
479485
kref_put(&csk->kref, chtls_sock_release);
480-
csk->cdev = NULL;
481486
if (sk->sk_family == AF_INET)
482487
sk->sk_prot = &tcp_prot;
483488
#if IS_ENABLED(CONFIG_IPV6)
@@ -736,14 +741,13 @@ void chtls_listen_stop(struct chtls_dev *cdev, struct sock *sk)
736741

737742
#if IS_ENABLED(CONFIG_IPV6)
738743
if (sk->sk_family == PF_INET6) {
739-
struct chtls_sock *csk;
744+
struct net_device *ndev = chtls_find_netdev(cdev, sk);
740745
int addr_type = 0;
741746

742-
csk = rcu_dereference_sk_user_data(sk);
743747
addr_type = ipv6_addr_type((const struct in6_addr *)
744748
&sk->sk_v6_rcv_saddr);
745749
if (addr_type != IPV6_ADDR_ANY)
746-
cxgb4_clip_release(csk->egress_dev, (const u32 *)
750+
cxgb4_clip_release(ndev, (const u32 *)
747751
&sk->sk_v6_rcv_saddr, 1);
748752
}
749753
#endif
@@ -1157,6 +1161,9 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
11571161
ndev = n->dev;
11581162
if (!ndev)
11591163
goto free_dst;
1164+
if (is_vlan_dev(ndev))
1165+
ndev = vlan_dev_real_dev(ndev);
1166+
11601167
port_id = cxgb4_port_idx(ndev);
11611168

11621169
csk = chtls_sock_create(cdev);

drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,9 +902,9 @@ static int chtls_skb_copy_to_page_nocache(struct sock *sk,
902902
return 0;
903903
}
904904

905-
static int csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
905+
static bool csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
906906
{
907-
return (cdev->max_host_sndbuf - sk->sk_wmem_queued);
907+
return (cdev->max_host_sndbuf - sk->sk_wmem_queued > 0);
908908
}
909909

910910
static int csk_wait_memory(struct chtls_dev *cdev,
@@ -1240,6 +1240,7 @@ int chtls_sendpage(struct sock *sk, struct page *page,
12401240
copied = 0;
12411241
csk = rcu_dereference_sk_user_data(sk);
12421242
cdev = csk->cdev;
1243+
lock_sock(sk);
12431244
timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
12441245

12451246
err = sk_stream_wait_connect(sk, &timeo);

drivers/net/ethernet/cisco/enic/enic_ethtool.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@ static int enic_grxclsrule(struct enic *enic, struct ethtool_rxnfc *cmd)
434434
break;
435435
default:
436436
return -EINVAL;
437-
break;
438437
}
439438

440439
fsp->h_u.tcp_ip4_spec.ip4src = flow_get_u32_src(&n->keys);

drivers/net/ethernet/faraday/ftgmac100.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,6 +1817,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
18171817
priv->rxdes0_edorr_mask = BIT(30);
18181818
priv->txdes0_edotr_mask = BIT(30);
18191819
priv->is_aspeed = true;
1820+
/* Disable ast2600 problematic HW arbitration */
1821+
if (of_device_is_compatible(np, "aspeed,ast2600-mac")) {
1822+
iowrite32(FTGMAC100_TM_DEFAULT,
1823+
priv->base + FTGMAC100_OFFSET_TM);
1824+
}
18201825
} else {
18211826
priv->rxdes0_edorr_mask = BIT(15);
18221827
priv->txdes0_edotr_mask = BIT(15);

drivers/net/ethernet/faraday/ftgmac100.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@
169169
#define FTGMAC100_MACCR_FAST_MODE (1 << 19)
170170
#define FTGMAC100_MACCR_SW_RST (1 << 31)
171171

172+
/*
173+
* test mode control register
174+
*/
175+
#define FTGMAC100_TM_RQ_TX_VALID_DIS (1 << 28)
176+
#define FTGMAC100_TM_RQ_RR_IDLE_PREV (1 << 27)
177+
#define FTGMAC100_TM_DEFAULT \
178+
(FTGMAC100_TM_RQ_TX_VALID_DIS | FTGMAC100_TM_RQ_RR_IDLE_PREV)
179+
172180
/*
173181
* PHY control register
174182
*/

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4235,8 +4235,13 @@ static int handle_change_mac_rsp(union ibmvnic_crq *crq,
42354235
dev_err(dev, "Error %ld in CHANGE_MAC_ADDR_RSP\n", rc);
42364236
goto out;
42374237
}
4238+
/* crq->change_mac_addr.mac_addr is the requested one
4239+
* crq->change_mac_addr_rsp.mac_addr is the returned valid one.
4240+
*/
42384241
ether_addr_copy(netdev->dev_addr,
42394242
&crq->change_mac_addr_rsp.mac_addr[0]);
4243+
ether_addr_copy(adapter->mac_addr,
4244+
&crq->change_mac_addr_rsp.mac_addr[0]);
42404245
out:
42414246
complete(&adapter->fw_done);
42424247
return rc;

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -901,15 +901,13 @@ static bool ixgbe_x550em_a_has_mii(struct ixgbe_hw *hw)
901901
**/
902902
s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw)
903903
{
904+
s32 (*write)(struct mii_bus *bus, int addr, int regnum, u16 val);
905+
s32 (*read)(struct mii_bus *bus, int addr, int regnum);
904906
struct ixgbe_adapter *adapter = hw->back;
905907
struct pci_dev *pdev = adapter->pdev;
906908
struct device *dev = &adapter->netdev->dev;
907909
struct mii_bus *bus;
908910

909-
bus = devm_mdiobus_alloc(dev);
910-
if (!bus)
911-
return -ENOMEM;
912-
913911
switch (hw->device_id) {
914912
/* C3000 SoCs */
915913
case IXGBE_DEV_ID_X550EM_A_KR:
@@ -922,16 +920,23 @@ s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw)
922920
case IXGBE_DEV_ID_X550EM_A_1G_T:
923921
case IXGBE_DEV_ID_X550EM_A_1G_T_L:
924922
if (!ixgbe_x550em_a_has_mii(hw))
925-
return -ENODEV;
926-
bus->read = &ixgbe_x550em_a_mii_bus_read;
927-
bus->write = &ixgbe_x550em_a_mii_bus_write;
923+
return 0;
924+
read = &ixgbe_x550em_a_mii_bus_read;
925+
write = &ixgbe_x550em_a_mii_bus_write;
928926
break;
929927
default:
930-
bus->read = &ixgbe_mii_bus_read;
931-
bus->write = &ixgbe_mii_bus_write;
928+
read = &ixgbe_mii_bus_read;
929+
write = &ixgbe_mii_bus_write;
932930
break;
933931
}
934932

933+
bus = devm_mdiobus_alloc(dev);
934+
if (!bus)
935+
return -ENOMEM;
936+
937+
bus->read = read;
938+
bus->write = write;
939+
935940
/* Use the position of the device in the PCI hierarchy as the id */
936941
snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mdio-%s", ixgbe_driver_name,
937942
pci_name(pdev));

drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ static s32 ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw)
350350
if (ixgbe_read_eerd_generic(hw, pointer, &length)) {
351351
hw_dbg(hw, "EEPROM read failed\n");
352352
return IXGBE_ERR_EEPROM;
353-
break;
354353
}
355354

356355
/* Skip pointer section if length is invalid. */

drivers/net/ethernet/korina.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ static int korina_probe(struct platform_device *pdev)
11131113
return rc;
11141114

11151115
probe_err_register:
1116-
kfree(KSEG0ADDR(lp->td_ring));
1116+
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
11171117
probe_err_td_ring:
11181118
iounmap(lp->tx_dma_regs);
11191119
probe_err_dma_tx:
@@ -1133,7 +1133,7 @@ static int korina_remove(struct platform_device *pdev)
11331133
iounmap(lp->eth_regs);
11341134
iounmap(lp->rx_dma_regs);
11351135
iounmap(lp->tx_dma_regs);
1136-
kfree(KSEG0ADDR(lp->td_ring));
1136+
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
11371137

11381138
unregister_netdev(bif->dev);
11391139
free_netdev(bif->dev);

drivers/net/ethernet/mediatek/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ config NET_MEDIATEK_SOC
1717
config NET_MEDIATEK_STAR_EMAC
1818
tristate "MediaTek STAR Ethernet MAC support"
1919
select PHYLIB
20+
select REGMAP_MMIO
2021
help
2122
This driver supports the ethernet MAC IP first used on
2223
MediaTek MT85** SoCs.

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4694,7 +4694,7 @@ static int rtl8169_close(struct net_device *dev)
46944694

46954695
phy_disconnect(tp->phydev);
46964696

4697-
pci_free_irq(pdev, 0, tp);
4697+
free_irq(pci_irq_vector(pdev, 0), tp);
46984698

46994699
dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
47004700
tp->RxPhyAddr);
@@ -4745,8 +4745,8 @@ static int rtl_open(struct net_device *dev)
47454745

47464746
rtl_request_firmware(tp);
47474747

4748-
retval = pci_request_irq(pdev, 0, rtl8169_interrupt, NULL, tp,
4749-
dev->name);
4748+
retval = request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt,
4749+
IRQF_NO_THREAD | IRQF_SHARED, dev->name, tp);
47504750
if (retval < 0)
47514751
goto err_release_fw_2;
47524752

@@ -4763,7 +4763,7 @@ static int rtl_open(struct net_device *dev)
47634763
return retval;
47644764

47654765
err_free_irq:
4766-
pci_free_irq(pdev, 0, tp);
4766+
free_irq(pci_irq_vector(pdev, 0), tp);
47674767
err_release_fw_2:
47684768
rtl_release_firmware(tp);
47694769
rtl8169_rx_clear(tp);

drivers/net/ethernet/sfc/efx_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ int efx_init_struct(struct efx_nic *efx,
10141014
efx->num_mac_stats = MC_CMD_MAC_NSTATS;
10151015
BUILD_BUG_ON(MC_CMD_MAC_NSTATS - 1 != MC_CMD_MAC_GENERATION_END);
10161016
mutex_init(&efx->mac_lock);
1017+
init_rwsem(&efx->filter_sem);
10171018
#ifdef CONFIG_RFS_ACCEL
10181019
mutex_init(&efx->rps_mutex);
10191020
spin_lock_init(&efx->rps_hash_lock);

drivers/net/ethernet/sfc/rx_common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,6 @@ int efx_probe_filters(struct efx_nic *efx)
797797
{
798798
int rc;
799799

800-
init_rwsem(&efx->filter_sem);
801800
mutex_lock(&efx->mac_lock);
802801
down_write(&efx->filter_sem);
803802
rc = efx->type->filter_table_probe(efx);

drivers/net/ethernet/socionext/netsec.c

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <linux/pm_runtime.h>
77
#include <linux/acpi.h>
88
#include <linux/of_mdio.h>
9+
#include <linux/of_net.h>
910
#include <linux/etherdevice.h>
1011
#include <linux/interrupt.h>
1112
#include <linux/io.h>
@@ -1833,6 +1834,14 @@ static const struct net_device_ops netsec_netdev_ops = {
18331834
static int netsec_of_probe(struct platform_device *pdev,
18341835
struct netsec_priv *priv, u32 *phy_addr)
18351836
{
1837+
int err;
1838+
1839+
err = of_get_phy_mode(pdev->dev.of_node, &priv->phy_interface);
1840+
if (err) {
1841+
dev_err(&pdev->dev, "missing required property 'phy-mode'\n");
1842+
return err;
1843+
}
1844+
18361845
priv->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
18371846
if (!priv->phy_np) {
18381847
dev_err(&pdev->dev, "missing required property 'phy-handle'\n");
@@ -1859,6 +1868,14 @@ static int netsec_acpi_probe(struct platform_device *pdev,
18591868
if (!IS_ENABLED(CONFIG_ACPI))
18601869
return -ENODEV;
18611870

1871+
/* ACPI systems are assumed to configure the PHY in firmware, so
1872+
* there is really no need to discover the PHY mode from the DSDT.
1873+
* Since firmware is known to exist in the field that configures the
1874+
* PHY correctly but passes the wrong mode string in the phy-mode
1875+
* device property, we have no choice but to ignore it.
1876+
*/
1877+
priv->phy_interface = PHY_INTERFACE_MODE_NA;
1878+
18621879
ret = device_property_read_u32(&pdev->dev, "phy-channel", phy_addr);
18631880
if (ret) {
18641881
dev_err(&pdev->dev,
@@ -1995,13 +2012,6 @@ static int netsec_probe(struct platform_device *pdev)
19952012
priv->msg_enable = NETIF_MSG_TX_ERR | NETIF_MSG_HW | NETIF_MSG_DRV |
19962013
NETIF_MSG_LINK | NETIF_MSG_PROBE;
19972014

1998-
priv->phy_interface = device_get_phy_mode(&pdev->dev);
1999-
if ((int)priv->phy_interface < 0) {
2000-
dev_err(&pdev->dev, "missing required property 'phy-mode'\n");
2001-
ret = -ENODEV;
2002-
goto free_ndev;
2003-
}
2004-
20052015
priv->ioaddr = devm_ioremap(&pdev->dev, mmio_res->start,
20062016
resource_size(mmio_res));
20072017
if (!priv->ioaddr) {

0 commit comments

Comments
 (0)