From: Greg Kroah-Hartman Date: Tue, 10 Oct 2006 08:31:54 +0000 (-0700) Subject: 2.6.17-stable patches added X-Git-Tag: v2.6.17.14~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94cde98a5548cca2292ed6410292c8a4b743ccf6;p=thirdparty%2Fkernel%2Fstable-queue.git 2.6.17-stable patches added --- diff --git a/queue-2.6.17/add-piix4-apci-quirk-for-the-440mx-chipset-too.patch b/queue-2.6.17/add-piix4-apci-quirk-for-the-440mx-chipset-too.patch new file mode 100644 index 00000000000..91c1e1e1c0f --- /dev/null +++ b/queue-2.6.17/add-piix4-apci-quirk-for-the-440mx-chipset-too.patch @@ -0,0 +1,52 @@ +From stable-bounces@linux.kernel.org Sat Sep 16 21:04:05 2006 +Message-ID: <450CC8D6.7030100@gentoo.org> +Date: Sun, 17 Sep 2006 00:02:30 -0400 +From: Linus Torvalds +To: stable@kernel.org +Cc: torvalds@g5.osdl.org +Subject: Add PIIX4 APCI quirk for the 440MX chipset too + +From: Linus Torvalds + +This is confirmed to fix a hang due to PCI resource conflicts with +setting up the Cardbus bridge on old laptops with the 440MX chipsets. +Original report by Alessio Sangalli, lspci debugging help by Pekka +Enberg, and trial patch suggested by Daniel Ritz: + + "From the docs available i would _guess_ this thing is really similar + to the 82443BX/82371AB combination. at least the SMBus base address + register is hidden at the very same place (32bit at 0x90 in function + 3 of the "south" brigde)" + +The dang thing is largely undocumented, but the patch was corroborated +by Asit Mallick: + + "I am trying to find the register information. 440MX is an integration of + 440BX north-bridge without AGP and PIIX4E (82371EB). PIIX4 quirk + should cover the ACPI and SMBus related I/O registers." + +and verified to fix the problem by Alessio. + +Cc: Daniel Ritz +Cc: Asit Mallick +Cc: Pekka Enberg +Cc: Ivan Kokshaysky +Cc: Dmitry Torokhov +Tested-by: Alessio Sangalli +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +--- linux-2.6.17.13.orig/drivers/pci/quirks.c ++++ linux-2.6.17.13/drivers/pci/quirks.c +@@ -390,6 +390,7 @@ static void __devinit quirk_piix4_acpi(s + piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20); + } + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi ); ++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, quirk_piix4_acpi ); + + /* + * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at diff --git a/queue-2.6.17/ahci-do-not-fail-softreset-if-phy-reports-no-device.patch b/queue-2.6.17/ahci-do-not-fail-softreset-if-phy-reports-no-device.patch new file mode 100644 index 00000000000..e795c2c55b8 --- /dev/null +++ b/queue-2.6.17/ahci-do-not-fail-softreset-if-phy-reports-no-device.patch @@ -0,0 +1,40 @@ +From stable-bounces@linux.kernel.org Sat Sep 16 21:07:40 2006 +Message-ID: <450CC9A3.7030901@gentoo.org> +Date: Sun, 17 Sep 2006 00:05:55 -0400 +From: Tejun Heo +To: stable@kernel.org +Cc: htejun@gmail.com +Subject: ahci: do not fail softreset if PHY reports no device + +From: Tejun Heo + +All softreset methods are responsible for detecting device presence +and succeed softreset in such cases. AHCI didn't use to check for +device presence before proceeding with softreset and this caused +unnecessary reset retrials during probing. This patch adds presence +detection to AHCI softreset. + +Signed-off-by: Tejun Heo +Signed-off-by: Jeff Garzik +Cc: Daniel Drake +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/ahci.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- linux-2.6.17.13.orig/drivers/scsi/ahci.c ++++ linux-2.6.17.13/drivers/scsi/ahci.c +@@ -548,6 +548,12 @@ static int ahci_softreset(struct ata_por + + DPRINTK("ENTER\n"); + ++ if (!sata_dev_present(ap)) { ++ DPRINTK("PHY reports no device\n"); ++ *class = ATA_DEV_NONE; ++ return 0; ++ } ++ + /* prepare for SRST (AHCI-1.1 10.4.1) */ + rc = ahci_stop_engine(ap); + if (rc) { diff --git a/queue-2.6.17/backport-old-ide-fix-sata-detection-for-cabling.patch b/queue-2.6.17/backport-old-ide-fix-sata-detection-for-cabling.patch new file mode 100644 index 00000000000..f827eae10ff --- /dev/null +++ b/queue-2.6.17/backport-old-ide-fix-sata-detection-for-cabling.patch @@ -0,0 +1,40 @@ +From stable-bounces@linux.kernel.org Sun Sep 10 08:47:01 2006 +From: Michael-Luke Jones +To: stable@kernel.org +Message-Id: <86EA9E48-1F4C-4ED8-B5AD-D07F8210CE73@cam.ac.uk> +Date: Sun, 10 Sep 2006 16:46:35 +0100 +Subject: Backport: Old IDE, fix SATA detection for cabling + + +From: Michael-Luke Jones + +This patch is identical to that introduced in +1a1276e7b6cba549553285f74e87f702bfff6fac to the Linus' 2.6 development tree +by Alan Cox. + +'This is based on the proposed patches flying around but also checks that +the device in question is new enough to have word 93 rather thanb blindly +assuming word 93 == 0 means SATA (see ATA-5, ATA-7)' -- Alan Cox + +Required for my SATA drive on an Asus Pundit-R to operate above 33MBps. + +Signed-off-by: Michael-Luke Jones +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ide/ide-iops.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- linux-2.6.17.13.orig/drivers/ide/ide-iops.c ++++ linux-2.6.17.13/drivers/ide/ide-iops.c +@@ -597,6 +597,10 @@ u8 eighty_ninty_three (ide_drive_t *driv + { + if(HWIF(drive)->udma_four == 0) + return 0; ++ ++ /* Check for SATA but only if we are ATA5 or higher */ ++ if (drive->id->hw_config == 0 && (drive->id->major_rev_num & 0x7FE0)) ++ return 1; + if (!(drive->id->hw_config & 0x6000)) + return 0; + #ifndef CONFIG_IDEDMA_IVB diff --git a/queue-2.6.17/dvb-core-proper-handling-ule-sndu-length-of-0.patch b/queue-2.6.17/dvb-core-proper-handling-ule-sndu-length-of-0.patch index 8a0ef209b59..9c5b7d80154 100644 --- a/queue-2.6.17/dvb-core-proper-handling-ule-sndu-length-of-0.patch +++ b/queue-2.6.17/dvb-core-proper-handling-ule-sndu-length-of-0.patch @@ -26,8 +26,8 @@ Signed-off-by: Greg Kroah-Hartman drivers/media/dvb/dvb-core/dvb_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---- linux-2.6.17.11.orig/drivers/media/dvb/dvb-core/dvb_net.c -+++ linux-2.6.17.11/drivers/media/dvb/dvb-core/dvb_net.c +--- linux-2.6.17.13.orig/drivers/media/dvb/dvb-core/dvb_net.c ++++ linux-2.6.17.13/drivers/media/dvb/dvb-core/dvb_net.c @@ -492,7 +492,8 @@ static void dvb_net_ule( struct net_devi } else priv->ule_dbit = 0; diff --git a/queue-2.6.17/ext3-sequential-read-regression-fix.patch b/queue-2.6.17/ext3-sequential-read-regression-fix.patch new file mode 100644 index 00000000000..ede22c2302d --- /dev/null +++ b/queue-2.6.17/ext3-sequential-read-regression-fix.patch @@ -0,0 +1,57 @@ +From stable-bounces@linux.kernel.org Fri Sep 15 09:04:59 2006 +From: Badari Pulavarty +To: akpm@osdl.org +Date: Fri, 15 Sep 2006 09:07:18 -0700 +Message-Id: <1158336439.31501.6.camel@dyn9047017100.beaverton.ibm.com> +Subject: ext3 sequential read regression fix + +From: Badari Pulavarty + +ext3-get-blocks support caused ~20% degrade in Sequential read +performance (tiobench). Problem is with marking the buffer boundary +so IO can be submitted right away. Here is the patch to fix it. + +2.6.18-rc6: +----------- +# ./iotest +1048576+0 records in +1048576+0 records out +4294967296 bytes (4.3 GB) copied, 75.2726 seconds, 57.1 MB/s + +real 1m15.285s +user 0m0.276s +sys 0m3.884s + + +2.6.18-rc6 + fix: +----------------- +[root@elm3a241 ~]# ./iotest +1048576+0 records in +1048576+0 records out +4294967296 bytes (4.3 GB) copied, 62.9356 seconds, 68.2 MB/s + + +The boundary block check in ext3_get_blocks_handle needs to be adjusted +against the count of blocks mapped in this call, now that it can map +more than one block. + +Signed-off-by: Suparna Bhattacharya +Tested-by: Badari Pulavarty +Signed-off-by: Greg Kroah-Hartman + + +--- + fs/ext3/inode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-2.6.17.13.orig/fs/ext3/inode.c ++++ linux-2.6.17.13/fs/ext3/inode.c +@@ -926,7 +926,7 @@ int ext3_get_blocks_handle(handle_t *han + set_buffer_new(bh_result); + got_it: + map_bh(bh_result, inode->i_sb, le32_to_cpu(chain[depth-1].key)); +- if (blocks_to_boundary == 0) ++ if (count > blocks_to_boundary) + set_buffer_boundary(bh_result); + err = count; + /* Clean up and exit */ diff --git a/queue-2.6.17/fix-sparc64-ramdisk-handling.patch b/queue-2.6.17/fix-sparc64-ramdisk-handling.patch new file mode 100644 index 00000000000..e0f83a8f647 --- /dev/null +++ b/queue-2.6.17/fix-sparc64-ramdisk-handling.patch @@ -0,0 +1,43 @@ +From stable-bounces@linux.kernel.org Tue Sep 26 23:16:19 2006 +Date: Tue, 26 Sep 2006 23:15:38 -0700 (PDT) +Message-Id: <20060926.231538.59469660.davem@davemloft.net> +From: David S. Miller +To: stable@kernel.org +Subject: Fix sparc64 ramdisk handling + +From: David S. Miller + +[SPARC64]: Kill bogus check from bootmem_init(). + +There is an ancient and totally incorrect sanity check being +done on the ramdisk location. The check assumes that the +kernel is always loaded to physical address zero, which is +wrong. It was trying to validate the ramdisk value by saying that +if it fell within the kernel image address range it must be wrong. + +Anyways, kill this because it actually creates problems. The +'ramdisk_image' should always be adjusted down by KERNBASE. +SILO can easily put the ramdisk in a location which causes +this test to trigger, breaking things. + +[ Based almost entirely upon a patch from Ben Collins. ] + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc64/mm/init.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- linux-2.6.17.13.orig/arch/sparc64/mm/init.c ++++ linux-2.6.17.13/arch/sparc64/mm/init.c +@@ -902,8 +902,7 @@ static unsigned long __init bootmem_init + if (sparc_ramdisk_image || sparc_ramdisk_image64) { + unsigned long ramdisk_image = sparc_ramdisk_image ? + sparc_ramdisk_image : sparc_ramdisk_image64; +- if (ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE) +- ramdisk_image -= KERNBASE; ++ ramdisk_image -= KERNBASE; + initrd_start = ramdisk_image + phys_base; + initrd_end = initrd_start + sparc_ramdisk_size; + if (initrd_end > end_of_phys_memory) { diff --git a/queue-2.6.17/input-logips2pp-fix-button-mapping-for-mx300.patch b/queue-2.6.17/input-logips2pp-fix-button-mapping-for-mx300.patch new file mode 100644 index 00000000000..9dea134c371 --- /dev/null +++ b/queue-2.6.17/input-logips2pp-fix-button-mapping-for-mx300.patch @@ -0,0 +1,34 @@ +From stable-bounces@linux.kernel.org Sat Sep 16 21:09:33 2006 +Message-ID: <450CCA1B.2020706@gentoo.org> +Date: Sun, 17 Sep 2006 00:07:55 -0400 +From: Roberto Castagnola +To: stable@kernel.org +Cc: roberto.castagnola@gmail.com +Subject: Input: logips2pp - fix button mapping for MX300 + +From: Roberto Castagnola + +MX300 does not have an EXTRA_BTN - it is a simple wheel mouse with +an additional task-switcher button, which is reported as side button +(and not task button). + +Signed-off-by: Daniel Drake +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/mouse/logips2pp.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- linux-2.6.17.13.orig/drivers/input/mouse/logips2pp.c ++++ linux-2.6.17.13/drivers/input/mouse/logips2pp.c +@@ -238,8 +238,7 @@ static struct ps2pp_info *get_model_info + { 100, PS2PP_KIND_MX, /* MX510 */ + PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | + PS2PP_EXTRA_BTN | PS2PP_NAV_BTN }, +- { 111, PS2PP_KIND_MX, /* MX300 */ +- PS2PP_WHEEL | PS2PP_EXTRA_BTN | PS2PP_TASK_BTN }, ++ { 111, PS2PP_KIND_MX, PS2PP_WHEEL | PS2PP_SIDE_BTN }, /* MX300 reports task button as side */ + { 112, PS2PP_KIND_MX, /* MX500 */ + PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | + PS2PP_EXTRA_BTN | PS2PP_NAV_BTN }, diff --git a/queue-2.6.17/invalidate_complete_page-race-fix.patch b/queue-2.6.17/invalidate_complete_page-race-fix.patch new file mode 100644 index 00000000000..1cbe8e3a128 --- /dev/null +++ b/queue-2.6.17/invalidate_complete_page-race-fix.patch @@ -0,0 +1,54 @@ +From stable-bounces@linux.kernel.org Fri Sep 8 09:49:41 2006 +Message-Id: <200609081648.k88Gmesc007335@shell0.pdx.osdl.net> +To: torvalds@osdl.org +From: Andrew Morton +Date: Fri, 08 Sep 2006 09:48:38 -0700 +Cc: akpm@osdl.org, hugh@veritas.com, stable@kernel.org, + nickpiggin@yahoo.com.au +Subject: invalidate_complete_page() race fix + +From: Andrew Morton + +If a CPU faults this page into pagetables after invalidate_mapping_pages() +checked page_mapped(), invalidate_complete_page() will still proceed to remove +the page from pagecache. This leaves the page-faulting process with a +detached page. If it was MAP_SHARED then file data loss will ensue. + +Fix that up by checking the page's refcount after taking tree_lock. + +Cc: Nick Piggin +Cc: Hugh Dickins +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + mm/truncate.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- linux-2.6.17.13.orig/mm/truncate.c ++++ linux-2.6.17.13/mm/truncate.c +@@ -68,10 +68,10 @@ invalidate_complete_page(struct address_ + return 0; + + write_lock_irq(&mapping->tree_lock); +- if (PageDirty(page)) { +- write_unlock_irq(&mapping->tree_lock); +- return 0; +- } ++ if (PageDirty(page)) ++ goto failed; ++ if (page_count(page) != 2) /* caller's ref + pagecache ref */ ++ goto failed; + + BUG_ON(PagePrivate(page)); + __remove_from_page_cache(page); +@@ -79,6 +79,9 @@ invalidate_complete_page(struct address_ + ClearPageUptodate(page); + page_cache_release(page); /* pagecache ref */ + return 1; ++failed: ++ write_unlock_irq(&mapping->tree_lock); ++ return 0; + } + + /** diff --git a/queue-2.6.17/lockd-fix-a-deadlock-in-nlm_traverse_files.patch b/queue-2.6.17/lockd-fix-a-deadlock-in-nlm_traverse_files.patch new file mode 100644 index 00000000000..21d497a7e74 --- /dev/null +++ b/queue-2.6.17/lockd-fix-a-deadlock-in-nlm_traverse_files.patch @@ -0,0 +1,59 @@ +From stable-bounces@linux.kernel.org Thu Sep 7 17:10:17 2006 +From: Trond Myklebust +Date: Thu, 07 Sep 2006 20:09:41 -0400 +To: stable@kernel.org +Message-Id: <20060908000941.10655.26648.stgit@lade.trondhjem.org> +Subject: LOCKD: Fix a deadlock in nlm_traverse_files() + +From: Trond Myklebust + +nlm_traverse_files() is not allowed to hold the nlm_file_mutex while calling +nlm_inspect file, since it may end up calling nlm_release_file() when +releaseing the blocks. + +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/lockd/svcsubs.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +--- linux-2.6.17.13.orig/fs/lockd/svcsubs.c ++++ linux-2.6.17.13/fs/lockd/svcsubs.c +@@ -238,19 +238,22 @@ static int + nlm_traverse_files(struct nlm_host *host, int action) + { + struct nlm_file *file, **fp; +- int i; ++ int i, ret = 0; + + mutex_lock(&nlm_file_mutex); + for (i = 0; i < FILE_NRHASH; i++) { + fp = nlm_files + i; + while ((file = *fp) != NULL) { ++ file->f_count++; ++ mutex_unlock(&nlm_file_mutex); ++ + /* Traverse locks, blocks and shares of this file + * and update file->f_locks count */ +- if (nlm_inspect_file(host, file, action)) { +- mutex_unlock(&nlm_file_mutex); +- return 1; +- } ++ if (nlm_inspect_file(host, file, action)) ++ ret = 1; + ++ mutex_lock(&nlm_file_mutex); ++ file->f_count--; + /* No more references to this file. Let go of it. */ + if (!file->f_blocks && !file->f_locks + && !file->f_shares && !file->f_count) { +@@ -263,7 +266,7 @@ nlm_traverse_files(struct nlm_host *host + } + } + mutex_unlock(&nlm_file_mutex); +- return 0; ++ return ret; + } + + /* diff --git a/queue-2.6.17/mmc-always-use-a-sector-size-of-512-bytes.patch b/queue-2.6.17/mmc-always-use-a-sector-size-of-512-bytes.patch new file mode 100644 index 00000000000..736cef6d5c2 --- /dev/null +++ b/queue-2.6.17/mmc-always-use-a-sector-size-of-512-bytes.patch @@ -0,0 +1,84 @@ +From stable-bounces@linux.kernel.org Sat Sep 16 21:06:20 2006 +Message-ID: <450CC959.9070709@gentoo.org> +Date: Sun, 17 Sep 2006 00:04:41 -0400 +From: Pierre Ossman +To: stable@kernel.org +Cc: drzeus@drzeus.cx +Subject: MMC: Always use a sector size of 512 bytes + +From: Pierre Ossman + +Both MMC and SD specifications specify (although a bit unclearly in the MMC +case) that a sector size of 512 bytes must always be supported by the card. + +Cards can report larger "native" size than this, and cards >= 2 GB even +must do so. Most other readers use 512 bytes even for these cards. We should +do the same to be compatible. + +Signed-off-by: Pierre Ossman +Cc: Daniel Drake +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/mmc_block.c | 49 +++--------------------------------------------- + 1 file changed, 4 insertions(+), 45 deletions(-) + +--- linux-2.6.17.13.orig/drivers/mmc/mmc_block.c ++++ linux-2.6.17.13/drivers/mmc/mmc_block.c +@@ -325,52 +325,11 @@ static struct mmc_blk_data *mmc_blk_allo + md->read_only = mmc_blk_readonly(card); + + /* +- * Figure out a workable block size. MMC cards have: +- * - two block sizes, one for read and one for write. +- * - may support partial reads and/or writes +- * (allows block sizes smaller than specified) ++ * Both SD and MMC specifications state (although a bit ++ * unclearly in the MMC case) that a block size of 512 ++ * bytes must always be supported by the card. + */ +- md->block_bits = card->csd.read_blkbits; +- if (card->csd.write_blkbits != card->csd.read_blkbits) { +- if (card->csd.write_blkbits < card->csd.read_blkbits && +- card->csd.read_partial) { +- /* +- * write block size is smaller than read block +- * size, but we support partial reads, so choose +- * the smaller write block size. +- */ +- md->block_bits = card->csd.write_blkbits; +- } else if (card->csd.write_blkbits > card->csd.read_blkbits && +- card->csd.write_partial) { +- /* +- * read block size is smaller than write block +- * size, but we support partial writes. Use read +- * block size. +- */ +- } else { +- /* +- * We don't support this configuration for writes. +- */ +- printk(KERN_ERR "%s: unable to select block size for " +- "writing (rb%u wb%u rp%u wp%u)\n", +- mmc_card_id(card), +- 1 << card->csd.read_blkbits, +- 1 << card->csd.write_blkbits, +- card->csd.read_partial, +- card->csd.write_partial); +- md->read_only = 1; +- } +- } +- +- /* +- * Refuse to allow block sizes smaller than 512 bytes. +- */ +- if (md->block_bits < 9) { +- printk(KERN_ERR "%s: unable to support block size %u\n", +- mmc_card_id(card), 1 << md->block_bits); +- ret = -EINVAL; +- goto err_kfree; +- } ++ md->block_bits = 9; + + md->disk = alloc_disk(1 << MMC_SHIFT); + if (md->disk == NULL) { diff --git a/queue-2.6.17/nfs-fix-a-potential-deadlock-in-nfs_release_page.patch b/queue-2.6.17/nfs-fix-a-potential-deadlock-in-nfs_release_page.patch new file mode 100644 index 00000000000..edc6668e0a6 --- /dev/null +++ b/queue-2.6.17/nfs-fix-a-potential-deadlock-in-nfs_release_page.patch @@ -0,0 +1,39 @@ +From stable-bounces@linux.kernel.org Thu Sep 7 17:10:13 2006 +From: Trond Myklebust +Date: Thu, 07 Sep 2006 20:09:36 -0400 +To: stable@kernel.org +Message-Id: <20060908000936.10655.41832.stgit@lade.trondhjem.org> +Subject: NFS: Fix a potential deadlock in nfs_release_page + +From: Nikita Danilov + +nfs_wb_page() waits on request completion and, as a result, is not safe to be +called from nfs_release_page() invoked by VM scanner as part of GFP_NOFS +allocation. Fix possible deadlock by analyzing gfp mask and refusing to +release page if __GFP_FS is not set. + +Signed-off-by: Nikita Danilov +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/file.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- linux-2.6.17.13.orig/fs/nfs/file.c ++++ linux-2.6.17.13/fs/nfs/file.c +@@ -325,7 +325,13 @@ static void nfs_invalidate_page(struct p + + static int nfs_release_page(struct page *page, gfp_t gfp) + { +- return !nfs_wb_page(page->mapping->host, page); ++ if (gfp & __GFP_FS) ++ return !nfs_wb_page(page->mapping->host, page); ++ else ++ /* ++ * Avoid deadlock on nfs_wait_on_request(). ++ */ ++ return 0; + } + + struct address_space_operations nfs_file_aops = { diff --git a/queue-2.6.17/nfs-more-page-cache-revalidation-fixups.patch b/queue-2.6.17/nfs-more-page-cache-revalidation-fixups.patch new file mode 100644 index 00000000000..99cf1b49bb6 --- /dev/null +++ b/queue-2.6.17/nfs-more-page-cache-revalidation-fixups.patch @@ -0,0 +1,60 @@ +From stable-bounces@linux.kernel.org Thu Sep 7 17:10:17 2006 +From: Trond Myklebust +Date: Thu, 07 Sep 2006 20:09:43 -0400 +To: stable@kernel.org +Message-Id: <20060908000943.10655.99673.stgit@lade.trondhjem.org> +Subject: NFS: More page cache revalidation fixups + +From: Trond Myklebust + +Whenever the directory changes, we want to make sure that we always +invalidate its page cache. Fix up update_changeattr() and +nfs_mark_for_revalidate() so that they do so. + +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/nfs4proc.c | 10 +++++----- + include/linux/nfs_fs.h | 6 +++++- + 2 files changed, 10 insertions(+), 6 deletions(-) + +--- linux-2.6.17.13.orig/fs/nfs/nfs4proc.c ++++ linux-2.6.17.13/fs/nfs/nfs4proc.c +@@ -185,15 +185,15 @@ static void renew_lease(const struct nfs + spin_unlock(&clp->cl_lock); + } + +-static void update_changeattr(struct inode *inode, struct nfs4_change_info *cinfo) ++static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) + { +- struct nfs_inode *nfsi = NFS_I(inode); ++ struct nfs_inode *nfsi = NFS_I(dir); + +- spin_lock(&inode->i_lock); +- nfsi->cache_validity |= NFS_INO_INVALID_ATTR; ++ spin_lock(&dir->i_lock); ++ nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; + if (cinfo->before == nfsi->change_attr && cinfo->atomic) + nfsi->change_attr = cinfo->after; +- spin_unlock(&inode->i_lock); ++ spin_unlock(&dir->i_lock); + } + + struct nfs4_opendata { +--- linux-2.6.17.13.orig/include/linux/nfs_fs.h ++++ linux-2.6.17.13/include/linux/nfs_fs.h +@@ -234,8 +234,12 @@ static inline int nfs_caches_unstable(st + + static inline void nfs_mark_for_revalidate(struct inode *inode) + { ++ struct nfs_inode *nfsi = NFS_I(inode); ++ + spin_lock(&inode->i_lock); +- NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS; ++ nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS; ++ if (S_ISDIR(inode->i_mode)) ++ nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; + spin_unlock(&inode->i_lock); + } + diff --git a/queue-2.6.17/pkt_sched-cls_basic-use-unsigned-int-when-generating-handle.patch b/queue-2.6.17/pkt_sched-cls_basic-use-unsigned-int-when-generating-handle.patch new file mode 100644 index 00000000000..73b2880b893 --- /dev/null +++ b/queue-2.6.17/pkt_sched-cls_basic-use-unsigned-int-when-generating-handle.patch @@ -0,0 +1,32 @@ +From stable-bounces@linux.kernel.org Wed Sep 27 16:57:18 2006 +Date: Wed, 27 Sep 2006 16:25:17 -0700 (PDT) +Message-Id: <20060927.162517.72386936.davem@davemloft.net> +To: stable@kernel.org +From: David Miller +Cc: bunk@stusta.de +Subject: PKT_SCHED: cls_basic: Use unsigned int when generating handle + +From: David Miller + +Prevents filters from being added if the first generated +handle already exists. + +Signed-off-by: Kim Nordlund +Signed-off-by: Thomas Graf +Signed-off-by: Greg Kroah-Hartman + +--- + net/sched/cls_basic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-2.6.17.13.orig/net/sched/cls_basic.c ++++ linux-2.6.17.13/net/sched/cls_basic.c +@@ -197,7 +197,7 @@ static int basic_change(struct tcf_proto + if (handle) + f->handle = handle; + else { +- int i = 0x80000000; ++ unsigned int i = 0x80000000; + do { + if (++head->hgenerator == 0x7FFFFFFF) + head->hgenerator = 1; diff --git a/queue-2.6.17/series b/queue-2.6.17/series index d418be513d8..d29ee5f2822 100644 --- a/queue-2.6.17/series +++ b/queue-2.6.17/series @@ -1 +1,19 @@ dvb-core-proper-handling-ule-sndu-length-of-0.patch +nfs-fix-a-potential-deadlock-in-nfs_release_page.patch +sunrpc-avoid-choosing-an-ipmi-port-for-rpc-traffic.patch +lockd-fix-a-deadlock-in-nlm_traverse_files.patch +nfs-more-page-cache-revalidation-fixups.patch +backport-old-ide-fix-sata-detection-for-cabling.patch +invalidate_complete_page-race-fix.patch +ext3-sequential-read-regression-fix.patch +sysfs-remove-duplicated-dput-in-sysfs_update_file.patch +video-fix-msp343xg-handling-regression.patch +video-cx24123-fix-pll-divisor-setup.patch +sparc64-fix-serious-bug-in-sched_clock-on-sparc64.patch +fix-sparc64-ramdisk-handling.patch +pkt_sched-cls_basic-use-unsigned-int-when-generating-handle.patch +xirc2ps_cs-cannot-reset-card-in-atomic-context.patch +add-piix4-apci-quirk-for-the-440mx-chipset-too.patch +mmc-always-use-a-sector-size-of-512-bytes.patch +ahci-do-not-fail-softreset-if-phy-reports-no-device.patch +input-logips2pp-fix-button-mapping-for-mx300.patch diff --git a/queue-2.6.17/sparc64-fix-serious-bug-in-sched_clock-on-sparc64.patch b/queue-2.6.17/sparc64-fix-serious-bug-in-sched_clock-on-sparc64.patch new file mode 100644 index 00000000000..ea3383e4171 --- /dev/null +++ b/queue-2.6.17/sparc64-fix-serious-bug-in-sched_clock-on-sparc64.patch @@ -0,0 +1,41 @@ +From stable-bounces@linux.kernel.org Sat Sep 23 18:26:55 2006 +Date: Sat, 23 Sep 2006 18:26:24 -0700 (PDT) +Message-Id: <20060923.182624.74747867.davem@davemloft.net> +From: David Miller +To: stable@kernel.org +Cc: bunk@stusta.de +Subject: SPARC64: Fix serious bug in sched_clock() on sparc64 + +From: David S. Miller + +[SPARC64]: Fix sched_clock() wrapping every ~17 seconds. + +Unfortunately, sparc64 doesn't have an easy way to do a "64 X 64 --> +128" bit multiply like PowerPC and IA64 do. We were doing a +"64 X 64 --> 64" bit multiple which causes overflow very quickly with +a 30-bit quotient shift. + +So use a quotientshift count of 10 instead of 30, just like x86 and +ARM do. + +This also fixes the wrapping of printk timestamp values every ~17 +seconds. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc64/kernel/time.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-2.6.17.13.orig/arch/sparc64/kernel/time.c ++++ linux-2.6.17.13/arch/sparc64/kernel/time.c +@@ -1105,7 +1105,7 @@ static struct time_interpolator sparc64_ + }; + + /* The quotient formula is taken from the IA64 port. */ +-#define SPARC64_NSEC_PER_CYC_SHIFT 30UL ++#define SPARC64_NSEC_PER_CYC_SHIFT 10UL + void __init time_init(void) + { + unsigned long clock = sparc64_init_timers(); diff --git a/queue-2.6.17/sunrpc-avoid-choosing-an-ipmi-port-for-rpc-traffic.patch b/queue-2.6.17/sunrpc-avoid-choosing-an-ipmi-port-for-rpc-traffic.patch new file mode 100644 index 00000000000..9366db3b05f --- /dev/null +++ b/queue-2.6.17/sunrpc-avoid-choosing-an-ipmi-port-for-rpc-traffic.patch @@ -0,0 +1,36 @@ +From stable-bounces@linux.kernel.org Thu Sep 7 17:10:17 2006 +From: Chuck Lever +Date: Thu, 07 Sep 2006 20:09:39 -0400 +To: stable@kernel.org +Message-Id: <20060908000938.10655.79153.stgit@lade.trondhjem.org> +Subject: SUNRPC: avoid choosing an IPMI port for RPC traffic + +From: Chuck Lever + +Some hardware uses port 664 for its hardware-based IPMI listener. Teach +the RPC client to avoid using that port by raising the default minimum port +number to 665. + +Test plan: +Find a mainboard known to use port 664 for IPMI; enable IPMI; mount NFS +servers in a tight loop. + +Signed-off-by: Chuck Lever +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/sunrpc/xprt.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-2.6.17.13.orig/include/linux/sunrpc/xprt.h ++++ linux-2.6.17.13/include/linux/sunrpc/xprt.h +@@ -37,7 +37,7 @@ extern unsigned int xprt_max_resvport; + + #define RPC_MIN_RESVPORT (1U) + #define RPC_MAX_RESVPORT (65535U) +-#define RPC_DEF_MIN_RESVPORT (650U) ++#define RPC_DEF_MIN_RESVPORT (665U) + #define RPC_DEF_MAX_RESVPORT (1023U) + + /* diff --git a/queue-2.6.17/sysfs-remove-duplicated-dput-in-sysfs_update_file.patch b/queue-2.6.17/sysfs-remove-duplicated-dput-in-sysfs_update_file.patch new file mode 100644 index 00000000000..34771878039 --- /dev/null +++ b/queue-2.6.17/sysfs-remove-duplicated-dput-in-sysfs_update_file.patch @@ -0,0 +1,81 @@ +From stable-bounces@linux.kernel.org Fri Sep 29 01:06:11 2006 +Message-Id: <200609290805.k8T85NNE008467@shell0.pdx.osdl.net> +To: seto.hidetoshi@jp.fujitsu.com, greg@kroah.com, stable@kernel.org, + mm-commits@vger.kernel.org +From: Hidetoshi Seto +Date: Fri, 29 Sep 2006 01:05:23 -0700 +Subject: sysfs: remove duplicated dput in sysfs_update_file + +From: Hidetoshi Seto + +Following function can drops d_count twice against one reference +by lookup_one_len. + + +/** + * sysfs_update_file - update the modified timestamp on an object attribute. + * @kobj: object we're acting for. + * @attr: attribute descriptor. + */ +int sysfs_update_file(struct kobject * kobj, const struct attribute * attr) +{ + struct dentry * dir = kobj->dentry; + struct dentry * victim; + int res = -ENOENT; + + mutex_lock(&dir->d_inode->i_mutex); + victim = lookup_one_len(attr->name, dir, strlen(attr->name)); + if (!IS_ERR(victim)) { + /* make sure dentry is really there */ + if (victim->d_inode && + (victim->d_parent->d_inode == dir->d_inode)) { + victim->d_inode->i_mtime = CURRENT_TIME; + fsnotify_modify(victim); + + /** + * Drop reference from initial sysfs_get_dentry(). + */ + dput(victim); + res = 0; + } else + d_drop(victim); + + /** + * Drop the reference acquired from sysfs_get_dentry() above. + */ + dput(victim); + } + mutex_unlock(&dir->d_inode->i_mutex); + + return res; +} + + +PCI-hotplug (drivers/pci/hotplug/pci_hotplug_core.c) is only user of +this function. I confirmed that dentry of /sys/bus/pci/slots/XXX/* +have negative d_count value. + +This patch removes unnecessary dput(). + +Signed-off-by: Hidetoshi Seto +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + fs/sysfs/file.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- linux-2.6.17.13.orig/fs/sysfs/file.c ++++ linux-2.6.17.13/fs/sysfs/file.c +@@ -483,11 +483,6 @@ int sysfs_update_file(struct kobject * k + (victim->d_parent->d_inode == dir->d_inode)) { + victim->d_inode->i_mtime = CURRENT_TIME; + fsnotify_modify(victim); +- +- /** +- * Drop reference from initial sysfs_get_dentry(). +- */ +- dput(victim); + res = 0; + } else + d_drop(victim); diff --git a/queue-2.6.17/video-cx24123-fix-pll-divisor-setup.patch b/queue-2.6.17/video-cx24123-fix-pll-divisor-setup.patch new file mode 100644 index 00000000000..916c63fd39e --- /dev/null +++ b/queue-2.6.17/video-cx24123-fix-pll-divisor-setup.patch @@ -0,0 +1,40 @@ +From stable-bounces@linux.kernel.org Sun Oct 8 12:49:59 2006 +Message-ID: <45294778.8020802@linuxtv.org> +Date: Sun, 08 Oct 2006 14:46:16 -0400 +From: Yeasah Pell +To: stable@kernel.org +Cc: v4l-dvb maintainer list , + Yeasah Pell , linux-kernel@vger.kernel.org, + Steven Toth +Subject: Video: cx24123: fix PLL divisor setup + +From: Yeasah Pell + +The cx24109 datasheet says: "NOTE: if A=0, then N=N+1" + +The current code is the result of a misinterpretation of the datasheet to +mean exactly the opposite of the requirement -- The actual value of N is 1 greater than the value written when A is 0, so 1 needs to be *subtracted* +from it to compensate. + +Signed-off-by: Yeasah Pell +Signed-off-by: Steven Toth +Signed-off-by: Michael Krufky +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/dvb/frontends/cx24123.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- linux-2.6.17.13.orig/drivers/media/dvb/frontends/cx24123.c ++++ linux-2.6.17.13/drivers/media/dvb/frontends/cx24123.c +@@ -579,8 +579,8 @@ static int cx24123_pll_calculate(struct + ndiv = ( ((p->frequency * vco_div * 10) / (2 * XTAL / 1000)) / 32) & 0x1ff; + adiv = ( ((p->frequency * vco_div * 10) / (2 * XTAL / 1000)) % 32) & 0x1f; + +- if (adiv == 0) +- ndiv++; ++ if (adiv == 0 && ndiv > 0) ++ ndiv--; + + /* control bits 11, refdiv 11, charge pump polarity 1, charge pump current, ndiv, adiv */ + state->pllarg = (3 << 19) | (3 << 17) | (1 << 16) | (pump << 14) | (ndiv << 5) | adiv; diff --git a/queue-2.6.17/video-fix-msp343xg-handling-regression.patch b/queue-2.6.17/video-fix-msp343xg-handling-regression.patch new file mode 100644 index 00000000000..db8ef182596 --- /dev/null +++ b/queue-2.6.17/video-fix-msp343xg-handling-regression.patch @@ -0,0 +1,68 @@ +From stable-bounces@linux.kernel.org Sun Oct 8 12:56:28 2006 +Message-ID: <4529476D.3030009@linuxtv.org> +Date: Sun, 08 Oct 2006 14:46:05 -0400 +From: Hans Verkuil +To: stable@kernel.org +Cc: Hans Verkuil , + Linux and Kernel Video , + v4l-dvb maintainer list +Subject: Video: Fix msp343xG handling regression + +From: Hans Verkuil + +The msp3430G and msp3435G models cannot do Automatic Standard Detection, +so these should be forced to BTSC. These chips are early production +versions for the msp34xxG series and are quite rare. + +Due to broken handling of the 'standard' option in 2.6.17, there is +no workaround possible. + +Signed-off-by: Hans Verkuil +Signed-off-by: Michael Krufky +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/msp3400-driver.c | 2 ++ + drivers/media/video/msp3400-driver.h | 1 + + drivers/media/video/msp3400-kthreads.c | 7 ++++--- + 3 files changed, 7 insertions(+), 3 deletions(-) + +--- linux-2.6.17.13.orig/drivers/media/video/msp3400-driver.c ++++ linux-2.6.17.13/drivers/media/video/msp3400-driver.c +@@ -942,6 +942,8 @@ static int msp_attach(struct i2c_adapter + state->has_virtual_dolby_surround = msp_revision == 'G' && msp_prod_lo == 1; + /* Has Virtual Dolby Surround & Dolby Pro Logic: only in msp34x2 */ + state->has_dolby_pro_logic = msp_revision == 'G' && msp_prod_lo == 2; ++ /* The msp343xG supports BTSC only and cannot do Automatic Standard Detection. */ ++ state->force_btsc = msp_family == 3 && msp_revision == 'G' && msp_prod_hi == 3; + + state->opmode = opmode; + if (state->opmode == OPMODE_AUTO) { +--- linux-2.6.17.13.orig/drivers/media/video/msp3400-driver.h ++++ linux-2.6.17.13/drivers/media/video/msp3400-driver.h +@@ -64,6 +64,7 @@ struct msp_state { + u8 has_sound_processing; + u8 has_virtual_dolby_surround; + u8 has_dolby_pro_logic; ++ u8 force_btsc; + + int radio; + int opmode; +--- linux-2.6.17.13.orig/drivers/media/video/msp3400-kthreads.c ++++ linux-2.6.17.13/drivers/media/video/msp3400-kthreads.c +@@ -949,11 +949,12 @@ int msp34xxg_thread(void *data) + + /* setup the chip*/ + msp34xxg_reset(client); +- state->std = state->radio ? 0x40 : msp_standard; +- if (state->std != 1) +- goto unmute; ++ state->std = state->radio ? 0x40 : ++ (state->force_btsc && msp_standard == 1) ? 32 : msp_standard; + /* start autodetect */ + msp_write_dem(client, 0x20, state->std); ++ if (state->std != 1) ++ goto unmute; + + /* watch autodetect */ + v4l_dbg(1, msp_debug, client, "started autodetect, waiting for result\n"); diff --git a/queue-2.6.17/xirc2ps_cs-cannot-reset-card-in-atomic-context.patch b/queue-2.6.17/xirc2ps_cs-cannot-reset-card-in-atomic-context.patch new file mode 100644 index 00000000000..e964736c26f --- /dev/null +++ b/queue-2.6.17/xirc2ps_cs-cannot-reset-card-in-atomic-context.patch @@ -0,0 +1,79 @@ +From stable-bounces@linux.kernel.org Sat Sep 16 21:02:45 2006 +Message-ID: <450CC881.1050101@gentoo.org> +Date: Sun, 17 Sep 2006 00:01:05 -0400 +From: Joerg Ahrens +To: stable@kernel.org +Cc: joerg@hydrops.han.de +Subject: xirc2ps_cs: Cannot reset card in atomic context + +From: Joerg Ahrens + +I am using a Xircom CEM33 pcmcia NIC which has occasional hardware problems. +If the netdev watchdog detects a transmit timeout, do_reset is called which +msleeps - this is illegal in atomic context. + +This patch schedules the timeout handling as a workqueue item. + +Signed-off-by: Daniel Drake +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/pcmcia/xirc2ps_cs.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +--- linux-2.6.17.13.orig/drivers/net/pcmcia/xirc2ps_cs.c ++++ linux-2.6.17.13/drivers/net/pcmcia/xirc2ps_cs.c +@@ -345,6 +345,7 @@ typedef struct local_info_t { + void __iomem *dingo_ccr; /* only used for CEM56 cards */ + unsigned last_ptr_value; /* last packets transmitted value */ + const char *manf_str; ++ struct work_struct tx_timeout_task; + } local_info_t; + + /**************** +@@ -352,6 +353,7 @@ typedef struct local_info_t { + */ + static int do_start_xmit(struct sk_buff *skb, struct net_device *dev); + static void do_tx_timeout(struct net_device *dev); ++static void xirc2ps_tx_timeout_task(void *data); + static struct net_device_stats *do_get_stats(struct net_device *dev); + static void set_addresses(struct net_device *dev); + static void set_multicast_list(struct net_device *dev); +@@ -589,6 +591,7 @@ xirc2ps_probe(struct pcmcia_device *link + #ifdef HAVE_TX_TIMEOUT + dev->tx_timeout = do_tx_timeout; + dev->watchdog_timeo = TX_TIMEOUT; ++ INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task, dev); + #endif + + return xirc2ps_config(link); +@@ -1341,17 +1344,24 @@ xirc2ps_interrupt(int irq, void *dev_id, + /*====================================================================*/ + + static void +-do_tx_timeout(struct net_device *dev) ++xirc2ps_tx_timeout_task(void *data) + { +- local_info_t *lp = netdev_priv(dev); +- printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); +- lp->stats.tx_errors++; ++ struct net_device *dev = data; + /* reset the card */ + do_reset(dev,1); + dev->trans_start = jiffies; + netif_wake_queue(dev); + } + ++static void ++do_tx_timeout(struct net_device *dev) ++{ ++ local_info_t *lp = netdev_priv(dev); ++ lp->stats.tx_errors++; ++ printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); ++ schedule_work(&lp->tx_timeout_task); ++} ++ + static int + do_start_xmit(struct sk_buff *skb, struct net_device *dev) + {