Message ID | 20230810080909.6259-1-brgl@bgdev.pl |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp289405vqi; Thu, 10 Aug 2023 02:18:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzV8AKiU4gE2LJF39l5ZYBm0uA3TLoy5YncbjjOjCHsKeCs4LiflhET4LCvSOLM6JjzvOg X-Received: by 2002:a17:90a:5d94:b0:268:df3d:bfa1 with SMTP id t20-20020a17090a5d9400b00268df3dbfa1mr1577122pji.20.1691659087988; Thu, 10 Aug 2023 02:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691659087; cv=none; d=google.com; s=arc-20160816; b=qXbrWPAhtCH2mTyzl2eg8HwqU7hVYxForq25ATUBtGcgEVn9birU20lAgonOLX83YY 9fhMwB51pd5coYlj/4vNTh3nqy7GUr76Q+3fWyTiJOauiHjGmhgWg7J0D9Zb6E5++Ub6 8gRfyy/aqlD4VhVZpmxSmwEDD/BrGV6/kH6mW7/C6KQquf6Mq6x8NSVJ9SDWSykRyk4k bRCXeXOywOSWjElY5LOitr5LKti7uOtdCJRANUgmYm9Wr9FhXB9E5CeIAxIrsVPgZXjn pAFVfJvTKk6wprrr4e49ERC4o8K3XC4EfcguGoI0M6tpZcy3JxSrj/enEHlUwz0OS4GC U1eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=tsX5oKEyFSe+RgZBEB8JkNzTpB96tD6QQCUVk3EhDv4=; fh=v6UDtM1LG1pNigs7Y52IFg78NWSS5jq/R3uih93pXmc=; b=YpQ0qCPTyK5f3lWznvnFFVGlRQfPaPH8LPomQZ5PKQFJ4KfchwiC52r4J200pxcTqn kL9Az9uztx6mZ/RMs1gqeRl+Bh6O/y7v73+EYeLriY1bA16hlyvtQGFyl5NWUxtQQtZE 22rBYFo30VZdaehbc8584RQ4oQ5+Js8P0g8cv9hYVmLzUYpyMGJki3ypc2soiUilutnd QzjrsBGDpsA5SEQVvamNH16iQi176MQqgmm2ti4Imr89AzUFfDaPj7BJkKYBAegaychh Xn1ZjdQskB5wDmlR9kww/sBZdt5GP7SMCTXGwgQBCqYvijX3OhET4JvC7bQNUsjHUmps zhQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=yZWUCfTH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i22-20020a17090adc1600b00269781d3a3dsi1206590pjv.111.2023.08.10.02.17.54; Thu, 10 Aug 2023 02:18:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=yZWUCfTH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232422AbjHJIJQ (ORCPT <rfc822;m15293943392@gmail.com> + 99 others); Thu, 10 Aug 2023 04:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231976AbjHJIJQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Aug 2023 04:09:16 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 425121BCF for <linux-kernel@vger.kernel.org>; Thu, 10 Aug 2023 01:09:15 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fe426b86a8so5519195e9.3 for <linux-kernel@vger.kernel.org>; Thu, 10 Aug 2023 01:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1691654954; x=1692259754; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tsX5oKEyFSe+RgZBEB8JkNzTpB96tD6QQCUVk3EhDv4=; b=yZWUCfTHC7LgxowkMm97O88bFAr77Q7obnNSg4cGopsi/uqBRPVsruAFADVTUr3fQc pou96Zmf+K8VrjJcYz0PwRwx/I0TOagmb6iDEPTfTRfI0t0MljUh7Sq3yfPvsSEGiyZE D452pmg7V/go7sIoHuCTSJz4jevW3pj0oLBID14MipZMUGZcRiWv/t4lDttis8uBAK8W eWMkm3r7iBV7hQVjJXy28YXDSrhCIDZVlJ6qsEqH0/iXg970m9zAciZQy7cJsdxFlMVu /OO8gGmdddDMtddSZW9MN47Jv8cABZ+ppPO/jM7jV26CTkiBUXbAcYJFRcZFmuuYKZ17 tMLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691654954; x=1692259754; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tsX5oKEyFSe+RgZBEB8JkNzTpB96tD6QQCUVk3EhDv4=; b=bVzs9lORwfuuD+vnwWcjI3ZEiTIwJ35QBL/ng84RyCU8g1nOobIvy3hugYsoEE7eNt 8/XWJfJBXgxyG4IIzCU8kPc74MFX0Qw/rUd0SlB9MQQ6o3kLRA0v5kZ7S+OHaJKu7h4F 0+XyI3od3tuAPcLMZ4RG0KxZgMK/lktGZnidflxyQ03lrLd8SEuPeVihlDGlb/8ogoQw 542tm1yQpAyELJ/+xodJy5Yly6JR5mKxpYWjspCqHCXDmP1dNo06qixL0B8VejK3pGKY iEvOwe/0v0cYen/WFh02wRL/p2KbKRb4E6pXtAUqiCLy0ScYggQWUBnCog+WUXfKRJOZ W4Vw== X-Gm-Message-State: AOJu0YxsnTRc9IwBXFbAJUEIHkDHWPFjs8s7JAyBDGx1zLEaviNbqo32 fw7moz5ggkbKRXas5VOfesZslQ== X-Received: by 2002:a1c:f716:0:b0:3fc:92:73d6 with SMTP id v22-20020a1cf716000000b003fc009273d6mr1204841wmh.11.1691654953620; Thu, 10 Aug 2023 01:09:13 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:74d3:226a:31b3:454c]) by smtp.gmail.com with ESMTPSA id y10-20020a1c4b0a000000b003fe2f3a89d4sm1321790wma.7.2023.08.10.01.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 01:09:13 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Alex Elder <elder@linaro.org>, Srini Kandagatla <srinivas.kandagatla@linaro.org>, Andrew Halaney <ahalaney@redhat.com> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Subject: [PATCH v3 0/9] arm64: dts: qcom: enable EMAC1 on sa8775p Date: Thu, 10 Aug 2023 10:09:00 +0200 Message-Id: <20230810080909.6259-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773833120073000463 X-GMAIL-MSGID: 1773833120073000463 |
Series |
arm64: dts: qcom: enable EMAC1 on sa8775p
|
|
Message
Bartosz Golaszewski
Aug. 10, 2023, 8:09 a.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This series contains changes required to enable EMAC1 on sa8775p-ride.
This iteration no longer depends on any changes to the stmmac driver to
be functional. It turns out I was mistaken in thinking that the two
MACs' MDIO masters share the MDIO clock and data lines. In reality, only
one MAC is connected to an MDIO bus and it controlls PHYs for both MAC0
and MAC1. The MDIO master on MAC1 is not connected to anything.
v1 -> v2:
- remove pin functions for MDIO signals and don't assign them to MAC1
- add a delay after asserting the PHY's reset signal, not only when it's
released
- remove the entire concept of shared-mdio property
- add aliases for ethernet nodes in order to avoid MDIO bus name
conflicts in stmmac
v2 -> v3:
- add a patch sorting aliases in sa8775p-ride.dts and sort the ethernet
entries
- remove a newline between clocks and clock-names properties
- collect tags
Bartosz Golaszewski (9):
arm64: dts: qcom: sa8775p: add a node for the second serdes PHY
arm64: dts: qcom: sa8775p: add a node for EMAC1
arm64: dts: qcom: sa8775p-ride: enable the second SerDes PHY
arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the
PHY
arm64: dts: qcom: sa8775p-ride: index the first SGMII PHY
arm64: dts: qcom: sa8775p-ride: add the second SGMII PHY
arm64: dts: qcom: sa8775p-ride: sort aliases alphabetically
arm64: dts: qcom: sa8775p-ride: add an alias for ethernet0
arm64: dts: qcom: sa8775p-ride: enable EMAC1
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 102 ++++++++++++++++++++--
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 42 +++++++++
2 files changed, 136 insertions(+), 8 deletions(-)
Comments
On Thu, Aug 10, 2023 at 10:09:00AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > This series contains changes required to enable EMAC1 on sa8775p-ride. > This iteration no longer depends on any changes to the stmmac driver to > be functional. It turns out I was mistaken in thinking that the two > MACs' MDIO masters share the MDIO clock and data lines. In reality, only > one MAC is connected to an MDIO bus and it controlls PHYs for both MAC0 > and MAC1. The MDIO master on MAC1 is not connected to anything. > I've taken this for a quick (disconnected from network) spin, and things work as expected without having anything plugged in. I'm trying to get someone to plug it in so I can test that networking actually works, but the interesting bit is the phy/mdio bit here, and that's at least working ok I can tell. The rest is boilerplate similar to the other MAC instance which works fine. Removing the driver results in the following oops, but that's already discussed[0] and is independent of the devicetree description: I'd add a test tag but I want to wait for some network traffic tests before I do such. I wouldn't wait on picking it up just because of that though. [0] https://lore.kernel.org/netdev/ZNKLjuxnR2+V3g1D@shell.armlinux.org.uk/ [root@dhcp19-243-28 ~]# modprobe -r dwmac_qcom_ethqos [ 1260.620402] qcom-ethqos 23040000.ethernet eth1: stmmac_dvr_remove: removing driver [ 1260.655724] qcom-ethqos 23040000.ethernet eth1: FPE workqueue stop [ 1261.034265] qcom-ethqos 23000000.ethernet eth0: stmmac_dvr_remove: removing driver [ 1261.042108] Unable to handle kernel paging request at virtual address dead000000000122 [ 1261.050379] Mem abort info: [ 1261.053251] ESR = 0x0000000096000044 [ 1261.057113] EC = 0x25: DABT (current EL), IL = 32 bits [ 1261.062573] SET = 0, FnV = 0 [ 1261.065712] EA = 0, S1PTW = 0 [ 1261.068946] FSC = 0x04: level 0 translation fault [ 1261.073956] Data abort info: [ 1261.076916] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 [ 1261.082552] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 [ 1261.087882] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 1261.093338] [dead000000000122] address between user and kernel address ranges [ 1261.100667] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP [ 1261.107096] Modules linked in: r8152 rfkill marvell dwmac_qcom_ethqos(-) qcom_pon stmmac_platform crct10dif_ce stmmac spi_geni_qcom i2c_qcom_geni phy_qcom_qmp_usb phy_qcom_sgmii_eth phy_qcom_snps_femto_v2 pcs_xpcs qcom_wdt socinfo phy_qcom_qmp_pcie fuse ufs_qcom phy_qcom_qmp_ufs [ 1261.132407] CPU: 2 PID: 610 Comm: modprobe Not tainted 6.5.0-rc4-next-20230731-00008-g18ccccee8230 #7 [ 1261.141860] Hardware name: Qualcomm SA8775P Ride (DT) [ 1261.147042] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1261.154185] pc : device_link_put_kref+0x44/0x110 [ 1261.158926] lr : device_link_put_kref+0xf4/0x110 [ 1261.163662] sp : ffff800082a938e0 [ 1261.167066] x29: ffff800082a938e0 x28: ffff6ec68bdc9d80 x27: 0000000000000000 [ 1261.174390] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 [ 1261.181714] x23: ffff800082a93b38 x22: ffff6ec68690f2d8 x21: ffff6ec6896aed30 [ 1261.189031] x20: ffff6ec68246b830 x19: ffff6ec68246b800 x18: 0000000000000006 [ 1261.196355] x17: ffff9259b7856000 x16: ffffdc7b42e3eaec x15: 725f7276645f6361 [ 1261.203679] x14: 0000000000000000 x13: 0000000000000002 x12: 0000000000000000 [ 1261.210996] x11: 0000000000000040 x10: ffffdc7b447de0b0 x9 : ffffdc7b447de0a8 [ 1261.218321] x8 : ffff6ec680400028 x7 : 0000000000000000 x6 : 0000000000000000 [ 1261.225645] x5 : ffff6ec680400000 x4 : 00000000c0000000 x3 : ffff6ec6896ae8b0 [ 1261.232963] x2 : dead000000000122 x1 : dead000000000122 x0 : ffff6ec68246b830 [ 1261.240287] Call trace: [ 1261.242806] device_link_put_kref+0x44/0x110 [ 1261.247190] device_link_del+0x30/0x48 [ 1261.251040] phy_detach+0x24/0x15c [ 1261.254530] phy_disconnect+0x44/0x5c [ 1261.258295] phylink_disconnect_phy+0x64/0xb0 [ 1261.262764] stmmac_release+0x58/0x2d4 [stmmac] [ 1261.267425] __dev_close_many+0xac/0x14c [ 1261.271458] dev_close_many+0x88/0x134 [ 1261.275308] unregister_netdevice_many_notify+0x130/0x7d0 [ 1261.280852] unregister_netdevice_queue+0xd4/0xdc [ 1261.285682] unregister_netdev+0x24/0x38 [ 1261.289715] stmmac_dvr_remove+0x80/0x150 [stmmac] [ 1261.294636] devm_stmmac_pltfr_remove+0x24/0x48 [stmmac_platform] [ 1261.300887] devm_action_release+0x14/0x20 [ 1261.305090] devres_release_all+0xa0/0x100 [ 1261.309293] device_unbind_cleanup+0x18/0x68 [ 1261.313676] device_release_driver_internal+0x1f4/0x228 [ 1261.319039] driver_detach+0x4c/0x98 [ 1261.322708] bus_remove_driver+0x6c/0xbc [ 1261.326739] driver_unregister+0x30/0x60 [ 1261.330772] platform_driver_unregister+0x14/0x20 [ 1261.335603] qcom_ethqos_driver_exit+0x18/0x1a8 [dwmac_qcom_ethqos] [ 1261.342035] __arm64_sys_delete_module+0x19c/0x288 [ 1261.346952] invoke_syscall+0x48/0x110 [ 1261.350804] el0_svc_common.constprop.0+0xc4/0xe4 [ 1261.355636] do_el0_svc+0x38/0x94 [ 1261.359040] el0_svc+0x2c/0x84 [ 1261.362178] el0t_64_sync_handler+0x120/0x12c [ 1261.366646] el0t_64_sync+0x190/0x194 [ 1261.370413] Code: d2802441 aa1403e0 f2fbd5a1 f9000462 (f9000043) [ 1261.376661] ---[ end trace 0000000000000000 ]--- Segmentation fault
On Thu, Aug 10, 2023 at 10:13 PM Andrew Halaney <ahalaney@redhat.com> wrote: > > On Thu, Aug 10, 2023 at 10:09:00AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > This series contains changes required to enable EMAC1 on sa8775p-ride. > > This iteration no longer depends on any changes to the stmmac driver to > > be functional. It turns out I was mistaken in thinking that the two > > MACs' MDIO masters share the MDIO clock and data lines. In reality, only > > one MAC is connected to an MDIO bus and it controlls PHYs for both MAC0 > > and MAC1. The MDIO master on MAC1 is not connected to anything. > > > > I've taken this for a quick (disconnected from network) spin, and things > work as expected without having anything plugged in. > > I'm trying to get someone to plug it in so I can test that networking > actually works, but the interesting bit is the phy/mdio bit here, and > that's at least working ok I can tell. The rest is boilerplate similar > to the other MAC instance which works fine. > > Removing the driver results in the following oops, but that's already > discussed[0] and is independent of the devicetree description: > > I'd add a test tag but I want to wait for some network traffic tests > before I do such. I wouldn't wait on picking it up just because of > that though. > > [0] https://lore.kernel.org/netdev/ZNKLjuxnR2+V3g1D@shell.armlinux.org.uk/ > > [root@dhcp19-243-28 ~]# modprobe -r dwmac_qcom_ethqos > [ 1260.620402] qcom-ethqos 23040000.ethernet eth1: stmmac_dvr_remove: removing driver > [ 1260.655724] qcom-ethqos 23040000.ethernet eth1: FPE workqueue stop > [ 1261.034265] qcom-ethqos 23000000.ethernet eth0: stmmac_dvr_remove: removing driver > [ 1261.042108] Unable to handle kernel paging request at virtual address dead000000000122 > [ 1261.050379] Mem abort info: > [ 1261.053251] ESR = 0x0000000096000044 > [ 1261.057113] EC = 0x25: DABT (current EL), IL = 32 bits > [ 1261.062573] SET = 0, FnV = 0 > [ 1261.065712] EA = 0, S1PTW = 0 > [ 1261.068946] FSC = 0x04: level 0 translation fault > [ 1261.073956] Data abort info: > [ 1261.076916] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 > [ 1261.082552] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 > [ 1261.087882] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 > [ 1261.093338] [dead000000000122] address between user and kernel address ranges > [ 1261.100667] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP > [ 1261.107096] Modules linked in: r8152 rfkill marvell dwmac_qcom_ethqos(-) qcom_pon stmmac_platform crct10dif_ce stmmac spi_geni_qcom i2c_qcom_geni phy_qcom_qmp_usb phy_qcom_sgmii_eth phy_qcom_snps_femto_v2 pcs_xpcs qcom_wdt socinfo phy_qcom_qmp_pcie fuse ufs_qcom phy_qcom_qmp_ufs > [ 1261.132407] CPU: 2 PID: 610 Comm: modprobe Not tainted 6.5.0-rc4-next-20230731-00008-g18ccccee8230 #7 > [ 1261.141860] Hardware name: Qualcomm SA8775P Ride (DT) > [ 1261.147042] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > [ 1261.154185] pc : device_link_put_kref+0x44/0x110 > [ 1261.158926] lr : device_link_put_kref+0xf4/0x110 > [ 1261.163662] sp : ffff800082a938e0 > [ 1261.167066] x29: ffff800082a938e0 x28: ffff6ec68bdc9d80 x27: 0000000000000000 > [ 1261.174390] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 > [ 1261.181714] x23: ffff800082a93b38 x22: ffff6ec68690f2d8 x21: ffff6ec6896aed30 > [ 1261.189031] x20: ffff6ec68246b830 x19: ffff6ec68246b800 x18: 0000000000000006 > [ 1261.196355] x17: ffff9259b7856000 x16: ffffdc7b42e3eaec x15: 725f7276645f6361 > [ 1261.203679] x14: 0000000000000000 x13: 0000000000000002 x12: 0000000000000000 > [ 1261.210996] x11: 0000000000000040 x10: ffffdc7b447de0b0 x9 : ffffdc7b447de0a8 > [ 1261.218321] x8 : ffff6ec680400028 x7 : 0000000000000000 x6 : 0000000000000000 > [ 1261.225645] x5 : ffff6ec680400000 x4 : 00000000c0000000 x3 : ffff6ec6896ae8b0 > [ 1261.232963] x2 : dead000000000122 x1 : dead000000000122 x0 : ffff6ec68246b830 > [ 1261.240287] Call trace: > [ 1261.242806] device_link_put_kref+0x44/0x110 > [ 1261.247190] device_link_del+0x30/0x48 > [ 1261.251040] phy_detach+0x24/0x15c > [ 1261.254530] phy_disconnect+0x44/0x5c > [ 1261.258295] phylink_disconnect_phy+0x64/0xb0 > [ 1261.262764] stmmac_release+0x58/0x2d4 [stmmac] > [ 1261.267425] __dev_close_many+0xac/0x14c > [ 1261.271458] dev_close_many+0x88/0x134 > [ 1261.275308] unregister_netdevice_many_notify+0x130/0x7d0 > [ 1261.280852] unregister_netdevice_queue+0xd4/0xdc > [ 1261.285682] unregister_netdev+0x24/0x38 > [ 1261.289715] stmmac_dvr_remove+0x80/0x150 [stmmac] > [ 1261.294636] devm_stmmac_pltfr_remove+0x24/0x48 [stmmac_platform] > [ 1261.300887] devm_action_release+0x14/0x20 > [ 1261.305090] devres_release_all+0xa0/0x100 > [ 1261.309293] device_unbind_cleanup+0x18/0x68 > [ 1261.313676] device_release_driver_internal+0x1f4/0x228 > [ 1261.319039] driver_detach+0x4c/0x98 > [ 1261.322708] bus_remove_driver+0x6c/0xbc > [ 1261.326739] driver_unregister+0x30/0x60 > [ 1261.330772] platform_driver_unregister+0x14/0x20 > [ 1261.335603] qcom_ethqos_driver_exit+0x18/0x1a8 [dwmac_qcom_ethqos] > [ 1261.342035] __arm64_sys_delete_module+0x19c/0x288 > [ 1261.346952] invoke_syscall+0x48/0x110 > [ 1261.350804] el0_svc_common.constprop.0+0xc4/0xe4 > [ 1261.355636] do_el0_svc+0x38/0x94 > [ 1261.359040] el0_svc+0x2c/0x84 > [ 1261.362178] el0t_64_sync_handler+0x120/0x12c > [ 1261.366646] el0t_64_sync+0x190/0x194 > [ 1261.370413] Code: d2802441 aa1403e0 f2fbd5a1 f9000462 (f9000043) > [ 1261.376661] ---[ end trace 0000000000000000 ]--- > Segmentation fault > Yep. This is a very deep problem and will be the same for any MAC reaching into another MAC's node to get its PHY's phandle. :( Bart
On Fri, Aug 11, 2023 at 02:00:21PM +0200, Bartosz Golaszewski wrote: > On Thu, Aug 10, 2023 at 10:13 PM Andrew Halaney <ahalaney@redhat.com> wrote: > > > > On Thu, Aug 10, 2023 at 10:09:00AM +0200, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > This series contains changes required to enable EMAC1 on sa8775p-ride. > > > This iteration no longer depends on any changes to the stmmac driver to > > > be functional. It turns out I was mistaken in thinking that the two > > > MACs' MDIO masters share the MDIO clock and data lines. In reality, only > > > one MAC is connected to an MDIO bus and it controlls PHYs for both MAC0 > > > and MAC1. The MDIO master on MAC1 is not connected to anything. > > > > > > > I've taken this for a quick (disconnected from network) spin, and things > > work as expected without having anything plugged in. > > > > I'm trying to get someone to plug it in so I can test that networking > > actually works, but the interesting bit is the phy/mdio bit here, and > > that's at least working ok I can tell. The rest is boilerplate similar > > to the other MAC instance which works fine. > > > > Removing the driver results in the following oops, but that's already > > discussed[0] and is independent of the devicetree description: > > > > I'd add a test tag but I want to wait for some network traffic tests > > before I do such. I wouldn't wait on picking it up just because of > > that though. I got it plugged in :) Things work as expected, throughput seems to be ~950 Mbps and latency is good. Thanks! Tested-by: Andrew Halaney <ahalaney@redhat.com> > > > > [0] https://lore.kernel.org/netdev/ZNKLjuxnR2+V3g1D@shell.armlinux.org.uk/ > > > > [root@dhcp19-243-28 ~]# modprobe -r dwmac_qcom_ethqos > > [ 1260.620402] qcom-ethqos 23040000.ethernet eth1: stmmac_dvr_remove: removing driver > > [ 1260.655724] qcom-ethqos 23040000.ethernet eth1: FPE workqueue stop > > [ 1261.034265] qcom-ethqos 23000000.ethernet eth0: stmmac_dvr_remove: removing driver > > [ 1261.042108] Unable to handle kernel paging request at virtual address dead000000000122 > > [ 1261.050379] Mem abort info: > > [ 1261.053251] ESR = 0x0000000096000044 > > [ 1261.057113] EC = 0x25: DABT (current EL), IL = 32 bits > > [ 1261.062573] SET = 0, FnV = 0 > > [ 1261.065712] EA = 0, S1PTW = 0 > > [ 1261.068946] FSC = 0x04: level 0 translation fault > > [ 1261.073956] Data abort info: > > [ 1261.076916] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 > > [ 1261.082552] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 > > [ 1261.087882] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 > > [ 1261.093338] [dead000000000122] address between user and kernel address ranges > > [ 1261.100667] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP > > [ 1261.107096] Modules linked in: r8152 rfkill marvell dwmac_qcom_ethqos(-) qcom_pon stmmac_platform crct10dif_ce stmmac spi_geni_qcom i2c_qcom_geni phy_qcom_qmp_usb phy_qcom_sgmii_eth phy_qcom_snps_femto_v2 pcs_xpcs qcom_wdt socinfo phy_qcom_qmp_pcie fuse ufs_qcom phy_qcom_qmp_ufs > > [ 1261.132407] CPU: 2 PID: 610 Comm: modprobe Not tainted 6.5.0-rc4-next-20230731-00008-g18ccccee8230 #7 > > [ 1261.141860] Hardware name: Qualcomm SA8775P Ride (DT) > > [ 1261.147042] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > > [ 1261.154185] pc : device_link_put_kref+0x44/0x110 > > [ 1261.158926] lr : device_link_put_kref+0xf4/0x110 > > [ 1261.163662] sp : ffff800082a938e0 > > [ 1261.167066] x29: ffff800082a938e0 x28: ffff6ec68bdc9d80 x27: 0000000000000000 > > [ 1261.174390] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 > > [ 1261.181714] x23: ffff800082a93b38 x22: ffff6ec68690f2d8 x21: ffff6ec6896aed30 > > [ 1261.189031] x20: ffff6ec68246b830 x19: ffff6ec68246b800 x18: 0000000000000006 > > [ 1261.196355] x17: ffff9259b7856000 x16: ffffdc7b42e3eaec x15: 725f7276645f6361 > > [ 1261.203679] x14: 0000000000000000 x13: 0000000000000002 x12: 0000000000000000 > > [ 1261.210996] x11: 0000000000000040 x10: ffffdc7b447de0b0 x9 : ffffdc7b447de0a8 > > [ 1261.218321] x8 : ffff6ec680400028 x7 : 0000000000000000 x6 : 0000000000000000 > > [ 1261.225645] x5 : ffff6ec680400000 x4 : 00000000c0000000 x3 : ffff6ec6896ae8b0 > > [ 1261.232963] x2 : dead000000000122 x1 : dead000000000122 x0 : ffff6ec68246b830 > > [ 1261.240287] Call trace: > > [ 1261.242806] device_link_put_kref+0x44/0x110 > > [ 1261.247190] device_link_del+0x30/0x48 > > [ 1261.251040] phy_detach+0x24/0x15c > > [ 1261.254530] phy_disconnect+0x44/0x5c > > [ 1261.258295] phylink_disconnect_phy+0x64/0xb0 > > [ 1261.262764] stmmac_release+0x58/0x2d4 [stmmac] > > [ 1261.267425] __dev_close_many+0xac/0x14c > > [ 1261.271458] dev_close_many+0x88/0x134 > > [ 1261.275308] unregister_netdevice_many_notify+0x130/0x7d0 > > [ 1261.280852] unregister_netdevice_queue+0xd4/0xdc > > [ 1261.285682] unregister_netdev+0x24/0x38 > > [ 1261.289715] stmmac_dvr_remove+0x80/0x150 [stmmac] > > [ 1261.294636] devm_stmmac_pltfr_remove+0x24/0x48 [stmmac_platform] > > [ 1261.300887] devm_action_release+0x14/0x20 > > [ 1261.305090] devres_release_all+0xa0/0x100 > > [ 1261.309293] device_unbind_cleanup+0x18/0x68 > > [ 1261.313676] device_release_driver_internal+0x1f4/0x228 > > [ 1261.319039] driver_detach+0x4c/0x98 > > [ 1261.322708] bus_remove_driver+0x6c/0xbc > > [ 1261.326739] driver_unregister+0x30/0x60 > > [ 1261.330772] platform_driver_unregister+0x14/0x20 > > [ 1261.335603] qcom_ethqos_driver_exit+0x18/0x1a8 [dwmac_qcom_ethqos] > > [ 1261.342035] __arm64_sys_delete_module+0x19c/0x288 > > [ 1261.346952] invoke_syscall+0x48/0x110 > > [ 1261.350804] el0_svc_common.constprop.0+0xc4/0xe4 > > [ 1261.355636] do_el0_svc+0x38/0x94 > > [ 1261.359040] el0_svc+0x2c/0x84 > > [ 1261.362178] el0t_64_sync_handler+0x120/0x12c > > [ 1261.366646] el0t_64_sync+0x190/0x194 > > [ 1261.370413] Code: d2802441 aa1403e0 f2fbd5a1 f9000462 (f9000043) > > [ 1261.376661] ---[ end trace 0000000000000000 ]--- > > Segmentation fault > > > > Yep. This is a very deep problem and will be the same for any MAC > reaching into another MAC's node to get its PHY's phandle. :( > > Bart >
On Thu, 10 Aug 2023 10:09:00 +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > This series contains changes required to enable EMAC1 on sa8775p-ride. > This iteration no longer depends on any changes to the stmmac driver to > be functional. It turns out I was mistaken in thinking that the two > MACs' MDIO masters share the MDIO clock and data lines. In reality, only > one MAC is connected to an MDIO bus and it controlls PHYs for both MAC0 > and MAC1. The MDIO master on MAC1 is not connected to anything. > > [...] Applied, thanks! [1/9] arm64: dts: qcom: sa8775p: add a node for the second serdes PHY commit: 31cd8caf0cbe191c0157c1581a8f0b82b891960d [2/9] arm64: dts: qcom: sa8775p: add a node for EMAC1 commit: e952348a7cc7b35883bdd43d73b8c9b296936547 [3/9] arm64: dts: qcom: sa8775p-ride: enable the second SerDes PHY commit: 6ca89cc6803b3895a0b2caba458dbece9b6ea52b [4/9] arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY commit: 5255901fb26efcb91eee1739aded174ff6c6443e [5/9] arm64: dts: qcom: sa8775p-ride: index the first SGMII PHY commit: 1e7ef41b5fa7de8de746a5d6cb7c96c409888c53 [6/9] arm64: dts: qcom: sa8775p-ride: add the second SGMII PHY commit: 1a00a068de4a657a2af53943d446b7b7199b5871 [7/9] arm64: dts: qcom: sa8775p-ride: sort aliases alphabetically commit: f8be0c50ce0e5bc38938fb1a7405288cf3fc96ac [8/9] arm64: dts: qcom: sa8775p-ride: add an alias for ethernet0 commit: fdc051e3926ee52b43f16dc3d6f35f40f8a5d3c3 [9/9] arm64: dts: qcom: sa8775p-ride: enable EMAC1 commit: 27eb552ef585c9852d1d04afde9fde34f8b69dc2 Best regards,