All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ricoh_mmc: Use suspend_late/resume_early
@ 2009-01-18 19:11 philipl
  2009-01-24 17:57 ` Pierre Ossman
  0 siblings, 1 reply; 5+ messages in thread
From: philipl @ 2009-01-18 19:11 UTC (permalink / raw)
  To: linux kernel, sdhci-devel, Pierre Ossman; +Cc: rjw

If ricoh_mmc suspends before sdhci_pci, it will pull the card
out from under the controller, which could leave the system in
a very confused state.

Using suspend_late/resume_early ensures that sdhci_pci suspends first
and resumes second.

Signed-off-by: Philip Langdale <philipl@overt.org>
---

 ricoh_mmc.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c
index be9e7b3..f627905 100644
--- a/drivers/mmc/host/ricoh_mmc.c
+++ b/drivers/mmc/host/ricoh_mmc.c
@@ -196,7 +196,7 @@ static void __devexit ricoh_mmc_remove(struct pci_dev *pdev)
 	pci_set_drvdata(pdev, NULL);
 }

-static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state)
+static int ricoh_mmc_suspend_late(struct pci_dev *pdev, pm_message_t state)
 {
 	struct pci_dev *fw_dev = NULL;

@@ -210,7 +210,7 @@ static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state)
 	return 0;
 }

-static int ricoh_mmc_resume(struct pci_dev *pdev)
+static int ricoh_mmc_resume_early(struct pci_dev *pdev)
 {
 	struct pci_dev *fw_dev = NULL;

@@ -229,8 +229,8 @@ static struct pci_driver ricoh_mmc_driver = {
 	.id_table =	pci_ids,
 	.probe = 	ricoh_mmc_probe,
 	.remove =	__devexit_p(ricoh_mmc_remove),
-	.suspend =	ricoh_mmc_suspend,
-	.resume =	ricoh_mmc_resume,
+	.suspend_late =	ricoh_mmc_suspend_late,
+	.resume_early =	ricoh_mmc_resume_early,
 };

 /*****************************************************************************\

Based on comments from Rafael, I'm resending this patch using suspend_late and
resume_early instead.


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

* Re: [PATCH] ricoh_mmc: Use suspend_late/resume_early
  2009-01-18 19:11 [PATCH] ricoh_mmc: Use suspend_late/resume_early philipl
@ 2009-01-24 17:57 ` Pierre Ossman
  2009-01-24 20:40   ` Philip Langdale
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre Ossman @ 2009-01-24 17:57 UTC (permalink / raw)
  To: philipl, rjw; +Cc: linux kernel, sdhci-devel

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

On Sun, 18 Jan 2009 14:11:20 -0500 (EST)
philipl@overt.org wrote:

> If ricoh_mmc suspends before sdhci_pci, it will pull the card
> out from under the controller, which could leave the system in
> a very confused state.
> 
> Using suspend_late/resume_early ensures that sdhci_pci suspends first
> and resumes second.
> 
> Signed-off-by: Philip Langdale <philipl@overt.org>
> ---

What's the plan here? Apply for .29?

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

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

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

* Re: [PATCH] ricoh_mmc: Use suspend_late/resume_early
  2009-01-24 17:57 ` Pierre Ossman
@ 2009-01-24 20:40   ` Philip Langdale
  2009-01-24 20:55     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Langdale @ 2009-01-24 20:40 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: rjw, linux kernel, sdhci-devel

Pierre Ossman wrote:
> On Sun, 18 Jan 2009 14:11:20 -0500 (EST)
> philipl@overt.org wrote:
> 
>> If ricoh_mmc suspends before sdhci_pci, it will pull the card
>> out from under the controller, which could leave the system in
>> a very confused state.
>>
>> Using suspend_late/resume_early ensures that sdhci_pci suspends first
>> and resumes second.
>>
>> Signed-off-by: Philip Langdale <philipl@overt.org>
>> ---
> 
> What's the plan here? Apply for .29?

That's what I'd recommend - we are seeing reports of problems that
would be fixed by this.

eg: http://lkml.org/lkml/2009/1/21/241

--phil

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

* Re: [PATCH] ricoh_mmc: Use suspend_late/resume_early
  2009-01-24 20:40   ` Philip Langdale
@ 2009-01-24 20:55     ` Rafael J. Wysocki
  2009-01-24 21:11       ` Pierre Ossman
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2009-01-24 20:55 UTC (permalink / raw)
  To: Philip Langdale; +Cc: Pierre Ossman, linux kernel, sdhci-devel

On Saturday 24 January 2009, Philip Langdale wrote:
> Pierre Ossman wrote:
> > On Sun, 18 Jan 2009 14:11:20 -0500 (EST)
> > philipl@overt.org wrote:
> > 
> >> If ricoh_mmc suspends before sdhci_pci, it will pull the card
> >> out from under the controller, which could leave the system in
> >> a very confused state.
> >>
> >> Using suspend_late/resume_early ensures that sdhci_pci suspends first
> >> and resumes second.
> >>
> >> Signed-off-by: Philip Langdale <philipl@overt.org>
> >> ---
> > 
> > What's the plan here? Apply for .29?
> 
> That's what I'd recommend - we are seeing reports of problems that
> would be fixed by this.
> 
> eg: http://lkml.org/lkml/2009/1/21/241

Agreed.

Thanks,
Rafael

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

* Re: [PATCH] ricoh_mmc: Use suspend_late/resume_early
  2009-01-24 20:55     ` Rafael J. Wysocki
@ 2009-01-24 21:11       ` Pierre Ossman
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre Ossman @ 2009-01-24 21:11 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Philip Langdale, linux kernel, sdhci-devel

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

On Sat, 24 Jan 2009 21:55:01 +0100
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> On Saturday 24 January 2009, Philip Langdale wrote:
> > Pierre Ossman wrote:
> > > 
> > > What's the plan here? Apply for .29?
> > 
> > That's what I'd recommend - we are seeing reports of problems that
> > would be fixed by this.
> > 
> > eg: http://lkml.org/lkml/2009/1/21/241
> 
> Agreed.
> 

Queueing it up then.

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

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

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

end of thread, other threads:[~2009-01-25  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-18 19:11 [PATCH] ricoh_mmc: Use suspend_late/resume_early philipl
2009-01-24 17:57 ` Pierre Ossman
2009-01-24 20:40   ` Philip Langdale
2009-01-24 20:55     ` Rafael J. Wysocki
2009-01-24 21:11       ` Pierre Ossman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.