From: Jacob Keller <jacob.e.keller@intel.com>
To: Clark Wang <xiaoning.wang@nxp.com>,
<alexandre.torgue@foss.st.com>, <joabreu@synopsys.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <mcoquelin.stm32@gmail.com>,
<bartosz.golaszewski@linaro.org>
Cc: <netdev@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: stmmac: platform: fix the incorrect parameter
Date: Thu, 21 Sep 2023 13:25:16 -0700 [thread overview]
Message-ID: <873f07e6-cc99-1901-4d09-db77994d88db@intel.com> (raw)
In-Reply-To: <20230921062443.1251292-1-xiaoning.wang@nxp.com>
On 9/20/2023 11:24 PM, Clark Wang wrote:
> The second parameter of stmmac_pltfr_init() needs the pointer of
> "struct plat_stmmacenet_data". So, correct the parameter typo when calling the
> function.
>
> Otherwise, it may cause this alignment exception when doing suspend/resume.
> [ 49.067201] CPU1 is up
> [ 49.135258] Internal error: SP/PC alignment exception: 000000008a000000 [#1] PREEMPT SMP
> [ 49.143346] Modules linked in: soc_imx9 crct10dif_ce polyval_ce nvmem_imx_ocotp_fsb_s400 polyval_generic layerscape_edac_mod snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_imx_card snd_soc_wm8962 el_enclave snd_soc_fsl_micfil rtc_pcf2127 rtc_pcf2131 flexcan can_dev snd_soc_fsl_xcvr snd_soc_fsl_sai imx8_media_dev(C) snd_soc_fsl_utils fuse
> [ 49.173393] CPU: 0 PID: 565 Comm: sh Tainted: G C 6.5.0-rc4-next-20230804-05047-g5781a6249dae #677
> [ 49.183721] Hardware name: NXP i.MX93 11X11 EVK board (DT)
> [ 49.189190] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [ 49.196140] pc : 0x80800052
> [ 49.198931] lr : stmmac_pltfr_resume+0x34/0x50
> [ 49.203368] sp : ffff800082f8bab0
> [ 49.206670] x29: ffff800082f8bab0 x28: ffff0000047d0ec0 x27: ffff80008186c170
> [ 49.213794] x26: 0000000b5e4ff1ba x25: ffff800081e5fa74 x24: 0000000000000010
> [ 49.220918] x23: ffff800081fe0000 x22: 0000000000000000 x21: 0000000000000000
> [ 49.228042] x20: ffff0000001b4010 x19: ffff0000001b4010 x18: 0000000000000006
> [ 49.235166] x17: ffff7ffffe007000 x16: ffff800080000000 x15: 0000000000000000
> [ 49.242290] x14: 00000000000000fc x13: 0000000000000000 x12: 0000000000000000
> [ 49.249414] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff800082f8b8c0
> [ 49.256538] x8 : 0000000000000008 x7 : 0000000000000001 x6 : 000000005f54a200
> [ 49.263662] x5 : 0000000001000000 x4 : ffff800081b93680 x3 : ffff800081519be0
> [ 49.270786] x2 : 0000000080800052 x1 : 0000000000000000 x0 : ffff0000001b4000
> [ 49.277911] Call trace:
> [ 49.280346] 0x80800052
> [ 49.282781] platform_pm_resume+0x2c/0x68
> [ 49.286785] dpm_run_callback.constprop.0+0x74/0x134
> [ 49.291742] device_resume+0x88/0x194
> [ 49.295391] dpm_resume+0x10c/0x230
> [ 49.298866] dpm_resume_end+0x18/0x30
> [ 49.302515] suspend_devices_and_enter+0x2b8/0x624
> [ 49.307299] pm_suspend+0x1fc/0x348
> [ 49.310774] state_store+0x80/0x104
> [ 49.314258] kobj_attr_store+0x18/0x2c
> [ 49.318002] sysfs_kf_write+0x44/0x54
> [ 49.321659] kernfs_fop_write_iter+0x120/0x1ec
> [ 49.326088] vfs_write+0x1bc/0x300
> [ 49.329485] ksys_write+0x70/0x104
> [ 49.332874] __arm64_sys_write+0x1c/0x28
> [ 49.336783] invoke_syscall+0x48/0x114
> [ 49.340527] el0_svc_common.constprop.0+0xc4/0xe4
> [ 49.345224] do_el0_svc+0x38/0x98
> [ 49.348526] el0_svc+0x2c/0x84
> [ 49.351568] el0t_64_sync_handler+0x100/0x12c
> [ 49.355910] el0t_64_sync+0x190/0x194
> [ 49.359567] Code: ???????? ???????? ???????? ???????? (????????)
> [ 49.365644] ---[ end trace 0000000000000000 ]---
>
> Fixes: 97117eb51ec8 ("net: stmmac: platform: provide stmmac_pltfr_init()")
> Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
> ---> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index 0d9b2138b60a..3c6fd9027934 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -900,7 +900,7 @@ static int __maybe_unused stmmac_pltfr_resume(struct device *dev)
> struct platform_device *pdev = to_platform_device(dev);
> int ret;
>
> - ret = stmmac_pltfr_init(pdev, priv->plat->bsp_priv);
> + ret = stmmac_pltfr_init(pdev, priv->plat);
> if (ret)
And this compiled because priv->plat->bsp_priv is a void pointer.
Makes sense.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> return ret;
>
next prev parent reply other threads:[~2023-09-21 20:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 6:24 Clark Wang
2023-09-21 20:25 ` Jacob Keller [this message]
2023-09-26 11:43 ` Serge Semin
2023-10-01 13:00 ` patchwork-bot+netdevbpf
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=873f07e6-cc99-1901-4d09-db77994d88db@intel.com \
--to=jacob.e.keller@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiaoning.wang@nxp.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
all inboxes | Powered by JetHome®