* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
@ 2009-10-22 22:36 Antonio Ospite
2009-10-22 22:48 ` Eric Miao
2009-10-22 22:57 ` Russell King - ARM Linux
0 siblings, 2 replies; 9+ messages in thread
From: Antonio Ospite @ 2009-10-22 22:36 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I get this warning on shutdown. How to fix it properly?
FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
this patch:
http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
WARNING: at drivers/base/core.c:124 device_release+0x68/0x7c()
Device 'pxa2xx-mci.0' does not have a release() function, it is broken and must be fixed.
Modules linked in: bridge stp llc ipv6
[<c002fd44>] (unwind_backtrace+0x0/0xe0) from [<c004399c>] (warn_slowpath_common+0x4c/0x68)
[<c004399c>] (warn_slowpath_common+0x4c/0x68) from [<c00439f4>] (warn_slowpath_fmt+0x28/0x38)
[<c00439f4>] (warn_slowpath_fmt+0x28/0x38) from [<c01717c4>] (device_release+0x68/0x7c)
[<c01717c4>] (device_release+0x68/0x7c) from [<c0134a38>] (kobject_release+0x5c/0x74)
[<c0134a38>] (kobject_release+0x5c/0x74) from [<c0135778>] (kref_put+0x68/0x7c)
[<c0135778>] (kref_put+0x68/0x7c) from [<c029b47c>] (klist_next+0xa8/0xb4)
[<c029b47c>] (klist_next+0xa8/0xb4) from [<c0170674>] (next_device+0xc/0x1c)
[<c0170674>] (next_device+0xc/0x1c) from [<c01706c8>] (device_for_each_child+0x44/0x6c)
[<c01706c8>] (device_for_each_child+0x44/0x6c) from [<c0183308>] (spi_unregister_master+0x18/0x28)
[<c0183308>] (spi_unregister_master+0x18/0x28) from [<c0183f48>] (pxa2xx_spi_remove+0xd4/0xf0)
[<c0183f48>] (pxa2xx_spi_remove+0xd4/0xf0) from [<c01845ac>] (pxa2xx_spi_shutdown+0x10/0x48)
[<c01845ac>] (pxa2xx_spi_shutdown+0x10/0x48) from [<c01749b4>] (platform_drv_shutdown+0x1c/0x24)
[<c01749b4>] (platform_drv_shutdown+0x1c/0x24) from [<c0170410>] (device_shutdown+0x5c/0xbc)
[<c0170410>] (device_shutdown+0x5c/0xbc) from [<c00525cc>] (kernel_power_off+0x10/0x44)
[<c00525cc>] (kernel_power_off+0x10/0x44) from [<c0053844>] (sys_reboot+0x118/0x1d8)
[<c0053844>] (sys_reboot+0x118/0x1d8) from [<c0029f20>] (ret_fast_syscall+0x0/0x34)
Thanks,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091023/67e4583e/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-22 22:36 [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function Antonio Ospite
@ 2009-10-22 22:48 ` Eric Miao
2009-10-22 22:57 ` Russell King - ARM Linux
1 sibling, 0 replies; 9+ messages in thread
From: Eric Miao @ 2009-10-22 22:48 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 23, 2009 at 6:36 AM, Antonio Ospite
<ospite@studenti.unina.it> wrote:
> Hi,
>
> I get this warning on shutdown. How to fix it properly?
>
This is weird, as if pxa2xx_set_spi_info() is used, the pxa2xx-spi device
is actually created by platform_device_alloc(), which has a default
release function of "platform_device_release()".
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-22 22:36 [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function Antonio Ospite
2009-10-22 22:48 ` Eric Miao
@ 2009-10-22 22:57 ` Russell King - ARM Linux
2009-10-23 9:50 ` Antonio Ospite
1 sibling, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2009-10-22 22:57 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> Hi,
>
> I get this warning on shutdown. How to fix it properly?
>
> FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> this patch:
> http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
This sounds like it's the cause of the problem - from the backtrace, it
looks like SPI expects the children of the SPI device to be its own
responsibility to maintain.
Hence, because you've made pxamci a child of SPI, SPI is trying to
unregister and release the pxamci device.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-22 22:57 ` Russell King - ARM Linux
@ 2009-10-23 9:50 ` Antonio Ospite
2009-10-23 10:18 ` Russell King - ARM Linux
0 siblings, 1 reply; 9+ messages in thread
From: Antonio Ospite @ 2009-10-23 9:50 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 22 Oct 2009 23:57:58 +0100
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> > Hi,
> >
> > I get this warning on shutdown. How to fix it properly?
> >
> > FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> > this patch:
> > http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
>
> This sounds like it's the cause of the problem - from the backtrace, it
> looks like SPI expects the children of the SPI device to be its own
> responsibility to maintain.
>
> Hence, because you've made pxamci a child of SPI, SPI is trying to
> unregister and release the pxamci device.
A little more background: we need pxamci to be a child of SPI because
our PMIC is connected via SPI, and a PMIC regulator is used for mmc
powering; enforcing this hierarchy is needed to make pxamci suspend and
resume properly.
The board init does:
spi_pd = platform_device_alloc("pxa2xx-spi", 1);
spi_pd->dev.platform_data = &ezx_spi_masterinfo;
platform_device_add(spi_pd);
spi_register_board_info(ARRAY_AND_SIZE(a780_spi_boardinfo));
pxa_set_mci_parent(&spi_pd->dev);
pxa_set_mci_info(&ezx_mci_platform_data);
Now, do you suggest to adapt pxamci so it supports the case when
another driver wants to release it? I am not sure how to do that, tho.
Thanks,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091023/6e44a83b/attachment-0001.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-23 9:50 ` Antonio Ospite
@ 2009-10-23 10:18 ` Russell King - ARM Linux
2009-10-26 16:58 ` Greg KH
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2009-10-23 10:18 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
> On Thu, 22 Oct 2009 23:57:58 +0100
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
>
> > On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> > > Hi,
> > >
> > > I get this warning on shutdown. How to fix it properly?
> > >
> > > FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> > > this patch:
> > > http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
> >
> > This sounds like it's the cause of the problem - from the backtrace, it
> > looks like SPI expects the children of the SPI device to be its own
> > responsibility to maintain.
> >
> > Hence, because you've made pxamci a child of SPI, SPI is trying to
> > unregister and release the pxamci device.
>
> A little more background: we need pxamci to be a child of SPI because
> our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> powering; enforcing this hierarchy is needed to make pxamci suspend and
> resume properly.
I don't think this is the right solution - and I don't know what the
right solution would be given that the interfaces I suspect you need
aren't public.
I don't think you can reverse the order of SPI and MMC initialization
because that'd mean MMC could try to use SPI before it exists.
Maybe the right answer is for SPI to stop thinking it owns all child
devices, and only unregister devices which it owns (iow, are of some
SPI bus-type.)
Adding Greg for comment.
> The board init does:
> spi_pd = platform_device_alloc("pxa2xx-spi", 1);
> spi_pd->dev.platform_data = &ezx_spi_masterinfo;
> platform_device_add(spi_pd);
> spi_register_board_info(ARRAY_AND_SIZE(a780_spi_boardinfo));
>
> pxa_set_mci_parent(&spi_pd->dev);
> pxa_set_mci_info(&ezx_mci_platform_data);
>
> Now, do you suggest to adapt pxamci so it supports the case when
> another driver wants to release it? I am not sure how to do that, tho.
Definitely not.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-23 10:18 ` Russell King - ARM Linux
@ 2009-10-26 16:58 ` Greg KH
2009-10-26 18:48 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2009-10-26 16:58 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 23, 2009 at 11:18:06AM +0100, Russell King - ARM Linux wrote:
> On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
> > On Thu, 22 Oct 2009 23:57:58 +0100
> > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> >
> > > On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> > > > Hi,
> > > >
> > > > I get this warning on shutdown. How to fix it properly?
> > > >
> > > > FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> > > > this patch:
> > > > http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
> > >
> > > This sounds like it's the cause of the problem - from the backtrace, it
> > > looks like SPI expects the children of the SPI device to be its own
> > > responsibility to maintain.
> > >
> > > Hence, because you've made pxamci a child of SPI, SPI is trying to
> > > unregister and release the pxamci device.
> >
> > A little more background: we need pxamci to be a child of SPI because
> > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > resume properly.
>
> I don't think this is the right solution - and I don't know what the
> right solution would be given that the interfaces I suspect you need
> aren't public.
>
> I don't think you can reverse the order of SPI and MMC initialization
> because that'd mean MMC could try to use SPI before it exists.
>
> Maybe the right answer is for SPI to stop thinking it owns all child
> devices, and only unregister devices which it owns (iow, are of some
> SPI bus-type.)
>
> Adding Greg for comment.
Um, why not ask the SPI maintainer? I don't know what the SPI code is
doing, sorry.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-26 16:58 ` Greg KH
@ 2009-10-26 18:48 ` Mark Brown
2009-10-26 18:52 ` Greg KH
2009-10-26 19:22 ` Antonio Ospite
0 siblings, 2 replies; 9+ messages in thread
From: Mark Brown @ 2009-10-26 18:48 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Oct 26, 2009 at 09:58:52AM -0700, Greg KH wrote:
> On Fri, Oct 23, 2009 at 11:18:06AM +0100, Russell King - ARM Linux wrote:
> > On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
> > > A little more background: we need pxamci to be a child of SPI because
> > > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > > resume properly.
> > I don't think this is the right solution - and I don't know what the
> > right solution would be given that the interfaces I suspect you need
> > aren't public.
> Um, why not ask the SPI maintainer? I don't know what the SPI code is
> doing, sorry.
It's not specific to SPI - the problem is the need to express ordering
constraints in suspend/resume that go beyond what the device tree gives.
I believe that the pm_link stuff in -next is what's needed here? I was
planning to look at this within the regulator API before the next merge
window so that I can hopefully have something ready for -next after that
(or possibly even get it in in the same merge window if the cross tree
issues aren't too painful).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-26 18:48 ` Mark Brown
@ 2009-10-26 18:52 ` Greg KH
2009-10-26 19:22 ` Antonio Ospite
1 sibling, 0 replies; 9+ messages in thread
From: Greg KH @ 2009-10-26 18:52 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Oct 26, 2009 at 06:48:15PM +0000, Mark Brown wrote:
> On Mon, Oct 26, 2009 at 09:58:52AM -0700, Greg KH wrote:
> > On Fri, Oct 23, 2009 at 11:18:06AM +0100, Russell King - ARM Linux wrote:
> > > On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
>
> > > > A little more background: we need pxamci to be a child of SPI because
> > > > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > > > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > > > resume properly.
>
> > > I don't think this is the right solution - and I don't know what the
> > > right solution would be given that the interfaces I suspect you need
> > > aren't public.
>
> > Um, why not ask the SPI maintainer? I don't know what the SPI code is
> > doing, sorry.
>
> It's not specific to SPI - the problem is the need to express ordering
> constraints in suspend/resume that go beyond what the device tree gives.
>
> I believe that the pm_link stuff in -next is what's needed here? I was
> planning to look at this within the regulator API before the next merge
> window so that I can hopefully have something ready for -next after that
> (or possibly even get it in in the same merge window if the cross tree
> issues aren't too painful).
Yes, talk to Rafael about that stuff, he's responsible for it :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.
2009-10-26 18:48 ` Mark Brown
2009-10-26 18:52 ` Greg KH
@ 2009-10-26 19:22 ` Antonio Ospite
1 sibling, 0 replies; 9+ messages in thread
From: Antonio Ospite @ 2009-10-26 19:22 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 26 Oct 2009 18:48:15 +0000
Mark Brown <broonie@sirena.org.uk> wrote:
> > > On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
>
> > > > A little more background: we need pxamci to be a child of SPI because
> > > > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > > > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > > > resume properly.
>
...
> I believe that the pm_link stuff in -next is what's needed here? I was
> planning to look at this within the regulator API before the next merge
> window so that I can hopefully have something ready for -next after that
> (or possibly even get it in in the same merge window if the cross tree
> issues aren't too painful).
Ah, good to know that there is a proper solution coming.
Thanks,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091026/8e5d9046/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-10-26 19:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 22:36 [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function Antonio Ospite
2009-10-22 22:48 ` Eric Miao
2009-10-22 22:57 ` Russell King - ARM Linux
2009-10-23 9:50 ` Antonio Ospite
2009-10-23 10:18 ` Russell King - ARM Linux
2009-10-26 16:58 ` Greg KH
2009-10-26 18:48 ` Mark Brown
2009-10-26 18:52 ` Greg KH
2009-10-26 19:22 ` Antonio Ospite
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).