linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device
@ 2021-03-11  9:12 Meng.Li
  2021-03-11 13:24 ` Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Meng.Li @ 2021-03-11  9:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: broonie, tudor.ambarus, vigneshr, vadivel.muruganx.ramuthevar,
	linux-spi, meng.li

From: Meng Li <Meng.Li@windriver.com>

When initialize cadence qspi controller, it is need to set cqspi
to the driver_data field of struct device, because it will be
used in function cqspi_remove/suspend/resume(). Otherwise, there
will be a crash trace as below when invoking these finctions.
Call trace:
 cqspi_suspend+0x14/0x44
 dpm_run_callback+0x50/0x1c0
 __device_suspend+0x114/0x514
 ......
 el0_svc+0x20/0x30
 el0_sync_handler+0x1a4/0x1b0
 el0_sync+0x174/0x180

Fixes: 31fb632b5d43("spi: Move cadence-quadspi driver to drivers/spi/")
Cc: stable@vger.kernel.org
Signed-off-by: Meng Li <Meng.Li@windriver.com>
---
 drivers/spi/spi-cadence-quadspi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index ba7d40c2922f..d8b0e1f1cb3a 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1198,6 +1198,7 @@ static int cqspi_probe(struct platform_device *pdev)
 	cqspi = spi_master_get_devdata(master);
 
 	cqspi->pdev = pdev;
+	platform_set_drvdata(pdev, cqspi);
 
 	/* Obtain configuration from OF. */
 	ret = cqspi_of_get_pdata(cqspi);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device
  2021-03-11  9:12 [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device Meng.Li
@ 2021-03-11 13:24 ` Mark Brown
  2021-03-11 13:26 ` Mark Brown
  2021-03-11 16:18 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-03-11 13:24 UTC (permalink / raw)
  To: Meng.Li
  Cc: linux-kernel, tudor.ambarus, vigneshr,
	vadivel.muruganx.ramuthevar, linux-spi

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

On Thu, Mar 11, 2021 at 05:12:20PM +0800, Meng.Li@windriver.com wrote:
> From: Meng Li <Meng.Li@windriver.com>
> 
> When initialize cadence qspi controller, it is need to set cqspi
> to the driver_data field of struct device, because it will be
> used in function cqspi_remove/suspend/resume(). Otherwise, there
> will be a crash trace as below when invoking these finctions.
> Call trace:
>  cqspi_suspend+0x14/0x44
>  dpm_run_callback+0x50/0x1c0
>  __device_suspend+0x114/0x514

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device
  2021-03-11  9:12 [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device Meng.Li
  2021-03-11 13:24 ` Mark Brown
@ 2021-03-11 13:26 ` Mark Brown
  2021-03-11 14:05   ` Li, Meng
  2021-03-11 16:18 ` Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2021-03-11 13:26 UTC (permalink / raw)
  To: Meng.Li
  Cc: linux-kernel, tudor.ambarus, vigneshr,
	vadivel.muruganx.ramuthevar, linux-spi

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

On Thu, Mar 11, 2021 at 05:12:20PM +0800, Meng.Li@windriver.com wrote:

> Fixes: 31fb632b5d43("spi: Move cadence-quadspi driver to drivers/spi/")

Commit: 5e838bc8035a ("spi: cadence: set cqspi to the driver_data field of struct device")
	Fixes tag: Fixes: 31fb632b5d43("spi: Move cadence-quadspi driver to drivers/spi/")
	Has these problem(s):
		- missing space between the SHA1 and the subject


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device
  2021-03-11 13:26 ` Mark Brown
@ 2021-03-11 14:05   ` Li, Meng
  2021-03-11 15:42     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Li, Meng @ 2021-03-11 14:05 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, tudor.ambarus, vigneshr,
	vadivel.muruganx.ramuthevar, linux-spi

Thanks for reminding me these issues, and I will pay attention that when I submit patch next time.
Do I need to submit v2 patch to fix this issue?

Thanks,
Limeng

> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Thursday, March 11, 2021 9:26 PM
> To: Li, Meng <Meng.Li@windriver.com>
> Cc: linux-kernel@vger.kernel.org; tudor.ambarus@microchip.com;
> vigneshr@ti.com; vadivel.muruganx.ramuthevar@linux.intel.com; linux-
> spi@vger.kernel.org
> Subject: Re: [PATCH] drivers: spi: cadence: set cqspi to the driver_data field
> of struct device
> 
> On Thu, Mar 11, 2021 at 05:12:20PM +0800, Meng.Li@windriver.com wrote:
> 
> > Fixes: 31fb632b5d43("spi: Move cadence-quadspi driver to drivers/spi/")
> 
> Commit: 5e838bc8035a ("spi: cadence: set cqspi to the driver_data field of
> struct device")
> 	Fixes tag: Fixes: 31fb632b5d43("spi: Move cadence-quadspi driver to
> drivers/spi/")
> 	Has these problem(s):
> 		- missing space between the SHA1 and the subject


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device
  2021-03-11 14:05   ` Li, Meng
@ 2021-03-11 15:42     ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-03-11 15:42 UTC (permalink / raw)
  To: Li, Meng
  Cc: linux-kernel, tudor.ambarus, vigneshr,
	vadivel.muruganx.ramuthevar, linux-spi

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

On Thu, Mar 11, 2021 at 02:05:18PM +0000, Li, Meng wrote:
> Thanks for reminding me these issues, and I will pay attention that when I submit patch next time.
> Do I need to submit v2 patch to fix this issue?

No.

Please don't top post, reply in line with needed context.  This allows
readers to readily follow the flow of conversation and understand what
you are talking about and also helps ensure that everything in the
discussion is being addressed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device
  2021-03-11  9:12 [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device Meng.Li
  2021-03-11 13:24 ` Mark Brown
  2021-03-11 13:26 ` Mark Brown
@ 2021-03-11 16:18 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-03-11 16:18 UTC (permalink / raw)
  To: Meng.Li, linux-kernel
  Cc: vadivel.muruganx.ramuthevar, linux-spi, meng.li, vigneshr, tudor.ambarus

On Thu, 11 Mar 2021 17:12:20 +0800, Meng.Li@windriver.com wrote:
> When initialize cadence qspi controller, it is need to set cqspi
> to the driver_data field of struct device, because it will be
> used in function cqspi_remove/suspend/resume(). Otherwise, there
> will be a crash trace as below when invoking these finctions.
> Call trace:
>  cqspi_suspend+0x14/0x44
>  dpm_run_callback+0x50/0x1c0
>  __device_suspend+0x114/0x514
>  ......
>  el0_svc+0x20/0x30
>  el0_sync_handler+0x1a4/0x1b0
>  el0_sync+0x174/0x180

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] drivers: spi: cadence: set cqspi to the driver_data field of struct device
      commit: ea94191e584b146878f0b7fd4b767500d7aae870

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-11 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11  9:12 [PATCH] drivers: spi: cadence: set cqspi to the driver_data field of struct device Meng.Li
2021-03-11 13:24 ` Mark Brown
2021-03-11 13:26 ` Mark Brown
2021-03-11 14:05   ` Li, Meng
2021-03-11 15:42     ` Mark Brown
2021-03-11 16:18 ` Mark Brown

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).