[meego-commits] 23605: Changes to MeeGo:1.2:oss:Testing/kernel-adaptation-oaktrail
Kangkai Yin
no_reply at build.meego.com
Wed Aug 10 08:45:19 UTC 2011
Hi,
I have made the following changes to kernel-adaptation-oaktrail in project MeeGo:1.2:oss:Testing. Please review and accept ASAP.
Thank You,
Kangkai Yin
[This message was auto-generated]
---
Request #23605:
submit: devel:kernel:1.2/kernel-adaptation-oaktrail(r14)(update) -> MeeGo:1.2:oss:Testing/kernel-adaptation-oaktrail
Message:
Fix PM legacy warnings for langwell_otg and sdhci driver, BMC# 22525, BMC# 22526
State: new 2011-08-10T01:45:15 kai
Comment: None
changes files:
--------------
--- kernel.changes
+++ kernel.changes
@@ -0,0 +1,4 @@
+* Wed Aug 10 2011 - Yin Kangkai <kangkai.yin at intel.com> - 2.6.37.6
+- Fix langwell_otg pci_has_legacy_pm_support WARNING, BMC# 22526
+- Fix sdhci-pci pci_has_legacy_pm_support WARNING, BMC# 22525
+
new:
----
linux-2.6.37-USB-langwell_otg-remove-pci_has_legacy_pm_support-WA.patch
linux-2.6.37-mmc-remove-legacy-PM-method-for-MFLD-SDHCI-host-driv.patch
spec files:
-----------
--- kernel-adaptation-oaktrail.spec
+++ kernel-adaptation-oaktrail.spec
@@ -352,6 +352,10 @@
# Workaround USB Host Controller IC bugs.
Patch342: linux-2.6.37-usb-host-controller-workaround-ic-bugs.patch
+# Clean up PM legacy WARNING
+Patch343: linux-2.6.37-USB-langwell_otg-remove-pci_has_legacy_pm_support-WA.patch
+Patch344: linux-2.6.37-mmc-remove-legacy-PM-method-for-MFLD-SDHCI-host-driv.patch
+
#
# End of the Oaktrail Adaptation patches
#
@@ -748,6 +752,12 @@
# linux-2.6.37-usb-host-controller-workaround-ic-bugs.patch
%patch342 -p1
+# Clean up PM legacy WARNING
+# linux-2.6.37-USB-langwell_otg-remove-pci_has_legacy_pm_support-WA.patch
+%patch343 -p1
+# linux-2.6.37-mmc-remove-legacy-PM-method-for-MFLD-SDHCI-host-driv.patch
+%patch344 -p1
+
#
# End of the Oaktrail Adaptation patches
#
other changes:
--------------
++++++ linux-2.6.37-USB-langwell_otg-remove-pci_has_legacy_pm_support-WA.patch (new)
--- linux-2.6.37-USB-langwell_otg-remove-pci_has_legacy_pm_support-WA.patch
+++ linux-2.6.37-USB-langwell_otg-remove-pci_has_legacy_pm_support-WA.patch
+From f03f92a85af675df06ff31ca8ea8fade2cfb0994 Mon Sep 17 00:00:00 2001
+From: Yin Kangkai <kangkai.yin at linux.intel.com>
+Date: Wed, 10 Aug 2011 14:50:50 +0800
+Subject: [PATCH] USB/langwell_otg: remove pci_has_legacy_pm_support WARNING
+
+PCI pm code is keeping warning if we have both the legacy suspend/resume
+methods in pci_driver and the new ones in dev_pm_ops:
+
+[ 1383.194791] ------------[ cut here ]------------
+[ 1383.194803] WARNING: at drivers/pci/pci-driver.c:609 pci_has_legacy_pm_support+0x5a/0x63()
+[ 1383.194810] Hardware name: OakTrail
+[ 1383.194815] Modules linked in: hso uvcvideo mrst_gfx(C) hid_ilitek pegasus joydev l3g4200d input_polldev battery
+[ 1383.194844] Pid: 452, comm: kworker/u:9 Tainted: G WC 2.6.37.6 #3
+[ 1383.194851] Call Trace:
+[ 1383.194863] [<c10366af>] warn_slowpath_common+0x65/0x7a
+[ 1383.194874] [<c11d57d9>] ? pci_has_legacy_pm_support+0x5a/0x63
+[ 1383.194884] [<c10366d3>] warn_slowpath_null+0xf/0x13
+[ 1383.194893] [<c11d57d9>] pci_has_legacy_pm_support+0x5a/0x63
+[ 1383.194902] [<c11d5d46>] pci_pm_suspend+0x24/0xca
+[ 1383.194912] [<c126592f>] pm_op+0x7e/0x13b
+[ 1383.194921] [<c1265d1f>] __device_suspend+0x9e/0xed
+[ 1383.194932] [<c1061716>] ? trace_hardirqs_on_caller+0xfb/0x11c
+[ 1383.194941] [<c1265d85>] async_suspend+0x17/0x4c
+[ 1383.194951] [<c1055b29>] async_run_entry_fn+0x8f/0x116
+[ 1383.194961] [<c104c371>] process_one_work+0x25d/0x476
+[ 1383.194971] [<c1055a9a>] ? async_run_entry_fn+0x0/0x116
+[ 1383.194981] [<c104c979>] worker_thread+0x141/0x1f1
+[ 1383.194991] [<c104c838>] ? worker_thread+0x0/0x1f1
+[ 1383.195000] [<c104f627>] kthread+0x62/0x67
+[ 1383.195052] [<c104f5c5>] ? kthread+0x0/0x67
+[ 1383.195062] [<c1002e3a>] kernel_thread_helper+0x6/0x10
+[ 1383.195068] ---[ end trace 9741940e8205304b ]---
+
+This patch fix this.
+
+Signed-off-by: Yin Kangkai <kangkai.yin at intel.com>
+---
+ drivers/usb/otg/langwell_otg.c | 37 ++++++++++++++++++-------------------
+ 1 files changed, 18 insertions(+), 19 deletions(-)
+
+diff --git a/drivers/usb/otg/langwell_otg.c b/drivers/usb/otg/langwell_otg.c
+index ae7a51f..232ffe1 100644
+--- a/drivers/usb/otg/langwell_otg.c
++++ b/drivers/usb/otg/langwell_otg.c
+@@ -53,8 +53,8 @@ static const char driver_name[] = "langwell_otg";
+ static int langwell_otg_probe(struct pci_dev *pdev,
+ const struct pci_device_id *id);
+ static void langwell_otg_remove(struct pci_dev *pdev);
+-static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message);
+-static int langwell_otg_resume(struct pci_dev *pdev);
++static int langwell_otg_suspend(struct device *dev);
++static int langwell_otg_resume(struct device *dev);
+
+ static int langwell_otg_set_host(struct otg_transceiver *otg,
+ struct usb_bus *host);
+@@ -2185,8 +2185,9 @@ static void transceiver_suspend(struct pci_dev *pdev)
+ langwell_otg_phy_low_power(1);
+ }
+
+-static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
++static int langwell_otg_suspend(struct device *dev)
+ {
++ struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct langwell_otg *lnw = the_transceiver;
+ struct intel_mid_otg_xceiv *iotg = &lnw->iotg;
+ int ret = 0;
+@@ -2225,7 +2226,7 @@ static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
+ if (lnw->iotg.stop_host)
+ lnw->iotg.stop_host(&lnw->iotg);
+ else
+- dev_dbg(&pdev->dev, "host driver has been removed.\n");
++ dev_dbg(dev, "host driver has been removed.\n");
+
+ iotg->hsm.a_srp_det = 0;
+
+@@ -2238,7 +2239,7 @@ static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
+ if (lnw->iotg.stop_host)
+ lnw->iotg.stop_host(&lnw->iotg);
+ else
+- dev_dbg(&pdev->dev, "host driver has been removed.\n");
++ dev_dbg(dev, "host driver has been removed.\n");
+
+ iotg->hsm.a_srp_det = 0;
+
+@@ -2254,7 +2255,7 @@ static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
+ if (lnw->iotg.stop_host)
+ lnw->iotg.stop_host(&lnw->iotg);
+ else
+- dev_dbg(lnw->dev, "host driver has been removed.\n");
++ dev_dbg(dev, "host driver has been removed.\n");
+ iotg->hsm.a_srp_det = 0;
+
+ /* Turn off VBus */
+@@ -2268,8 +2269,7 @@ static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
+ if (lnw->iotg.stop_peripheral)
+ lnw->iotg.stop_peripheral(&lnw->iotg);
+ else
+- dev_dbg(&pdev->dev,
+- "client driver has been removed.\n");
++ dev_dbg(dev, "client driver has been removed.\n");
+ iotg->hsm.a_srp_det = 0;
+
+ /* Turn off VBus */
+@@ -2281,7 +2281,7 @@ static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
+ if (lnw->iotg.stop_host)
+ lnw->iotg.stop_host(&lnw->iotg);
+ else
+- dev_dbg(&pdev->dev, "host driver has been removed.\n");
++ dev_dbg(dev, "host driver has been removed.\n");
+ iotg->hsm.b_bus_req = 0;
+ iotg->otg.state = OTG_STATE_B_IDLE;
+ transceiver_suspend(pdev);
+@@ -2290,8 +2290,7 @@ static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
+ if (lnw->iotg.stop_peripheral)
+ lnw->iotg.stop_peripheral(&lnw->iotg);
+ else
+- dev_dbg(&pdev->dev,
+- "client driver has been removed.\n");
++ dev_dbg(dev, "client driver has been removed.\n");
+ iotg->otg.state = OTG_STATE_B_IDLE;
+ transceiver_suspend(pdev);
+ break;
+@@ -2304,13 +2303,13 @@ static int langwell_otg_suspend(struct pci_dev *pdev, pm_message_t message)
+ if (lnw->iotg.stop_host)
+ lnw->iotg.stop_host(&lnw->iotg);
+ else
+- dev_dbg(&pdev->dev, "host driver has been removed.\n");
++ dev_dbg(dev, "host driver has been removed.\n");
+ iotg->hsm.b_bus_req = 0;
+ iotg->otg.state = OTG_STATE_B_IDLE;
+ transceiver_suspend(pdev);
+ break;
+ default:
+- dev_dbg(lnw->dev, "error state before suspend\n");
++ dev_dbg(dev, "error state before suspend\n");
+ break;
+ }
+
+@@ -2323,8 +2322,9 @@ static void transceiver_resume(struct pci_dev *pdev)
+ pci_set_power_state(pdev, PCI_D0);
+ }
+
+-static int langwell_otg_resume(struct pci_dev *pdev)
++static int langwell_otg_resume(struct device *dev)
+ {
++ struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct langwell_otg *lnw = the_transceiver;
+ int ret = 0;
+
+@@ -2332,14 +2332,14 @@ static int langwell_otg_resume(struct pci_dev *pdev)
+
+ lnw->qwork = create_singlethread_workqueue("langwell_otg_queue");
+ if (!lnw->qwork) {
+- dev_dbg(&pdev->dev, "cannot create langwell otg workqueuen");
++ dev_dbg(dev, "cannot create langwell otg workqueuen");
+ ret = -ENOMEM;
+ goto error;
+ }
+
+ if (request_irq(pdev->irq, otg_irq, IRQF_SHARED,
+ driver_name, lnw) != 0) {
+- dev_dbg(&pdev->dev, "request interrupt %d failed\n", pdev->irq);
++ dev_dbg(dev, "request interrupt %d failed\n", pdev->irq);
+ ret = -EBUSY;
+ goto error;
+ }
+@@ -2485,6 +2485,8 @@ static const struct pci_device_id pci_ids[] = {{
+ };
+
+ static const struct dev_pm_ops langwell_otg_pm_ops = {
++ .suspend = langwell_otg_suspend,
++ .resume = langwell_otg_resume,
+ .runtime_suspend = langwell_otg_runtime_suspend,
+ .runtime_resume = langwell_otg_runtime_resume,
+ .runtime_idle = langwell_otg_runtime_idle,
+@@ -2497,9 +2499,6 @@ static struct pci_driver otg_pci_driver = {
+ .probe = langwell_otg_probe,
+ .remove = langwell_otg_remove,
+
+- .suspend = langwell_otg_suspend,
+- .resume = langwell_otg_resume,
+-
+ .driver = {
+ .pm = &langwell_otg_pm_ops
+ },
+--
+1.7.2.3
+
++++++ linux-2.6.37-mmc-remove-legacy-PM-method-for-MFLD-SDHCI-host-driv.patch (new)
--- linux-2.6.37-mmc-remove-legacy-PM-method-for-MFLD-SDHCI-host-driv.patch
+++ linux-2.6.37-mmc-remove-legacy-PM-method-for-MFLD-SDHCI-host-driv.patch
+From 259a45c7f16192cf80857d2d377285ec482ce494 Mon Sep 17 00:00:00 2001
+From: Yin Kangkai <kangkai.yin at linux.intel.com>
+Date: Fri, 5 Aug 2011 19:12:44 +0800
+Subject: [PATCH 1/2] mmc: remove legacy PM method for MFLD SDHCI host driver
+
+PCI core only prefer one of legacy PM and new PM. And we need to implement
+runtime pm, we have already been using new PM method, so remove the legacy PM
+method.
+
+Also remove .prepare/.complete callbacks since dpm driver has already done
+this.
+
+Change-Id: Ide3ac79eb8838187032f1b1f2848664e05fe5cb3
+Signed-off-by: Chuanxiao Dong <chuanxiao.dong at intel.com>
+Signed-off-by: Octavian Purdila <octavian.purdila at intel.com>
+Signed-off-by: Yin Kangkai <kangkai.yin at intel.com>
+---
+ drivers/mmc/host/sdhci-pci.c | 28 ++++++++++++++++++----------
+ drivers/mmc/host/sdhci.c | 10 +++++++++-
+ 2 files changed, 27 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
+index 503203f..b773125 100644
+--- a/drivers/mmc/host/sdhci-pci.c
++++ b/drivers/mmc/host/sdhci-pci.c
+@@ -52,8 +52,7 @@ struct sdhci_pci_fixes {
+ int (*probe_slot)(struct sdhci_pci_slot*);
+ void (*remove_slot)(struct sdhci_pci_slot*, int);
+
+- int (*suspend)(struct sdhci_pci_chip*,
+- pm_message_t);
++ int (*suspend)(struct sdhci_pci_chip *);
+ int (*resume)(struct sdhci_pci_chip*);
+ };
+
+@@ -326,7 +325,7 @@ static void jmicron_remove_slot(struct sdhci_pci_slot *slot, int dead)
+ jmicron_enable_mmc(slot->host, 0);
+ }
+
+-static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state)
++static int jmicron_suspend(struct sdhci_pci_chip *chip)
+ {
+ int i;
+
+@@ -691,18 +690,27 @@ static struct sdhci_ops sdhci_pci_ops = {
+
+ #ifdef CONFIG_PM
+
+-static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
++static int sdhci_pci_suspend (struct device *dev)
+ {
++ struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct sdhci_pci_chip *chip;
+ struct sdhci_pci_slot *slot;
+ mmc_pm_flag_t slot_pm_flags;
+ mmc_pm_flag_t pm_flags = 0;
+ int i, ret;
++ pm_message_t state;
+
+ chip = pci_get_drvdata(pdev);
+ if (!chip)
+ return 0;
+
++ /*
++ * reserve pm_message_t parameter for sdhci_suspend_host
++ * so that sdhci.c is compatible with other sdhci
++ * host like sdhci-s3c host.
++ */
++ state.event = PM_EVENT_SUSPEND;
++
+ for (i = 0;i < chip->num_slots;i++) {
+ slot = chip->slots[i];
+ if (!slot)
+@@ -724,7 +732,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
+ }
+
+ if (chip->fixes && chip->fixes->suspend) {
+- ret = chip->fixes->suspend(chip, state);
++ ret = chip->fixes->suspend(chip);
+ if (ret) {
+ for (i = chip->num_slots - 1;i >= 0;i--)
+ sdhci_resume_host(chip->slots[i]->host);
+@@ -748,8 +756,9 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
+ return 0;
+ }
+
+-static int sdhci_pci_resume (struct pci_dev *pdev)
++static int sdhci_pci_resume(struct device *dev)
+ {
++ struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct sdhci_pci_chip *chip;
+ struct sdhci_pci_slot *slot;
+ int i, ret;
+@@ -797,7 +806,6 @@ static int sdhci_pci_runtime_suspend(struct device *dev)
+ struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct sdhci_pci_chip *chip;
+ struct sdhci_pci_slot *slot;
+- pm_message_t state = { .event = PM_EVENT_SUSPEND };
+ int i, ret;
+
+ chip = pci_get_drvdata(pdev);
+@@ -819,7 +827,7 @@ static int sdhci_pci_runtime_suspend(struct device *dev)
+ }
+
+ if (chip->fixes && chip->fixes->suspend) {
+- ret = chip->fixes->suspend(chip, state);
++ ret = chip->fixes->suspend(chip);
+ if (ret) {
+ for (i = chip->num_slots - 1; i >= 0; i--)
+ sdhci_runtime_resume_host(chip->slots[i]->host);
+@@ -874,6 +882,8 @@ static int sdhci_pci_runtime_idle(struct device *dev)
+ #endif
+
+ static const struct dev_pm_ops sdhci_pci_pm_ops = {
++ .suspend = sdhci_pci_suspend,
++ .resume = sdhci_pci_resume,
+ .runtime_suspend = sdhci_pci_runtime_suspend,
+ .runtime_resume = sdhci_pci_runtime_resume,
+ .runtime_idle = sdhci_pci_runtime_idle,
+@@ -1115,8 +1125,6 @@ static struct pci_driver sdhci_driver = {
+ .id_table = pci_ids,
+ .probe = sdhci_pci_probe,
+ .remove = __devexit_p(sdhci_pci_remove),
+- .suspend = sdhci_pci_suspend,
+- .resume = sdhci_pci_resume,
+ .driver = {
+ .pm = &sdhci_pci_pm_ops
+ },
+diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
+index 99fb35c..932317e 100644
+--- a/drivers/mmc/host/sdhci.c
++++ b/drivers/mmc/host/sdhci.c
+@@ -656,8 +656,16 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
+
+ WARN_ON(host->data);
+
+- if (data == NULL)
++ if (data == NULL) {
++ /*
++ * set the timeout to be maximum value for commands those with
++ * busy signal
++ */
++ if (host->cmd->flags & MMC_RSP_BUSY)
++ sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
++
+ return;
++ }
+
+ /* Sanity checks */
+ BUG_ON(data->blksz * data->blocks > 524288);
+--
+1.7.2.3
+
++++++ series
--- series
+++ series
@@ -202,6 +202,10 @@
# Workaround USB Host Controller IC bugs.
linux-2.6.37-usb-host-controller-workaround-ic-bugs.patch
+# Clean up PM legacy WARNING
+linux-2.6.37-USB-langwell_otg-remove-pci_has_legacy_pm_support-WA.patch
+linux-2.6.37-mmc-remove-legacy-PM-method-for-MFLD-SDHCI-host-driv.patch
+
#
# End of the Oaktrail Adaptation patches
#
More information about the MeeGo-commits
mailing list