From: Greg Kroah-Hartman Date: Tue, 11 Dec 2007 19:44:29 +0000 (-0800) Subject: more 2.6.23 patches added to queue X-Git-Tag: v2.6.23.10~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1918d5f2954c41b0a033d349a63317491b479163;p=thirdparty%2Fkernel%2Fstable-queue.git more 2.6.23 patches added to queue --- diff --git a/queue-2.6.23/forcedeth-boot-delay-fix.patch b/queue-2.6.23/forcedeth-boot-delay-fix.patch new file mode 100644 index 00000000000..daa798a2b98 --- /dev/null +++ b/queue-2.6.23/forcedeth-boot-delay-fix.patch @@ -0,0 +1,57 @@ +From 9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 Mon Sep 17 00:00:00 2001 +From: Ayaz Abdulla +Date: Wed, 21 Nov 2007 15:02:58 -0800 +Subject: forcedeth boot delay fix + +From: Ayaz Abdulla + +patch 9e555930bd873d238f5f7b9d76d3bf31e6e3ce93 in mainline. + +Fix a long boot delay in the forcedeth driver. During initialization, the +timeout for the handshake between mgmt unit and driver can be very long. +The patch reduces the timeout by eliminating a extra loop around the +timeout logic. + +Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9308 + +Signed-off-by: Ayaz Abdulla +Cc: Alex Howells +Signed-off-by: Andrew Morton +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/forcedeth.c | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +--- a/drivers/net/forcedeth.c ++++ b/drivers/net/forcedeth.c +@@ -5280,19 +5280,15 @@ static int __devinit nv_probe(struct pci + if (readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_PHY_INIT) { + np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST; + dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use); +- for (i = 0; i < 5000; i++) { +- msleep(1); +- if (nv_mgmt_acquire_sema(dev)) { +- /* management unit setup the phy already? */ +- if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == +- NVREG_XMITCTL_SYNC_PHY_INIT) { +- /* phy is inited by mgmt unit */ +- phyinitialized = 1; +- dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); +- } else { +- /* we need to init the phy */ +- } +- break; ++ if (nv_mgmt_acquire_sema(dev)) { ++ /* management unit setup the phy already? */ ++ if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == ++ NVREG_XMITCTL_SYNC_PHY_INIT) { ++ /* phy is inited by mgmt unit */ ++ phyinitialized = 1; ++ dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); ++ } else { ++ /* we need to init the phy */ + } + } + } diff --git a/queue-2.6.23/forcedeth-new-mcp79-pci-ids.patch b/queue-2.6.23/forcedeth-new-mcp79-pci-ids.patch new file mode 100644 index 00000000000..4f49dbd9af3 --- /dev/null +++ b/queue-2.6.23/forcedeth-new-mcp79-pci-ids.patch @@ -0,0 +1,60 @@ +From 490dde8990c55662596a4be71b5070bd7d382d4a Mon Sep 17 00:00:00 2001 +From: Ayaz Abdulla +Date: Fri, 23 Nov 2007 20:54:01 -0500 +Subject: forcedeth: new mcp79 pci ids + +From: Ayaz Abdulla + +patch 490dde8990c55662596a4be71b5070bd7d382d4a in mainline. + +This patch adds new device ids and features for mcp79 devices into the +forcedeth driver. + +Signed-off-by: Ayaz Abdulla +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +index 92ce2e3..f9ba0ac 100644 +--- + drivers/net/forcedeth.c | 16 ++++++++++++++++ + include/linux/pci_ids.h | 4 ++++ + 2 files changed, 20 insertions(+) + +--- a/drivers/net/forcedeth.c ++++ b/drivers/net/forcedeth.c +@@ -5582,6 +5582,22 @@ static struct pci_device_id pci_tbl[] = + PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_35), + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, + }, ++ { /* MCP79 Ethernet Controller */ ++ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_36), ++ .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, ++ }, ++ { /* MCP79 Ethernet Controller */ ++ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_37), ++ .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, ++ }, ++ { /* MCP79 Ethernet Controller */ ++ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_38), ++ .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, ++ }, ++ { /* MCP79 Ethernet Controller */ ++ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_39), ++ .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT, ++ }, + {0,}, + }; + +--- a/include/linux/pci_ids.h ++++ b/include/linux/pci_ids.h +@@ -1237,6 +1237,10 @@ + #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 + #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 + #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 ++#define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0 ++#define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1 ++#define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2 ++#define PCI_DEVICE_ID_NVIDIA_NVENET_39 0x0AB3 + + #define PCI_VENDOR_ID_IMS 0x10e0 + #define PCI_DEVICE_ID_IMS_TT128 0x9128 diff --git a/queue-2.6.23/i4l-fix-isdn_ioctl-memory-overrun-vulnerability.patch b/queue-2.6.23/i4l-fix-isdn_ioctl-memory-overrun-vulnerability.patch new file mode 100644 index 00000000000..18b350c1004 --- /dev/null +++ b/queue-2.6.23/i4l-fix-isdn_ioctl-memory-overrun-vulnerability.patch @@ -0,0 +1,61 @@ +From stable-bounces@linux.kernel.org Sat Dec 1 12:17:01 2007 +From: akpm@linux-foundation.org +Date: Sat, 01 Dec 2007 12:16:15 -0800 +Subject: I4L: fix isdn_ioctl memory overrun vulnerability +To: torvalds@linux-foundation.org +Cc: akpm@linux-foundation.org, adlab@venustech.com.cn, kkeil@suse.de, stable@kernel.org +Message-ID: <200712012016.lB1KGFmF005739@imap1.linux-foundation.org> + + +From: Karsten Keil + +patch eafe1aa37e6ec2d56f14732b5240c4dd09f0613a in mainline. + +Fix possible memory overrun issue in the isdn ioctl code. Found by ADLAB + + +Signed-off-by: Karsten Keil +Cc: ADLAB +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/isdn/i4l/isdn_common.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/isdn/i4l/isdn_common.c ++++ b/drivers/isdn/i4l/isdn_common.c +@@ -1515,6 +1515,7 @@ isdn_ioctl(struct inode *inode, struct f + if (copy_from_user(&iocts, argp, + sizeof(isdn_ioctl_struct))) + return -EFAULT; ++ iocts.drvid[sizeof(iocts.drvid)-1] = 0; + if (strlen(iocts.drvid)) { + if ((p = strchr(iocts.drvid, ','))) + *p = 0; +@@ -1599,6 +1600,7 @@ isdn_ioctl(struct inode *inode, struct f + if (copy_from_user(&iocts, argp, + sizeof(isdn_ioctl_struct))) + return -EFAULT; ++ iocts.drvid[sizeof(iocts.drvid)-1] = 0; + if (strlen(iocts.drvid)) { + drvidx = -1; + for (i = 0; i < ISDN_MAX_DRIVERS; i++) +@@ -1643,7 +1645,7 @@ isdn_ioctl(struct inode *inode, struct f + } else { + p = (char __user *) iocts.arg; + for (i = 0; i < 10; i++) { +- sprintf(bname, "%s%s", ++ snprintf(bname, sizeof(bname), "%s%s", + strlen(dev->drv[drvidx]->msn2eaz[i]) ? + dev->drv[drvidx]->msn2eaz[i] : "_", + (i < 9) ? "," : "\0"); +@@ -1673,6 +1675,7 @@ isdn_ioctl(struct inode *inode, struct f + char *p; + if (copy_from_user(&iocts, argp, sizeof(isdn_ioctl_struct))) + return -EFAULT; ++ iocts.drvid[sizeof(iocts.drvid)-1] = 0; + if (strlen(iocts.drvid)) { + if ((p = strchr(iocts.drvid, ','))) + *p = 0; diff --git a/queue-2.6.23/series b/queue-2.6.23/series index 741d93fbcad..c9fb3efdada 100644 --- a/queue-2.6.23/series +++ b/queue-2.6.23/series @@ -7,3 +7,9 @@ pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch fix-synchronize_irq-races-with-irq-handler.patch input-alps-add-support-for-model-found-in-dell-vostro-1400.patch input-alps-add-signature-for-thinkpad-r61.patch +usb-make-the-microtek-driver-and-hal-cooperate.patch +usb-fix-up-ehci-startup-synchronization.patch +tmpfs-restore-missing-clear_highpage.patch +i4l-fix-isdn_ioctl-memory-overrun-vulnerability.patch +forcedeth-new-mcp79-pci-ids.patch +forcedeth-boot-delay-fix.patch diff --git a/queue-2.6.23/tmpfs-restore-missing-clear_highpage.patch b/queue-2.6.23/tmpfs-restore-missing-clear_highpage.patch new file mode 100644 index 00000000000..d0d89fde5f8 --- /dev/null +++ b/queue-2.6.23/tmpfs-restore-missing-clear_highpage.patch @@ -0,0 +1,52 @@ +From stable-bounces@linux.kernel.org Wed Nov 28 10:56:26 2007 +From: Hugh Dickins +Date: Wed, 28 Nov 2007 18:55:10 +0000 (GMT) +Subject: tmpfs: restore missing clear_highpage +To: Linus Torvalds +Cc: linux-kernel@vger.kernel.org, Andrew Morton , Adrian Bunk , Willy Tarreau , stable@kernel.org +Message-ID: + +From: Hugh Dickins + +patch e84e2e132c9c66d8498e7710d4ea532d1feaaac5 in mainline + +tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in +which shmem_getpage receives the page from its caller instead of allocating. +We must cover this case by clear_highpage before SetPageUptodate, as before. + +Signed-off-by: Hugh Dickins +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/shmem.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/mm/shmem.c ++++ b/mm/shmem.c +@@ -1071,7 +1071,7 @@ shmem_alloc_page(gfp_t gfp, struct shmem + pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx); + pvma.vm_pgoff = idx; + pvma.vm_end = PAGE_SIZE; +- page = alloc_page_vma(gfp | __GFP_ZERO, &pvma, 0); ++ page = alloc_page_vma(gfp, &pvma, 0); + mpol_free(pvma.vm_policy); + return page; + } +@@ -1091,7 +1091,7 @@ shmem_swapin(struct shmem_inode_info *in + static inline struct page * + shmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx) + { +- return alloc_page(gfp | __GFP_ZERO); ++ return alloc_page(gfp); + } + #endif + +@@ -1304,6 +1304,7 @@ repeat: + + info->alloced++; + spin_unlock(&info->lock); ++ clear_highpage(filepage); + flush_dcache_page(filepage); + SetPageUptodate(filepage); + } diff --git a/queue-2.6.23/usb-fix-up-ehci-startup-synchronization.patch b/queue-2.6.23/usb-fix-up-ehci-startup-synchronization.patch new file mode 100644 index 00000000000..fff2188ea9c --- /dev/null +++ b/queue-2.6.23/usb-fix-up-ehci-startup-synchronization.patch @@ -0,0 +1,48 @@ +From stable-bounces@linux.kernel.org Wed Nov 28 14:52:46 2007 +From: David Brownell +Date: Wed, 28 Nov 2007 14:50:03 -0800 +Subject: USB: fix up EHCI startup synchronization +To: linux-usb@vger.kernel.org +Cc: David Brownell , Greg Kroah-Hartman , stable , David Brownell , Alan Stern , Dely Sy , Dave Miller +Message-ID: <1196290207-28564-21-git-send-email-gregkh@suse.de> + + +From: David Brownell + +patch 1cb52658b4f5b10a9e91f8e1c21ca2bcc1b9a3ca in mainline. + +A recent patch added software synchronization during EHCI startup, +so ports aren't switched away from the companion controllers after +resets have started. This patch adds a short delay letting hardware +finish that port switching before any new resets begin ... so both +ends of that hardware race window are closed. + +Signed-off-by: David Brownell +Cc: Dave Miller +Cc: Dely Sy +Cc: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-hcd.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -575,12 +575,15 @@ static int ehci_run (struct usb_hcd *hcd + * from the companions to the EHCI controller. If any of the + * companions are in the middle of a port reset at the time, it + * could cause trouble. Write-locking ehci_cf_port_reset_rwsem +- * guarantees that no resets are in progress. ++ * guarantees that no resets are in progress. After we set CF, ++ * a short delay lets the hardware catch up; new resets shouldn't ++ * be started before the port switching actions could complete. + */ + down_write(&ehci_cf_port_reset_rwsem); + hcd->state = HC_STATE_RUNNING; + ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); + ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ ++ msleep(5); + up_write(&ehci_cf_port_reset_rwsem); + + temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase)); diff --git a/queue-2.6.23/usb-make-the-microtek-driver-and-hal-cooperate.patch b/queue-2.6.23/usb-make-the-microtek-driver-and-hal-cooperate.patch new file mode 100644 index 00000000000..030c6fc7d80 --- /dev/null +++ b/queue-2.6.23/usb-make-the-microtek-driver-and-hal-cooperate.patch @@ -0,0 +1,34 @@ +From stable-bounces@linux.kernel.org Wed Nov 28 14:52:43 2007 +From: Oliver Neukum +Date: Wed, 28 Nov 2007 14:50:02 -0800 +Subject: USB: make the microtek driver and HAL cooperate +To: linux-usb@vger.kernel.org +Cc: Oliver Neukum , Oliver Neukum , stable , Greg Kroah-Hartman +Message-ID: <1196290207-28564-20-git-send-email-gregkh@suse.de> + + +From: Oliver Neukum + +patch 5cf1973a44bd298e3cfce6f6af8faa8c9d0a6d55 in mainline + +to make HAL like the microtek driver's devices the parent must be +correctly set. + +Signed-off-by: Oliver Neukum +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/image/microtek.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/image/microtek.c ++++ b/drivers/usb/image/microtek.c +@@ -824,7 +824,7 @@ static int mts_usb_probe(struct usb_inte + goto out_kfree2; + + new_desc->host->hostdata[0] = (unsigned long)new_desc; +- if (scsi_add_host(new_desc->host, NULL)) { ++ if (scsi_add_host(new_desc->host, &dev->dev)) { + err_retval = -EIO; + goto out_host_put; + }