From: Greg Kroah-Hartman Date: Fri, 13 Mar 2009 06:22:55 +0000 (-0700) Subject: .27 patches X-Git-Tag: v2.6.28.8~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f4b86a0a0761327e4127271a43b80c312566107;p=thirdparty%2Fkernel%2Fstable-queue.git .27 patches --- diff --git a/queue-2.6.27/acpi-fix-broken-usage-of-name.ascii.patch b/queue-2.6.27/acpi-fix-broken-usage-of-name.ascii.patch new file mode 100644 index 00000000000..8c28ac5c7bd --- /dev/null +++ b/queue-2.6.27/acpi-fix-broken-usage-of-name.ascii.patch @@ -0,0 +1,43 @@ +From hmh@hmh.eng.br Thu Mar 12 23:11:32 2009 +From: Henrique de Moraes Holschuh +Date: Tue, 24 Feb 2009 11:48:17 -0300 +Subject: ACPI: fix broken usage of name.ascii +To: Len Brown +Cc: linux-acpi@vger.kernel.org, Lin Ming , stable@kernel.org, Henrique de Moraes Holschuh +Message-ID: <1235486898-27756-1-git-send-email-hmh@hmh.eng.br> + +From: Henrique de Moraes Holschuh + +This issue was fixed indirectly in mainline by commit +0175d562a29ad052c510782c7e76bc63d5155b9b. + +acpi_namespace_node's name.ascii field is four chars, and not NULL- +terminated except by pure luck. So, it cannot be used by sscanf() without +a length restriction. + +This is the minimal fix for both stable 2.6.27 and 2.6.28. + +Signed-off-by: Henrique de Moraes Holschuh +Cc: Lin Ming +Cc: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/ec.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/acpi/ec.c ++++ b/drivers/acpi/ec.c +@@ -759,9 +759,10 @@ acpi_ec_register_query_methods(acpi_hand + struct acpi_namespace_node *node = handle; + struct acpi_ec *ec = context; + int value = 0; +- if (sscanf(node->name.ascii, "_Q%x", &value) == 1) { ++ ++ if (sscanf(node->name.ascii, "_Q%2x", &value) == 1) + acpi_ec_add_query_handler(ec, value, handle, NULL, NULL); +- } ++ + return AE_OK; + } + diff --git a/queue-2.6.27/hwmon-hide-misleading-error-message.patch b/queue-2.6.27/hwmon-hide-misleading-error-message.patch new file mode 100644 index 00000000000..f69d625cf94 --- /dev/null +++ b/queue-2.6.27/hwmon-hide-misleading-error-message.patch @@ -0,0 +1,38 @@ +From khali@linux-fr.org Thu Mar 12 23:16:17 2009 +From: Jean Delvare +Date: Sat, 21 Feb 2009 12:00:20 +0100 +Subject: hwmon: (f71882fg) Hide misleading error message +To: stable@kernel.org +Message-ID: <20090221120020.35dafe74@hyperion.delvare> + +From: Jean Delvare + +commit 603eaa1bdd3e0402085e815cc531bb0a32827a9e upstream + +If the F71882FG chip is at address 0x4e, then the probe at 0x2e will +fail with the following message in the logs: +f71882fg: Not a Fintek device + +This is misleading because there is a Fintek device, just at a +different address. So I propose to degrade this message to a debug +message. + +Signed-off-by: Jean Delvare +Acked-by: Hans de Goede + + +--- + drivers/hwmon/f71882fg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/hwmon/f71882fg.c ++++ b/drivers/hwmon/f71882fg.c +@@ -837,7 +837,7 @@ static int __init f71882fg_find(int sioa + + devid = superio_inw(sioaddr, SIO_REG_MANID); + if (devid != SIO_FINTEK_ID) { +- printk(KERN_INFO DRVNAME ": Not a Fintek device\n"); ++ pr_debug(DRVNAME ": Not a Fintek device\n"); + goto exit; + } + diff --git a/queue-2.6.27/i2c-fix-misplaced-parentheses.patch b/queue-2.6.27/i2c-fix-misplaced-parentheses.patch new file mode 100644 index 00000000000..0dd9913bed3 --- /dev/null +++ b/queue-2.6.27/i2c-fix-misplaced-parentheses.patch @@ -0,0 +1,35 @@ +From khali@linux-fr.org Thu Mar 12 23:10:15 2009 +From: Roel Kluin +Date: Wed, 25 Feb 2009 21:24:40 +0100 +Subject: i2c: Fix misplaced parentheses +To: stable@kernel.org +Message-ID: <20090225212440.3b6d0001@hyperion.delvare> + + +From: Roel Kluin + +commit f29d2e0275a4f03ef2fd158e484508dcb0c64efb upstream + +Fix misplaced parentheses. + +Signed-off-by: Roel Kluin +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/i2c/i2c-core.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/i2c/i2c-core.c ++++ b/drivers/i2c/i2c-core.c +@@ -1795,7 +1795,8 @@ static s32 i2c_smbus_xfer_emulated(struc + case I2C_SMBUS_QUICK: + msg[0].len = 0; + /* Special case: The read/write field is used as data */ +- msg[0].flags = flags | (read_write==I2C_SMBUS_READ)?I2C_M_RD:0; ++ msg[0].flags = flags | (read_write == I2C_SMBUS_READ ? ++ I2C_M_RD : 0); + num = 1; + break; + case I2C_SMBUS_BYTE: diff --git a/queue-2.6.27/i2c-timeouts-reach-1.patch b/queue-2.6.27/i2c-timeouts-reach-1.patch new file mode 100644 index 00000000000..6bd9c70c966 --- /dev/null +++ b/queue-2.6.27/i2c-timeouts-reach-1.patch @@ -0,0 +1,60 @@ +From khali@linux-fr.org Thu Mar 12 23:09:33 2009 +From: Roel Kluin +Date: Wed, 25 Feb 2009 21:26:21 +0100 +Subject: i2c: Timeouts reach -1 +To: stable@kernel.org +Message-ID: <20090225212621.4714ef35@hyperion.delvare> + + +From: Roel Kluin + +commit a746b578d8406b2db0e9f0d040061bc1f78433cf upstream + +With a postfix decrement these timeouts reach -1 rather than 0, but +after the loop it is tested whether they have become 0. + +As pointed out by Jean Delvare, the condition we are waiting for should +also be tested before the timeout. With the current order, you could +exit with a timeout error while the job is actually done. + +Signed-off-by: Roel Kluin +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/i2c/busses/i2c-amd8111.c | 4 ++-- + drivers/i2c/busses/i2c-pxa.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/i2c/busses/i2c-amd8111.c ++++ b/drivers/i2c/busses/i2c-amd8111.c +@@ -72,7 +72,7 @@ static unsigned int amd_ec_wait_write(st + { + int timeout = 500; + +- while (timeout-- && (inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_IBF)) ++ while ((inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_IBF) && --timeout) + udelay(1); + + if (!timeout) { +@@ -88,7 +88,7 @@ static unsigned int amd_ec_wait_read(str + { + int timeout = 500; + +- while (timeout-- && (~inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_OBF)) ++ while ((~inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_OBF) && --timeout) + udelay(1); + + if (!timeout) { +--- a/drivers/i2c/busses/i2c-pxa.c ++++ b/drivers/i2c/busses/i2c-pxa.c +@@ -604,7 +604,7 @@ static int i2c_pxa_do_pio_xfer(struct px + + i2c_pxa_start_message(i2c); + +- while (timeout-- && i2c->msg_num > 0) { ++ while (i2c->msg_num > 0 && --timeout) { + i2c_pxa_handler(0, i2c); + udelay(10); + } diff --git a/queue-2.6.27/ide-iops-fix-odd-length-atapi-pio-transfers.patch b/queue-2.6.27/ide-iops-fix-odd-length-atapi-pio-transfers.patch new file mode 100644 index 00000000000..d2cba13fe1b --- /dev/null +++ b/queue-2.6.27/ide-iops-fix-odd-length-atapi-pio-transfers.patch @@ -0,0 +1,32 @@ +From a509538d4fb4f99cdf0a095213d57cc3b2347615 Mon Sep 17 00:00:00 2001 +From: Sergei Shtylyov +Date: Thu, 5 Mar 2009 16:10:56 +0100 +Subject: ide-iops: fix odd-length ATAPI PIO transfers + +From: Sergei Shtylyov + +commit a509538d4fb4f99cdf0a095213d57cc3b2347615 upstream. + +Commit 9567b349f7e7dd7e2483db99ee8e4a6fe0caca38 (ide: merge ->atapi_*put_bytes +and ->ata_*put_data methods) introduced a regression WRT the odd-length ATAPI +PIO transfers -- the final word didn't get written (causing command timeouts). + +Signed-off-by: Sergei Shtylyov +Signed-off-by: Bartlomiej Zolnierkiewicz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ide/ide-iops.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/ide/ide-iops.c ++++ b/drivers/ide/ide-iops.c +@@ -325,6 +325,8 @@ void ide_output_data(ide_drive_t *drive, + u8 io_32bit = drive->io_32bit; + u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; + ++ len++; ++ + if (io_32bit) { + unsigned long uninitialized_var(flags); + diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 1e9253a89bb..8906cb52c11 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -76,3 +76,8 @@ zaurus-add-usb-id-for-motomagx-phones.patch 0001-DVB-s5h1409-Perform-s5h1409-soft-reset-after-tunin.patch 0002-V4L-tda8290-fix-TDA8290-TDA18271-initialization.patch 0003-V4L-ivtv-fix-decoder-crash-regression.patch +acpi-fix-broken-usage-of-name.ascii.patch +hwmon-hide-misleading-error-message.patch +i2c-fix-misplaced-parentheses.patch +i2c-timeouts-reach-1.patch +ide-iops-fix-odd-length-atapi-pio-transfers.patch