From: Greg Kroah-Hartman Date: Mon, 16 Jan 2012 19:13:39 +0000 (-0800) Subject: 3.2-stable patches X-Git-Tag: v3.1.10~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f24123a853db28377435131d244d87a3b21b406d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.2-stable patches added patches: i2c-fix-error-value-returned-by-several-bus-drivers.patch mmc-core-fix-voltage-select-in-ddr-mode.patch mmc-sd-fix-sdr12-timing-regression.patch mmc-sdhci-fix-tuning-timer-incorrect-setting-when-suspending-host.patch --- diff --git a/queue-3.2/i2c-fix-error-value-returned-by-several-bus-drivers.patch b/queue-3.2/i2c-fix-error-value-returned-by-several-bus-drivers.patch new file mode 100644 index 00000000000..b503b1335d4 --- /dev/null +++ b/queue-3.2/i2c-fix-error-value-returned-by-several-bus-drivers.patch @@ -0,0 +1,187 @@ +From 7c1f59c9d5caf3a84f35549b5d58f3c055a68da5 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Thu, 12 Jan 2012 20:32:03 +0100 +Subject: i2c: Fix error value returned by several bus drivers + +From: Jean Delvare + +commit 7c1f59c9d5caf3a84f35549b5d58f3c055a68da5 upstream. + +When adding checks for ACPI resource conflicts to many bus drivers, +not enough attention was paid to the error paths, and for several +drivers this causes 0 to be returned on error in some cases. Fix this +by properly returning a non-zero value on every error. + +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/i2c/busses/i2c-ali1535.c | 11 +++++++---- + drivers/i2c/busses/i2c-nforce2.c | 2 +- + drivers/i2c/busses/i2c-sis5595.c | 4 ++-- + drivers/i2c/busses/i2c-sis630.c | 6 +++++- + drivers/i2c/busses/i2c-viapro.c | 7 +++++-- + 5 files changed, 20 insertions(+), 10 deletions(-) + +--- a/drivers/i2c/busses/i2c-ali1535.c ++++ b/drivers/i2c/busses/i2c-ali1535.c +@@ -140,7 +140,7 @@ static unsigned short ali1535_smba; + defined to make the transition easier. */ + static int __devinit ali1535_setup(struct pci_dev *dev) + { +- int retval = -ENODEV; ++ int retval; + unsigned char temp; + + /* Check the following things: +@@ -155,6 +155,7 @@ static int __devinit ali1535_setup(struc + if (ali1535_smba == 0) { + dev_warn(&dev->dev, + "ALI1535_smb region uninitialized - upgrade BIOS?\n"); ++ retval = -ENODEV; + goto exit; + } + +@@ -167,6 +168,7 @@ static int __devinit ali1535_setup(struc + ali1535_driver.name)) { + dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n", + ali1535_smba); ++ retval = -EBUSY; + goto exit; + } + +@@ -174,6 +176,7 @@ static int __devinit ali1535_setup(struc + pci_read_config_byte(dev, SMBCFG, &temp); + if ((temp & ALI1535_SMBIO_EN) == 0) { + dev_err(&dev->dev, "SMB device not enabled - upgrade BIOS?\n"); ++ retval = -ENODEV; + goto exit_free; + } + +@@ -181,6 +184,7 @@ static int __devinit ali1535_setup(struc + pci_read_config_byte(dev, SMBHSTCFG, &temp); + if ((temp & 1) == 0) { + dev_err(&dev->dev, "SMBus controller not enabled - upgrade BIOS?\n"); ++ retval = -ENODEV; + goto exit_free; + } + +@@ -198,12 +202,11 @@ static int __devinit ali1535_setup(struc + dev_dbg(&dev->dev, "SMBREV = 0x%X\n", temp); + dev_dbg(&dev->dev, "ALI1535_smba = 0x%X\n", ali1535_smba); + +- retval = 0; +-exit: +- return retval; ++ return 0; + + exit_free: + release_region(ali1535_smba, ALI1535_SMB_IOSIZE); ++exit: + return retval; + } + +--- a/drivers/i2c/busses/i2c-nforce2.c ++++ b/drivers/i2c/busses/i2c-nforce2.c +@@ -356,7 +356,7 @@ static int __devinit nforce2_probe_smb ( + error = acpi_check_region(smbus->base, smbus->size, + nforce2_driver.name); + if (error) +- return -1; ++ return error; + + if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) { + dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n", +--- a/drivers/i2c/busses/i2c-sis5595.c ++++ b/drivers/i2c/busses/i2c-sis5595.c +@@ -147,7 +147,7 @@ static int __devinit sis5595_setup(struc + u16 a; + u8 val; + int *i; +- int retval = -ENODEV; ++ int retval; + + /* Look for imposters */ + for (i = blacklist; *i != 0; i++) { +@@ -223,7 +223,7 @@ static int __devinit sis5595_setup(struc + + error: + release_region(sis5595_base + SMB_INDEX, 2); +- return retval; ++ return -ENODEV; + } + + static int sis5595_transaction(struct i2c_adapter *adap) +--- a/drivers/i2c/busses/i2c-sis630.c ++++ b/drivers/i2c/busses/i2c-sis630.c +@@ -393,7 +393,7 @@ static int __devinit sis630_setup(struct + { + unsigned char b; + struct pci_dev *dummy = NULL; +- int retval = -ENODEV, i; ++ int retval, i; + + /* check for supported SiS devices */ + for (i=0; supported[i] > 0 ; i++) { +@@ -418,18 +418,21 @@ static int __devinit sis630_setup(struct + */ + if (pci_read_config_byte(sis630_dev, SIS630_BIOS_CTL_REG,&b)) { + dev_err(&sis630_dev->dev, "Error: Can't read bios ctl reg\n"); ++ retval = -ENODEV; + goto exit; + } + /* if ACPI already enabled , do nothing */ + if (!(b & 0x80) && + pci_write_config_byte(sis630_dev, SIS630_BIOS_CTL_REG, b | 0x80)) { + dev_err(&sis630_dev->dev, "Error: Can't enable ACPI\n"); ++ retval = -ENODEV; + goto exit; + } + + /* Determine the ACPI base address */ + if (pci_read_config_word(sis630_dev,SIS630_ACPI_BASE_REG,&acpi_base)) { + dev_err(&sis630_dev->dev, "Error: Can't determine ACPI base address\n"); ++ retval = -ENODEV; + goto exit; + } + +@@ -445,6 +448,7 @@ static int __devinit sis630_setup(struct + sis630_driver.name)) { + dev_err(&sis630_dev->dev, "SMBus registers 0x%04x-0x%04x already " + "in use!\n", acpi_base + SMB_STS, acpi_base + SMB_SAA); ++ retval = -EBUSY; + goto exit; + } + +--- a/drivers/i2c/busses/i2c-viapro.c ++++ b/drivers/i2c/busses/i2c-viapro.c +@@ -324,7 +324,7 @@ static int __devinit vt596_probe(struct + const struct pci_device_id *id) + { + unsigned char temp; +- int error = -ENODEV; ++ int error; + + /* Determine the address of the SMBus areas */ + if (force_addr) { +@@ -390,6 +390,7 @@ found: + dev_err(&pdev->dev, "SMBUS: Error: Host SMBus " + "controller not enabled! - upgrade BIOS or " + "use force=1\n"); ++ error = -ENODEV; + goto release_region; + } + } +@@ -422,9 +423,11 @@ found: + "SMBus Via Pro adapter at %04x", vt596_smba); + + vt596_pdev = pci_dev_get(pdev); +- if (i2c_add_adapter(&vt596_adapter)) { ++ error = i2c_add_adapter(&vt596_adapter); ++ if (error) { + pci_dev_put(vt596_pdev); + vt596_pdev = NULL; ++ goto release_region; + } + + /* Always return failure here. This is to allow other drivers to bind diff --git a/queue-3.2/mmc-core-fix-voltage-select-in-ddr-mode.patch b/queue-3.2/mmc-core-fix-voltage-select-in-ddr-mode.patch new file mode 100644 index 00000000000..210a3d7a4c3 --- /dev/null +++ b/queue-3.2/mmc-core-fix-voltage-select-in-ddr-mode.patch @@ -0,0 +1,37 @@ +From 913047e9e5787a90696533a9f109552b7694ecc9 Mon Sep 17 00:00:00 2001 +From: Girish K S +Date: Thu, 15 Dec 2011 17:27:42 +0530 +Subject: mmc: core: Fix voltage select in DDR mode + +From: Girish K S + +commit 913047e9e5787a90696533a9f109552b7694ecc9 upstream. + +This patch fixes the wrong comparison before setting the interface +voltage in DDR mode. + +The assignment to the variable ddr before comaprison is either +ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison +is done with the extended csd value if ddr == EXT_CSD_CARD_TYPE_DDR_1_2V. + +Signed-off-by: Girish K S +Acked-by: Subhash Jadavani +Acked-by: Philip Rakity +Signed-off-by: Chris Ball +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/core/mmc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mmc/core/mmc.c ++++ b/drivers/mmc/core/mmc.c +@@ -1048,7 +1048,7 @@ static int mmc_init_card(struct mmc_host + * + * WARNING: eMMC rules are NOT the same as SD DDR + */ +- if (ddr == EXT_CSD_CARD_TYPE_DDR_1_2V) { ++ if (ddr == MMC_1_2V_DDR_MODE) { + err = mmc_set_signal_voltage(host, + MMC_SIGNAL_VOLTAGE_120, 0); + if (err) diff --git a/queue-3.2/mmc-sd-fix-sdr12-timing-regression.patch b/queue-3.2/mmc-sd-fix-sdr12-timing-regression.patch new file mode 100644 index 00000000000..64d98fd9c25 --- /dev/null +++ b/queue-3.2/mmc-sd-fix-sdr12-timing-regression.patch @@ -0,0 +1,36 @@ +From dd8df17fe83483d7ea06ff229895e35a42071599 Mon Sep 17 00:00:00 2001 +From: Alexander Elbs +Date: Tue, 3 Jan 2012 23:26:53 -0500 +Subject: mmc: sd: Fix SDR12 timing regression + +From: Alexander Elbs + +commit dd8df17fe83483d7ea06ff229895e35a42071599 upstream. + +This patch fixes a failure to recognize SD cards reported on a Dell +Vostro with O2 Micro SD card reader. Patch 49c468f ("mmc: sd: add +support for uhs bus speed mode selection") caused the problem, by +setting the SDHCI_CTRL_HISPD flag even for legacy timings. + +Signed-off-by: Alexander Elbs +Acked-by: Philip Rakity +Acked-by: Arindam Nath +Signed-off-by: Chris Ball +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/sdhci.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/mmc/host/sdhci.c ++++ b/drivers/mmc/host/sdhci.c +@@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhc + if ((ios->timing == MMC_TIMING_UHS_SDR50) || + (ios->timing == MMC_TIMING_UHS_SDR104) || + (ios->timing == MMC_TIMING_UHS_DDR50) || +- (ios->timing == MMC_TIMING_UHS_SDR25) || +- (ios->timing == MMC_TIMING_UHS_SDR12)) ++ (ios->timing == MMC_TIMING_UHS_SDR25)) + ctrl |= SDHCI_CTRL_HISPD; + + ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); diff --git a/queue-3.2/mmc-sdhci-fix-tuning-timer-incorrect-setting-when-suspending-host.patch b/queue-3.2/mmc-sdhci-fix-tuning-timer-incorrect-setting-when-suspending-host.patch new file mode 100644 index 00000000000..7893e8c911f --- /dev/null +++ b/queue-3.2/mmc-sdhci-fix-tuning-timer-incorrect-setting-when-suspending-host.patch @@ -0,0 +1,36 @@ +From c6ced0db08010ed75df221a2946c5228454b38d5 Mon Sep 17 00:00:00 2001 +From: Aaron Lu +Date: Wed, 28 Dec 2011 11:11:12 +0800 +Subject: mmc: sdhci: Fix tuning timer incorrect setting when suspending host + +From: Aaron Lu + +commit c6ced0db08010ed75df221a2946c5228454b38d5 upstream. + +When suspending host, the tuning timer shoule be deactivated. +And the HOST_NEEDS_TUNING flag should be set after tuning timer is +deactivated. + +Signed-off-by: Philip Rakity +Signed-off-by: Aaron Lu +Acked-by: Adrian Hunter +Signed-off-by: Chris Ball +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/sdhci.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/mmc/host/sdhci.c ++++ b/drivers/mmc/host/sdhci.c +@@ -2336,9 +2336,8 @@ int sdhci_suspend_host(struct sdhci_host + /* Disable tuning since we are suspending */ + if (host->version >= SDHCI_SPEC_300 && host->tuning_count && + host->tuning_mode == SDHCI_TUNING_MODE_1) { ++ del_timer_sync(&host->tuning_timer); + host->flags &= ~SDHCI_NEEDS_RETUNING; +- mod_timer(&host->tuning_timer, jiffies + +- host->tuning_count * HZ); + } + + ret = mmc_suspend_host(host->mmc); diff --git a/queue-3.2/series b/queue-3.2/series index fa6aa351574..273a5217a91 100644 --- a/queue-3.2/series +++ b/queue-3.2/series @@ -54,3 +54,7 @@ ubi-fix-debugging-messages.patch ubi-make-vid_hdr-non-static.patch ubifs-fix-debugging-messages.patch ubifs-make-debugging-messages-light-again.patch +i2c-fix-error-value-returned-by-several-bus-drivers.patch +mmc-core-fix-voltage-select-in-ddr-mode.patch +mmc-sdhci-fix-tuning-timer-incorrect-setting-when-suspending-host.patch +mmc-sd-fix-sdr12-timing-regression.patch