Skip to contentSkip to conversation

mmc: sdhci-s3c: Remove old and misprototyped suspend operations

PATCH In review Mark Brown 4 participants 9 messages Nov 21, 2011 – Dec 26, 2011

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mmc: sdhci-s3c: Remove old and misprototyped suspend operations

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

---
 drivers/mmc/host/sdhci-s3c.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-s3c.c +0 -2
index 4cb272c..9a20d1f 100644
@@ -647,8 +647,6 @@ static const struct dev_pm_ops sdhci_s3c_pmops = {
 static struct platform_driver sdhci_s3c_driver = {
 	.probe		= sdhci_s3c_probe,
 	.remove		= __devexit_p(sdhci_s3c_remove),
-	.suspend	= sdhci_s3c_suspend,
-	.resume	        = sdhci_s3c_resume,
 	.driver		= {
 		.owner	= THIS_MODULE,
 		.name	= "s3c-sdhci",
Signature · 1 line
1.7.7.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 23 lines · Mark Brown

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

---
 drivers/mmc/host/sdhci-s3c.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-s3c.c +0 -2
index 4cb272c..9a20d1f 100644
@@ -647,8 +647,6 @@ static const struct dev_pm_ops sdhci_s3c_pmops = {
 static struct platform_driver sdhci_s3c_driver = {
 	.probe		= sdhci_s3c_probe,
 	.remove		= __devexit_p(sdhci_s3c_remove),
-	.suspend	= sdhci_s3c_suspend,
-	.resume	        = sdhci_s3c_resume,
 	.driver		= {
 		.owner	= THIS_MODULE,
 		.name	= "s3c-sdhci",
#2 lore raw

Hi,

Quoted 14 lines · Jaehoon Chung
Quoted 10 lines · Mark Brown

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

---
 drivers/mmc/host/sdhci-s3c.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Quoted 13 lines

drivers/mmc/host/sdhci-s3c.c static const struct dev_pm_ops sdhci_s3c_pmops = { · line 652

Quoted 13 lines
drivers/mmc/host/sdhci-s3c.c +0 -2
index 4cb272c..9a20d1f 100644
@@ -647,8 +647,6 @@ static const struct dev_pm_ops sdhci_s3c_pmops = {
 static struct platform_driver sdhci_s3c_driver = {
 	.probe		= sdhci_s3c_probe,
 	.remove		= __devexit_p(sdhci_s3c_remove),
-	.suspend	= sdhci_s3c_suspend,
-	.resume	        = sdhci_s3c_resume,
 	.driver		= {
 		.owner	= THIS_MODULE,
 		.name	= "s3c-sdhci",

Thanks, pushed to mmc-next for 3.2 with Jaehoon's ACK.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#3 lore raw

Hi,

Quoted 14 lines · Chris Ball <cjb <at> laptop.org> writes:

Hi,

Quoted 10 lines · Jaehoon Chung
Acked-by Jaehoon Chung <jh80.chung <at> samsung.com>
Quoted 6 lines · Mark Brown

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

Signed-off-by Mark Brown <broonie <at> opensource.wolfsonmicro.com>

On Origen board (based on EXYNOS4210), the primary filesystem is on a SD/MMC card. When tested with v3.2-rc6 kernel, the system doesn't resume properly.

After resume, it keeps printing following message and the filesystem never comes up.

mmc0: Timeout waiting for hardware interrupt.

If this patch is reverted, the system is able to mount the filesystem successfully.

Am I missing something?

#4 lore raw

Hi,

Quoted 14 lines · Tushar Behera
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

Signed-off-by Mark Brown <broonie <at> opensource.wolfsonmicro.com>

On Origen board (based on EXYNOS4210), the primary filesystem is on a SD/MMC card. When tested with v3.2-rc6 kernel, the system doesn't resume properly.

After resume, it keeps printing following message and the filesystem never comes up.

Quoted 6 lines

mmc0: Timeout waiting for hardware interrupt.

If this patch is reverted, the system is able to mount the filesystem successfully.

Am I missing something?

Mark/Jaehoon? This looks very bad.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
maintainer
#5 lore raw

Hi Tushar.

I also tested this patch with Samsung-SoC.
But i didn't find the below message
"mmc0: Timeout waiting for hardware interrupt."

I didn't understand what is that differ with previously code? (just using dev_pm_ops..)

Thanks,
Jaehoon Chung

Quoted 28 lines · Chris Ball

Hi,

Quoted 14 lines · Tushar Behera
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

Signed-off-by Mark Brown <broonie <at> opensource.wolfsonmicro.com>

On Origen board (based on EXYNOS4210), the primary filesystem is on a SD/MMC card. When tested with v3.2-rc6 kernel, the system doesn't resume properly.

After resume, it keeps printing following message and the filesystem never comes up.

Quoted 6 lines

mmc0: Timeout waiting for hardware interrupt.

If this patch is reverted, the system is able to mount the filesystem successfully.

Am I missing something?

Mark/Jaehoon? This looks very bad.

- Chris.

#6 lore raw

Hi Jaehoon,

Quoted 6 lines · Jaehoon Chung

Hi Tushar.

I also tested this patch with Samsung-SoC.
But i didn't find the below message
"mmc0: Timeout waiting for hardware interrupt."

When the primary filesystem is on SD/MMC card, I need to select following config options for the system to go to sleep. Is it in anyway the reason of conflict?

CONFIG_MMC_UNSAFE_RESUME=y

I modified my test-case to use a ramdisk instead and use a script to mount/unmount the filesystem on MMC card. In that case also I get the above error for some time - around 30s. After that, it behaves normally (mounting/unmounting etc.)

$ echo mem > /sys/power/state
[   18.825000] PM: Syncing filesystems ... done.
[   18.830000] Freezing user space processes ... (elapsed 0.00 seconds) done.
[   18.835000] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[   18.855000] Suspending console(s) (use no_console_suspend to debug)
[   18.865000] wake enabled for irq 292
[   18.865000] wake enabled for irq 301
[   18.865000] wake enabled for irq 302
[   18.865000] wake enabled for irq 303
[   18.865000] wake enabled for irq 304
[   18.865000] wake enabled for irq 305
[   18.890000] PM: suspend of devices complete after 26.491 msecs
[   18.890000] PM: late suspend of devices complete after 0.829 msecs
[   18.890000] Disabling non-boot CPUs ...
[   18.895000] IRQ80 no longer affine to CPU1
[   18.895000] CPU1: shutdown
[   18.895000] Enabling non-boot CPUs ...
[   18.905000] CPU1: Booted secondary processor
[   18.905000] Calibrating delay loop (skipped) already calibrated this CPU
[   18.905000] CPU1: Unknown IPI message 0x1
[   18.905000] CPU1 is up
[   18.905000] PM: early resume of devices complete after 0.745 msecs
[   18.910000] s3c-i2c s3c2440-i2c.0: slave address 0x10
[   18.910000] s3c-i2c s3c2440-i2c.0: bus frequency set to 97 KHz
[   18.910000] usb usb1: root hub lost power or was reset
[   18.935000] wake disabled for irq 301
[   18.935000] wake disabled for irq 302
[   18.935000] wake disabled for irq 303
[   18.935000] wake disabled for irq 304
[   18.935000] wake disabled for irq 305
[   18.935000] wake disabled for irq 292
[   19.070000] PM: resume of devices complete after 160.084 msecs
[   19.180000] Restarting tasks ... done.
/ $ [   29.200000] mmc0: Timeout waiting for hardware interrupt.
[   39.220000] mmc0: Timeout waiting for hardware interrupt.
[   49.240000] mmc0: Timeout waiting for hardware interrupt.
[   59.260000] mmc0: Timeout waiting for hardware interrupt.
[   59.260000] mmc0: card e624 removed
[   59.330000] mmc0: new SDHC card at address e624
[   59.335000] mmcblk0: mmc0:e624 SD04G 3.69 GiB
[   59.340000]  mmcblk0: p1
Quoted 3 lines

I didn't understand what is that differ with previously code? (just using dev_pm_ops..)

I could not find any dev_pm_ops related implementation in sdhci-s3c.c. Are there some other patches that I am missing on v3.2-rc6? Or any specific config settings that I need for this to be working?

Quoted 35 lines

Thanks,
Jaehoon Chung

Quoted 28 lines · Chris Ball

Hi,

Quoted 14 lines · Tushar Behera
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

Signed-off-by Mark Brown<broonie<at> opensource.wolfsonmicro.com>

On Origen board (based on EXYNOS4210), the primary filesystem is on a SD/MMC card. When tested with v3.2-rc6 kernel, the system doesn't resume properly.

After resume, it keeps printing following message and the filesystem never comes up.

Quoted 6 lines

mmc0: Timeout waiting for hardware interrupt.

If this patch is reverted, the system is able to mount the filesystem successfully.

Am I missing something?

Mark/Jaehoon? This looks very bad.

- Chris.

Signature · 1 line
Tushar Behera
maintainer
#7 lore raw

Hi Tushar.

Did you test with linux-3.2-rc6?
I checked the linux-3.2-rc6..that version may be missed the dev_pm_ops patch.. (Manuel's patch [PATCH v4] mmc: sdhci: remove "state" argument from sdhci_suspend_host)

I didn't understand this condition.

That patch is include in linux-3.2-rc7.

To Chris.
If adopt "sdhci-s3c: remove Old and misprototyped suspend operation" I think that Manuel's patch must be include in liux-3.2-rc6

Thanks,
Jaehoon Chung

Quoted 100 lines · Tushar Behera

Hi Jaehoon,

Quoted 6 lines · Jaehoon Chung

Hi Tushar.

I also tested this patch with Samsung-SoC.
But i didn't find the below message
"mmc0: Timeout waiting for hardware interrupt."

When the primary filesystem is on SD/MMC card, I need to select following config options for the system to go to sleep. Is it in anyway the reason of conflict?

CONFIG_MMC_UNSAFE_RESUME=y

I modified my test-case to use a ramdisk instead and use a script to mount/unmount the filesystem on MMC card. In that case also I get the above error for some time - around 30s. After that, it behaves normally (mounting/unmounting etc.)

$ echo mem > /sys/power/state
[   18.825000] PM: Syncing filesystems ... done.
[   18.830000] Freezing user space processes ... (elapsed 0.00 seconds) done.
[   18.835000] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[   18.855000] Suspending console(s) (use no_console_suspend to debug)
[   18.865000] wake enabled for irq 292
[   18.865000] wake enabled for irq 301
[   18.865000] wake enabled for irq 302
[   18.865000] wake enabled for irq 303
[   18.865000] wake enabled for irq 304
[   18.865000] wake enabled for irq 305
[   18.890000] PM: suspend of devices complete after 26.491 msecs
[   18.890000] PM: late suspend of devices complete after 0.829 msecs
[   18.890000] Disabling non-boot CPUs ...
[   18.895000] IRQ80 no longer affine to CPU1
[   18.895000] CPU1: shutdown
[   18.895000] Enabling non-boot CPUs ...
[   18.905000] CPU1: Booted secondary processor
[   18.905000] Calibrating delay loop (skipped) already calibrated this CPU
[   18.905000] CPU1: Unknown IPI message 0x1
[   18.905000] CPU1 is up
[   18.905000] PM: early resume of devices complete after 0.745 msecs
[   18.910000] s3c-i2c s3c2440-i2c.0: slave address 0x10
[   18.910000] s3c-i2c s3c2440-i2c.0: bus frequency set to 97 KHz
[   18.910000] usb usb1: root hub lost power or was reset
[   18.935000] wake disabled for irq 301
[   18.935000] wake disabled for irq 302
[   18.935000] wake disabled for irq 303
[   18.935000] wake disabled for irq 304
[   18.935000] wake disabled for irq 305
[   18.935000] wake disabled for irq 292
[   19.070000] PM: resume of devices complete after 160.084 msecs
[   19.180000] Restarting tasks ... done.
/ $ [   29.200000] mmc0: Timeout waiting for hardware interrupt.
[   39.220000] mmc0: Timeout waiting for hardware interrupt.
[   49.240000] mmc0: Timeout waiting for hardware interrupt.
[   59.260000] mmc0: Timeout waiting for hardware interrupt.
[   59.260000] mmc0: card e624 removed
[   59.330000] mmc0: new SDHC card at address e624
[   59.335000] mmcblk0: mmc0:e624 SD04G 3.69 GiB
[   59.340000]  mmcblk0: p1
Quoted 3 lines

I didn't understand what is that differ with previously code? (just using dev_pm_ops..)

I could not find any dev_pm_ops related implementation in sdhci-s3c.c. Are there some other patches that I am missing on v3.2-rc6? Or any specific config settings that I need for this to be working?

Quoted 35 lines

Thanks,
Jaehoon Chung

Quoted 28 lines · Chris Ball

Hi,

Quoted 14 lines · Tushar Behera
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different.

Signed-off-by Mark Brown<broonie<at> opensource.wolfsonmicro.com>

On Origen board (based on EXYNOS4210), the primary filesystem is on a SD/MMC card. When tested with v3.2-rc6 kernel, the system doesn't resume properly.

After resume, it keeps printing following message and the filesystem never comes up.

Quoted 6 lines

mmc0: Timeout waiting for hardware interrupt.

If this patch is reverted, the system is able to mount the filesystem successfully.

Am I missing something?

Mark/Jaehoon? This looks very bad.

- Chris.

#8 lore raw

Hi Jaehoon,

Quoted 10 lines · Jaehoon Chung

Hi Tushar.

Did you test with linux-3.2-rc6?
I checked the linux-3.2-rc6..that version may be missed the dev_pm_ops patch.. (Manuel's patch [PATCH v4] mmc: sdhci: remove "state" argument from sdhci_suspend_host)

I didn't understand this condition.

That patch is include in linux-3.2-rc7.

Thanks for the information. I ran the tests with linux-3.2-rc7 and everything seems great.

Quoted 7 lines

To Chris.
If adopt "sdhci-s3c: remove Old and misprototyped suspend operation" I think that Manuel's patch must be include in liux-3.2-rc6

Thanks,
Jaehoon Chung

Signature · 1 line
Tushar Behera