From: Greg Kroah-Hartman Date: Tue, 17 Apr 2012 23:09:56 +0000 (-0700) Subject: 3.3-stable patches X-Git-Tag: v3.2.16~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51eef5cb9ce6c7cdc05b46bb8ca3cd1ecc68cef4;p=thirdparty%2Fkernel%2Fstable-queue.git 3.3-stable patches added patches: cciss-fix-scsi-tape-io-with-more-than-255-scatter-gather-elements.patch cciss-initialize-scsi-host-max_sectors-for-tape-drive-support.patch drivers-rtc-rtc-pl031.c-enable-clock-on-all-st-variants.patch hugetlb-fix-race-condition-in-hugetlb_fault.patch panic-fix-stack-dump-print-on-direct-call-to-panic.patch revert-serial-8250_pci-init-quirk-msi-support-for-kt-serial-controller.patch revert-serial-8250_pci-setup-quirk-workaround-for-the-kt-serial-controller.patch serial-8250_pci-add-a-force-background-timer-flag-and-use-it-for-the-kt-serial-port.patch serial-samsung-fix-omission-initialize-ulcon-in-reset-port-fn.patch sparc64-eliminate-obsolete-__handle_softirq-function.patch sparc64-fix-bootup-crash-on-sun4v.patch staging-iio-hmc5843-fix-crash-in-probe-function.patch tty-serial-altera_uart-check-for-null-platform_data-in-probe.patch --- diff --git a/queue-3.3/cciss-fix-scsi-tape-io-with-more-than-255-scatter-gather-elements.patch b/queue-3.3/cciss-fix-scsi-tape-io-with-more-than-255-scatter-gather-elements.patch new file mode 100644 index 00000000000..2fd9aa2263e --- /dev/null +++ b/queue-3.3/cciss-fix-scsi-tape-io-with-more-than-255-scatter-gather-elements.patch @@ -0,0 +1,35 @@ +From bc67f63650fad6b3478d9ddfd5406d45a95987c9 Mon Sep 17 00:00:00 2001 +From: "Stephen M. Cameron" +Date: Thu, 22 Mar 2012 21:40:09 +0100 +Subject: cciss: Fix scsi tape io with more than 255 scatter gather elements + +From: "Stephen M. Cameron" + +commit bc67f63650fad6b3478d9ddfd5406d45a95987c9 upstream. + +The total number of scatter gather elements in the CISS command +used by the scsi tape code was being cast to a u8, which can hold +at most 255 scatter gather elements. It should have been cast to +a u16. Without this patch the command gets rejected by the controller +since the total scatter gather count did not add up to the right +value resulting in an i/o error. + +Signed-off-by: Stephen M. Cameron +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/cciss_scsi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/block/cciss_scsi.c ++++ b/drivers/block/cciss_scsi.c +@@ -1411,7 +1411,7 @@ static void cciss_scatter_gather(ctlr_in + /* track how many SG entries we are using */ + if (request_nsgs > h->maxSG) + h->maxSG = request_nsgs; +- c->Header.SGTotal = (__u8) request_nsgs + chained; ++ c->Header.SGTotal = (u16) request_nsgs + chained; + if (request_nsgs > h->max_cmd_sgentries) + c->Header.SGList = h->max_cmd_sgentries; + else diff --git a/queue-3.3/cciss-initialize-scsi-host-max_sectors-for-tape-drive-support.patch b/queue-3.3/cciss-initialize-scsi-host-max_sectors-for-tape-drive-support.patch new file mode 100644 index 00000000000..acff3fb34c6 --- /dev/null +++ b/queue-3.3/cciss-initialize-scsi-host-max_sectors-for-tape-drive-support.patch @@ -0,0 +1,32 @@ +From 395d287526bb60411ff37b19ad9dd38b58ba8732 Mon Sep 17 00:00:00 2001 +From: "Stephen M. Cameron" +Date: Thu, 22 Mar 2012 21:40:08 +0100 +Subject: cciss: Initialize scsi host max_sectors for tape drive support + +From: "Stephen M. Cameron" + +commit 395d287526bb60411ff37b19ad9dd38b58ba8732 upstream. + +The default is too small (1024 blocks), use h->cciss_max_sectors (8192 blocks) +Without this change, if you try to set the block size of a tape drive above +512*1024, via "mt -f /dev/st0 setblk nnn" where nnn is greater than 524288, +it won't work right. + +Signed-off-by: Stephen M. Cameron +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/cciss_scsi.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/block/cciss_scsi.c ++++ b/drivers/block/cciss_scsi.c +@@ -866,6 +866,7 @@ cciss_scsi_detect(ctlr_info_t *h) + sh->can_queue = cciss_tape_cmds; + sh->sg_tablesize = h->maxsgentries; + sh->max_cmd_len = MAX_COMMAND_SIZE; ++ sh->max_sectors = h->cciss_max_sectors; + + ((struct cciss_scsi_adapter_data_t *) + h->scsi_ctlr)->scsi_host = sh; diff --git a/queue-3.3/drivers-rtc-rtc-pl031.c-enable-clock-on-all-st-variants.patch b/queue-3.3/drivers-rtc-rtc-pl031.c-enable-clock-on-all-st-variants.patch new file mode 100644 index 00000000000..3a1cb495c22 --- /dev/null +++ b/queue-3.3/drivers-rtc-rtc-pl031.c-enable-clock-on-all-st-variants.patch @@ -0,0 +1,36 @@ +From 2f3972168353d355854d6381f1f360ce83b723e5 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Thu, 12 Apr 2012 12:49:16 -0700 +Subject: drivers/rtc/rtc-pl031.c: enable clock on all ST variants + +From: Linus Walleij + +commit 2f3972168353d355854d6381f1f360ce83b723e5 upstream. + +The ST variants of the PL031 all require bit 26 in the control register +to be set before they work properly. Discovered this when testing on +the Nomadik board where it would suprisingly just stand still. + +Signed-off-by: Linus Walleij +Cc: Mian Yousaf Kaukab +Cc: Alessandro Rubini +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/rtc/rtc-pl031.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/rtc/rtc-pl031.c ++++ b/drivers/rtc/rtc-pl031.c +@@ -339,8 +339,7 @@ static int pl031_probe(struct amba_devic + dev_dbg(&adev->dev, "revision = 0x%01x\n", ldata->hw_revision); + + /* Enable the clockwatch on ST Variants */ +- if ((ldata->hw_designer == AMBA_VENDOR_ST) && +- (ldata->hw_revision > 1)) ++ if (ldata->hw_designer == AMBA_VENDOR_ST) + writel(readl(ldata->base + RTC_CR) | RTC_CR_CWEN, + ldata->base + RTC_CR); + diff --git a/queue-3.3/hugetlb-fix-race-condition-in-hugetlb_fault.patch b/queue-3.3/hugetlb-fix-race-condition-in-hugetlb_fault.patch new file mode 100644 index 00000000000..a70cbfdc31a --- /dev/null +++ b/queue-3.3/hugetlb-fix-race-condition-in-hugetlb_fault.patch @@ -0,0 +1,87 @@ +From 66aebce747eaf9bc456bf1f1b217d8db843031d0 Mon Sep 17 00:00:00 2001 +From: Chris Metcalf +Date: Thu, 12 Apr 2012 12:49:15 -0700 +Subject: hugetlb: fix race condition in hugetlb_fault() + +From: Chris Metcalf + +commit 66aebce747eaf9bc456bf1f1b217d8db843031d0 upstream. + +The race is as follows: + +Suppose a multi-threaded task forks a new process (on cpu A), thus +bumping up the ref count on all the pages. While the fork is occurring +(and thus we have marked all the PTEs as read-only), another thread in +the original process (on cpu B) tries to write to a huge page, taking an +access violation from the write-protect and calling hugetlb_cow(). Now, +suppose the fork() fails. It will undo the COW and decrement the ref +count on the pages, so the ref count on the huge page drops back to 1. +Meanwhile hugetlb_cow() also decrements the ref count by one on the +original page, since the original address space doesn't need it any +more, having copied a new page to replace the original page. This +leaves the ref count at zero, and when we call unlock_page(), we panic. + + fork on CPU A fault on CPU B + ============= ============== + ... + down_write(&parent->mmap_sem); + down_write_nested(&child->mmap_sem); + ... + while duplicating vmas + if error + break; + ... + up_write(&child->mmap_sem); + up_write(&parent->mmap_sem); ... + down_read(&parent->mmap_sem); + ... + lock_page(page); + handle COW + page_mapcount(old_page) == 2 + alloc and prepare new_page + ... + handle error + page_remove_rmap(page); + put_page(page); + ... + fold new_page into pte + page_remove_rmap(page); + put_page(page); + ... + oops ==> unlock_page(page); + up_read(&parent->mmap_sem); + +The solution is to take an extra reference to the page while we are +holding the lock on it. + +Signed-off-by: Chris Metcalf +Cc: Hillf Danton +Cc: Michal Hocko +Cc: KAMEZAWA Hiroyuki +Cc: Hugh Dickins +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/hugetlb.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -2700,6 +2700,7 @@ int hugetlb_fault(struct mm_struct *mm, + * so no worry about deadlock. + */ + page = pte_page(entry); ++ get_page(page); + if (page != pagecache_page) + lock_page(page); + +@@ -2731,6 +2732,7 @@ out_page_table_lock: + } + if (page != pagecache_page) + unlock_page(page); ++ put_page(page); + + out_mutex: + mutex_unlock(&hugetlb_instantiation_mutex); diff --git a/queue-3.3/panic-fix-stack-dump-print-on-direct-call-to-panic.patch b/queue-3.3/panic-fix-stack-dump-print-on-direct-call-to-panic.patch new file mode 100644 index 00000000000..3dffa280825 --- /dev/null +++ b/queue-3.3/panic-fix-stack-dump-print-on-direct-call-to-panic.patch @@ -0,0 +1,54 @@ +From 026ee1f66aaa7f01b617a0ba89ac4b531f9603f1 Mon Sep 17 00:00:00 2001 +From: Jason Wessel +Date: Thu, 12 Apr 2012 12:49:17 -0700 +Subject: panic: fix stack dump print on direct call to panic() + +From: Jason Wessel + +commit 026ee1f66aaa7f01b617a0ba89ac4b531f9603f1 upstream. + +Commit 6e6f0a1f0fa6 ("panic: don't print redundant backtraces on oops") +causes a regression where no stack trace will be printed at all for the +case where kernel code calls panic() directly while not processing an +oops, and of course there are 100's of instances of this type of call. + +The original commit executed the check (!oops_in_progress), but this will +always be false because just before the dump_stack() there is a call to +bust_spinlocks(1), which does the following: + + void __attribute__((weak)) bust_spinlocks(int yes) + { + if (yes) { + ++oops_in_progress; + +The proper way to resolve the problem that original commit tried to +solve is to avoid printing a stack dump from panic() when the either of +the following conditions is true: + + 1) TAINT_DIE has been set (this is done by oops_end()) + This indicates and oops has already been printed. + 2) oops_in_progress > 1 + This guards against the rare case where panic() is invoked + a second time, or in between oops_begin() and oops_end() + +Signed-off-by: Jason Wessel +Cc: Andi Kleen +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/panic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/panic.c ++++ b/kernel/panic.c +@@ -97,7 +97,7 @@ void panic(const char *fmt, ...) + /* + * Avoid nested stack-dumping if a panic occurs during oops processing + */ +- if (!oops_in_progress) ++ if (!test_taint(TAINT_DIE) && oops_in_progress <= 1) + dump_stack(); + #endif + diff --git a/queue-3.3/revert-serial-8250_pci-init-quirk-msi-support-for-kt-serial-controller.patch b/queue-3.3/revert-serial-8250_pci-init-quirk-msi-support-for-kt-serial-controller.patch new file mode 100644 index 00000000000..0574e2e74e5 --- /dev/null +++ b/queue-3.3/revert-serial-8250_pci-init-quirk-msi-support-for-kt-serial-controller.patch @@ -0,0 +1,65 @@ +From 3579812373aba92b2f3b632bdf99329bc3c05d62 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Fri, 6 Apr 2012 11:49:37 -0700 +Subject: Revert "serial/8250_pci: init-quirk msi support for kt serial controller" + +From: Dan Williams + +commit 3579812373aba92b2f3b632bdf99329bc3c05d62 upstream. + +This reverts commit e86ff4a63c9fdd875ba8492577cd1ad2252f525c. + +This tried to enforce the semantics of one interrupt per iir read of the +THRE (transmit-hold empty) status, but events from other sources +(particularly modem status) defeat this guarantee. + +This change also broke 8250_pci suspend/resume support as +pciserial_resume_ports() re-runs .init() quirks, but does not run +.exit() quirks in pciserial_suspend_ports() leading to reports like: + + sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:16.3/msi_irqs' + +...and a subsequent crash. The mismatch of init/exit at suspend/resume +seems like a bug in its own right. + +Acked-by: Alan Cox +Cc: Sudhakar Mamillapalli +Reported-by: Nhan H Mai +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/8250/8250_pci.c | 14 -------------- + 1 file changed, 14 deletions(-) + +--- a/drivers/tty/serial/8250/8250_pci.c ++++ b/drivers/tty/serial/8250/8250_pci.c +@@ -1118,18 +1118,6 @@ pci_xr17c154_setup(struct serial_private + return pci_default_setup(priv, board, port, idx); + } + +-static int try_enable_msi(struct pci_dev *dev) +-{ +- /* use msi if available, but fallback to legacy otherwise */ +- pci_enable_msi(dev); +- return 0; +-} +- +-static void disable_msi(struct pci_dev *dev) +-{ +- pci_disable_msi(dev); +-} +- + #define PCI_VENDOR_ID_SBSMODULARIO 0x124B + #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B + #define PCI_DEVICE_ID_OCTPRO 0x0001 +@@ -1249,9 +1237,7 @@ static struct pci_serial_quirk pci_seria + .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, +- .init = try_enable_msi, + .setup = kt_serial_setup, +- .exit = disable_msi, + }, + /* + * ITE diff --git a/queue-3.3/revert-serial-8250_pci-setup-quirk-workaround-for-the-kt-serial-controller.patch b/queue-3.3/revert-serial-8250_pci-setup-quirk-workaround-for-the-kt-serial-controller.patch new file mode 100644 index 00000000000..a6552f59911 --- /dev/null +++ b/queue-3.3/revert-serial-8250_pci-setup-quirk-workaround-for-the-kt-serial-controller.patch @@ -0,0 +1,105 @@ +From 49b532f96fda23663f8be35593d1c1372c0f91e0 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Fri, 6 Apr 2012 11:49:44 -0700 +Subject: Revert "serial/8250_pci: setup-quirk workaround for the kt serial controller" + +From: Dan Williams + +commit 49b532f96fda23663f8be35593d1c1372c0f91e0 upstream. + +This reverts commit 448ac154c957c4580531fa0c8f2045816fe2f0e7. + +The semantic of UPF_IIR_ONCE is only guaranteed to workaround the race +condition in the kt serial's iir register if the only source of +interrupts is THRE (fifo-empty) events. An modem status event at the +wrong time can again cause an iir read to drop the 'empty' status +leading to a hang. So, revert this in preparation for using the +existing "I don't trust my iir register" workaround in the 8250 core +(UART_BUG_THRE). + +Acked-by: Alan Cox +Cc: Sudhakar Mamillapalli +Reported-by: Nhan H Mai +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/8250/8250.c | 4 +--- + drivers/tty/serial/8250/8250_pci.c | 17 +---------------- + include/linux/serial_core.h | 1 - + 3 files changed, 2 insertions(+), 20 deletions(-) + +--- a/drivers/tty/serial/8250/8250.c ++++ b/drivers/tty/serial/8250/8250.c +@@ -1592,13 +1592,11 @@ static irqreturn_t serial8250_interrupt( + do { + struct uart_8250_port *up; + struct uart_port *port; +- bool skip; + + up = list_entry(l, struct uart_8250_port, list); + port = &up->port; +- skip = pass_counter && up->port.flags & UPF_IIR_ONCE; + +- if (!skip && port->handle_irq(port)) { ++ if (port->handle_irq(port)) { + handled = 1; + end = NULL; + } else if (end == NULL) +--- a/drivers/tty/serial/8250/8250_pci.c ++++ b/drivers/tty/serial/8250/8250_pci.c +@@ -1092,14 +1092,6 @@ static int skip_tx_en_setup(struct seria + return pci_default_setup(priv, board, port, idx); + } + +-static int kt_serial_setup(struct serial_private *priv, +- const struct pciserial_board *board, +- struct uart_port *port, int idx) +-{ +- port->flags |= UPF_IIR_ONCE; +- return skip_tx_en_setup(priv, board, port, idx); +-} +- + static int pci_eg20t_init(struct pci_dev *dev) + { + #if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE) +@@ -1118,6 +1110,7 @@ pci_xr17c154_setup(struct serial_private + return pci_default_setup(priv, board, port, idx); + } + ++/* This should be in linux/pci_ids.h */ + #define PCI_VENDOR_ID_SBSMODULARIO 0x124B + #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B + #define PCI_DEVICE_ID_OCTPRO 0x0001 +@@ -1147,7 +1140,6 @@ pci_xr17c154_setup(struct serial_private + #define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538 + #define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6 + #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001 +-#define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d + + /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ + #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 +@@ -1232,13 +1224,6 @@ static struct pci_serial_quirk pci_seria + .subdevice = PCI_ANY_ID, + .setup = ce4100_serial_setup, + }, +- { +- .vendor = PCI_VENDOR_ID_INTEL, +- .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT, +- .subvendor = PCI_ANY_ID, +- .subdevice = PCI_ANY_ID, +- .setup = kt_serial_setup, +- }, + /* + * ITE + */ +--- a/include/linux/serial_core.h ++++ b/include/linux/serial_core.h +@@ -355,7 +355,6 @@ struct uart_port { + #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) + #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) + #define UPF_EXAR_EFR ((__force upf_t) (1 << 25)) +-#define UPF_IIR_ONCE ((__force upf_t) (1 << 26)) + /* The exact UART type is known and should not be probed. */ + #define UPF_FIXED_TYPE ((__force upf_t) (1 << 27)) + #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) diff --git a/queue-3.3/serial-8250_pci-add-a-force-background-timer-flag-and-use-it-for-the-kt-serial-port.patch b/queue-3.3/serial-8250_pci-add-a-force-background-timer-flag-and-use-it-for-the-kt-serial-port.patch new file mode 100644 index 00000000000..71b642b1250 --- /dev/null +++ b/queue-3.3/serial-8250_pci-add-a-force-background-timer-flag-and-use-it-for-the-kt-serial-port.patch @@ -0,0 +1,108 @@ +From bc02d15a3452fdf9276e8fb89c5e504a88df888a Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Fri, 6 Apr 2012 11:49:50 -0700 +Subject: serial/8250_pci: add a "force background timer" flag and use it for the "kt" serial port + +From: Dan Williams + +commit bc02d15a3452fdf9276e8fb89c5e504a88df888a upstream. + +Workaround dropped notifications in the iir register. Register reads +coincident with new interrupt notifications sometimes result in this +device clearing the interrupt event without reporting it in the read +data. + +The serial core already has a heuristic for determining when a device +has an untrustworthy iir register. In this case when we apriori know +that the iir is faulty use a flag (UPF_BUG_THRE) to bypass the test and +force usage of the background timer. + +Acked-by: Alan Cox +Reported-by: Nhan H Mai +Reported-by: Sudhakar Mamillapalli +Tested-by: Nhan H Mai +Tested-by: Sudhakar Mamillapalli +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/8250/8250.c | 8 +++++--- + drivers/tty/serial/8250/8250_pci.c | 17 ++++++++++++++++- + include/linux/serial_core.h | 1 + + 3 files changed, 22 insertions(+), 4 deletions(-) + +--- a/drivers/tty/serial/8250/8250.c ++++ b/drivers/tty/serial/8250/8250.c +@@ -2055,10 +2055,12 @@ static int serial8250_startup(struct uar + spin_unlock_irqrestore(&up->port.lock, flags); + + /* +- * If the interrupt is not reasserted, setup a timer to +- * kick the UART on a regular basis. ++ * If the interrupt is not reasserted, or we otherwise ++ * don't trust the iir, setup a timer to kick the UART ++ * on a regular basis. + */ +- if (!(iir1 & UART_IIR_NO_INT) && (iir & UART_IIR_NO_INT)) { ++ if ((!(iir1 & UART_IIR_NO_INT) && (iir & UART_IIR_NO_INT)) || ++ up->port.flags & UPF_BUG_THRE) { + up->bugs |= UART_BUG_THRE; + pr_debug("ttyS%d - using backup timer\n", + serial_index(port)); +--- a/drivers/tty/serial/8250/8250_pci.c ++++ b/drivers/tty/serial/8250/8250_pci.c +@@ -1092,6 +1092,14 @@ static int skip_tx_en_setup(struct seria + return pci_default_setup(priv, board, port, idx); + } + ++static int kt_serial_setup(struct serial_private *priv, ++ const struct pciserial_board *board, ++ struct uart_port *port, int idx) ++{ ++ port->flags |= UPF_BUG_THRE; ++ return skip_tx_en_setup(priv, board, port, idx); ++} ++ + static int pci_eg20t_init(struct pci_dev *dev) + { + #if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE) +@@ -1110,7 +1118,6 @@ pci_xr17c154_setup(struct serial_private + return pci_default_setup(priv, board, port, idx); + } + +-/* This should be in linux/pci_ids.h */ + #define PCI_VENDOR_ID_SBSMODULARIO 0x124B + #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B + #define PCI_DEVICE_ID_OCTPRO 0x0001 +@@ -1140,6 +1147,7 @@ pci_xr17c154_setup(struct serial_private + #define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538 + #define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6 + #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001 ++#define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d + + /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ + #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 +@@ -1224,6 +1232,13 @@ static struct pci_serial_quirk pci_seria + .subdevice = PCI_ANY_ID, + .setup = ce4100_serial_setup, + }, ++ { ++ .vendor = PCI_VENDOR_ID_INTEL, ++ .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT, ++ .subvendor = PCI_ANY_ID, ++ .subdevice = PCI_ANY_ID, ++ .setup = kt_serial_setup, ++ }, + /* + * ITE + */ +--- a/include/linux/serial_core.h ++++ b/include/linux/serial_core.h +@@ -355,6 +355,7 @@ struct uart_port { + #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) + #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) + #define UPF_EXAR_EFR ((__force upf_t) (1 << 25)) ++#define UPF_BUG_THRE ((__force upf_t) (1 << 26)) + /* The exact UART type is known and should not be probed. */ + #define UPF_FIXED_TYPE ((__force upf_t) (1 << 27)) + #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) diff --git a/queue-3.3/serial-samsung-fix-omission-initialize-ulcon-in-reset-port-fn.patch b/queue-3.3/serial-samsung-fix-omission-initialize-ulcon-in-reset-port-fn.patch new file mode 100644 index 00000000000..db262c429a1 --- /dev/null +++ b/queue-3.3/serial-samsung-fix-omission-initialize-ulcon-in-reset-port-fn.patch @@ -0,0 +1,31 @@ +From 7b246a1d0dfe75346a22bf6589b858a0389e6df1 Mon Sep 17 00:00:00 2001 +From: Kukjin Kim +Date: Tue, 3 Apr 2012 18:14:24 -0700 +Subject: serial: samsung: fix omission initialize ulcon in reset port fn() + +From: Kukjin Kim + +commit 7b246a1d0dfe75346a22bf6589b858a0389e6df1 upstream. + +Fix omission initialize ulcon in s3c24xx_serial_resetport(), +reset port function in drivers/tty/serial/samsung.c. It has +been happened from commit 0dfb3b41("serial: samsung: merge +all SoC specific port reset functions") + +Signed-off-by: Kukjin Kim +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/samsung.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/tty/serial/samsung.c ++++ b/drivers/tty/serial/samsung.c +@@ -982,6 +982,7 @@ static void s3c24xx_serial_resetport(str + + ucon &= ucon_mask; + wr_regl(port, S3C2410_UCON, ucon | cfg->ucon); ++ wr_regl(port, S3C2410_ULCON, cfg->ulcon); + + /* reset both fifos */ + wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); diff --git a/queue-3.3/series b/queue-3.3/series index a85dda49794..a2d74eccae4 100644 --- a/queue-3.3/series +++ b/queue-3.3/series @@ -18,3 +18,16 @@ revert-btrfs-increase-the-global-block-reserve-estimates.patch alsa-hda-realtek-add-a-fixup-entry-for-acer-aspire-8940g.patch ext4-address-scalability-issue-by-removing-extent-cache-statistics.patch ia64-fix-futex_atomic_cmpxchg_inatomic.patch +panic-fix-stack-dump-print-on-direct-call-to-panic.patch +drivers-rtc-rtc-pl031.c-enable-clock-on-all-st-variants.patch +hugetlb-fix-race-condition-in-hugetlb_fault.patch +staging-iio-hmc5843-fix-crash-in-probe-function.patch +revert-serial-8250_pci-init-quirk-msi-support-for-kt-serial-controller.patch +serial-samsung-fix-omission-initialize-ulcon-in-reset-port-fn.patch +revert-serial-8250_pci-setup-quirk-workaround-for-the-kt-serial-controller.patch +serial-8250_pci-add-a-force-background-timer-flag-and-use-it-for-the-kt-serial-port.patch +tty-serial-altera_uart-check-for-null-platform_data-in-probe.patch +sparc64-eliminate-obsolete-__handle_softirq-function.patch +sparc64-fix-bootup-crash-on-sun4v.patch +cciss-initialize-scsi-host-max_sectors-for-tape-drive-support.patch +cciss-fix-scsi-tape-io-with-more-than-255-scatter-gather-elements.patch diff --git a/queue-3.3/sparc64-eliminate-obsolete-__handle_softirq-function.patch b/queue-3.3/sparc64-eliminate-obsolete-__handle_softirq-function.patch new file mode 100644 index 00000000000..dbbd31835f7 --- /dev/null +++ b/queue-3.3/sparc64-eliminate-obsolete-__handle_softirq-function.patch @@ -0,0 +1,60 @@ +From 3d3eeb2ef26112a200785e5fca58ec58dd33bf1e Mon Sep 17 00:00:00 2001 +From: "Paul E. McKenney" +Date: Fri, 13 Apr 2012 03:35:13 +0000 +Subject: sparc64: Eliminate obsolete __handle_softirq() function + +From: "Paul E. McKenney" + +commit 3d3eeb2ef26112a200785e5fca58ec58dd33bf1e upstream. + +The invocation of softirq is now handled by irq_exit(), so there is no +need for sparc64 to invoke it on the trap-return path. In fact, doing so +is a bug because if the trap occurred in the idle loop, this invocation +can result in lockdep-RCU failures. The problem is that RCU ignores idle +CPUs, and the sparc64 trap-return path to the softirq handlers fails to +tell RCU that the CPU must be considered non-idle while those handlers +are executing. This means that RCU is ignoring any RCU read-side critical +sections in those handlers, which in turn means that RCU-protected data +can be yanked out from under those read-side critical sections. + +The shiny new lockdep-RCU ability to detect RCU read-side critical sections +that RCU is ignoring located this problem. + +The fix is straightforward: Make sparc64 stop manually invoking the +softirq handlers. + +Reported-by: Meelis Roos +Suggested-by: David Miller +Signed-off-by: Paul E. McKenney +Tested-by: Meelis Roos +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc/kernel/rtrap_64.S | 7 ------- + 1 file changed, 7 deletions(-) + +--- a/arch/sparc/kernel/rtrap_64.S ++++ b/arch/sparc/kernel/rtrap_64.S +@@ -20,11 +20,6 @@ + + .text + .align 32 +-__handle_softirq: +- call do_softirq +- nop +- ba,a,pt %xcc, __handle_softirq_continue +- nop + __handle_preemption: + call schedule + wrpr %g0, RTRAP_PSTATE, %pstate +@@ -89,9 +84,7 @@ rtrap: + cmp %l1, 0 + + /* mm/ultra.S:xcall_report_regs KNOWS about this load. */ +- bne,pn %icc, __handle_softirq + ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 +-__handle_softirq_continue: + rtrap_xcall: + sethi %hi(0xf << 20), %l4 + and %l1, %l4, %l4 diff --git a/queue-3.3/sparc64-fix-bootup-crash-on-sun4v.patch b/queue-3.3/sparc64-fix-bootup-crash-on-sun4v.patch new file mode 100644 index 00000000000..8bee1dcbdb3 --- /dev/null +++ b/queue-3.3/sparc64-fix-bootup-crash-on-sun4v.patch @@ -0,0 +1,31 @@ +From 9e0daff30fd7ecf698e5d20b0fa7f851e427cca5 Mon Sep 17 00:00:00 2001 +From: "David S. Miller" +Date: Fri, 13 Apr 2012 11:56:22 -0700 +Subject: sparc64: Fix bootup crash on sun4v. + +From: "David S. Miller" + +commit 9e0daff30fd7ecf698e5d20b0fa7f851e427cca5 upstream. + +The DS driver registers as a subsys_initcall() but this can be too +early, in particular this risks registering before we've had a chance +to allocate and setup module_kset in kernel/params.c which is +performed also as a subsyts_initcall(). + +Register DS using device_initcall() insteal. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc/kernel/ds.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/sparc/kernel/ds.c ++++ b/arch/sparc/kernel/ds.c +@@ -1267,4 +1267,4 @@ static int __init ds_init(void) + return vio_register_driver(&ds_driver); + } + +-subsys_initcall(ds_init); ++fs_initcall(ds_init); diff --git a/queue-3.3/staging-iio-hmc5843-fix-crash-in-probe-function.patch b/queue-3.3/staging-iio-hmc5843-fix-crash-in-probe-function.patch new file mode 100644 index 00000000000..23dd570913b --- /dev/null +++ b/queue-3.3/staging-iio-hmc5843-fix-crash-in-probe-function.patch @@ -0,0 +1,105 @@ +From 62d2feb9803f18c4e3c8a1a2c7e30a54df8a1d72 Mon Sep 17 00:00:00 2001 +From: Marek Belisko +Date: Thu, 12 Apr 2012 21:48:03 +0200 +Subject: staging: iio: hmc5843: Fix crash in probe function. + +From: Marek Belisko + +commit 62d2feb9803f18c4e3c8a1a2c7e30a54df8a1d72 upstream. + +Fix crash after issuing: + echo hmc5843 0x1e > /sys/class/i2c-dev/i2c-2/device/new_device + + [ 37.180999] device: '2-001e': device_add + [ 37.188293] bus: 'i2c': add device 2-001e + [ 37.194549] PM: Adding info for i2c:2-001e + [ 37.200958] bus: 'i2c': driver_probe_device: matched device 2-001e with driver hmc5843 + [ 37.210815] bus: 'i2c': really_probe: probing driver hmc5843 with device 2-001e + [ 37.224884] HMC5843 initialized + [ 37.228759] ------------[ cut here ]------------ + [ 37.233612] kernel BUG at mm/slab.c:505! + [ 37.237701] Internal error: Oops - BUG: 0 [#1] PREEMPT + [ 37.243103] Modules linked in: + [ 37.246337] CPU: 0 Not tainted (3.3.1-gta04+ #28) + [ 37.251647] PC is at kfree+0x84/0x144 + [ 37.255493] LR is at kfree+0x20/0x144 + [ 37.259338] pc : [] lr : [] psr: 40000093 + [ 37.259368] sp : de249cd8 ip : 0000000c fp : 00000090 + [ 37.271362] r10: 0000000a r9 : de229eac r8 : c0236274 + [ 37.276855] r7 : c09d6490 r6 : a0000013 r5 : de229c00 r4 : de229c10 + [ 37.283691] r3 : c0f00218 r2 : 00000400 r1 : c0eea000 r0 : c00b4028 + [ 37.290527] Flags: nZcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user + [ 37.298095] Control: 10c5387d Table: 9e1d0019 DAC: 00000015 + [ 37.304107] Process sh (pid: 91, stack limit = 0xde2482f0) + [ 37.309844] Stack: (0xde249cd8 to 0xde24a000) + [ 37.314422] 9cc0: de229c10 de229c00 + [ 37.322998] 9ce0: de229c10 ffffffea 00000005 c0236274 de140a80 c00b4798 dec00080 de140a80 + [ 37.331573] 9d00: c032f37c dec00080 000080d0 00000001 de229c00 de229c10 c048d578 00000005 + [ 37.340148] 9d20: de229eac 0000000a 00000090 c032fa40 00000001 00000000 00000001 de229c10 + [ 37.348724] 9d40: de229eac 00000029 c075b558 00000001 00000003 00000004 de229c10 c048d594 + [ 37.357299] 9d60: 00000000 60000013 00000018 205b0007 37332020 3432322e 5d343838 c0060020 + [ 37.365905] 9d80: de251600 00000001 00000000 de251600 00000001 c0065a84 de229c00 de229c48 + [ 37.374481] 9da0: 00000006 0048d62c de229c38 de229c00 de229c00 de1f6c00 de1f6c20 00000001 + [ 37.383056] 9dc0: 00000000 c048d62c 00000000 de229c00 de229c00 de1f6c00 de1f6c20 00000001 + [ 37.391632] 9de0: 00000000 c048d62c 00000000 c0330164 00000000 de1f6c20 c048d62c de1f6c00 + [ 37.400207] 9e00: c0330078 de1f6c04 c078d714 de189b58 00000000 c02ccfd8 de1f6c20 c0795f40 + [ 37.408782] 9e20: c0238330 00000000 00000000 c02381a8 de1b9fc0 de1f6c20 de1f6c20 de249e48 + [ 37.417358] 9e40: c0238330 c0236bb0 decdbed8 de7d0f14 de1f6c20 de1f6c20 de1f6c54 de1f6c20 + [ 37.425933] 9e60: 00000000 c0238030 de1f6c20 c078d7bc de1f6c20 c02377ec de1f6c20 de1f6c28 + [ 37.434509] 9e80: dee64cb0 c0236138 c047c554 de189b58 00000000 c004b45c de1f6c20 de1f6cd8 + [ 37.443084] 9ea0: c0edfa6c de1f6c00 dee64c68 de1f6c04 de1f6c20 dee64cb8 c047c554 de189b58 + [ 37.451690] 9ec0: 00000000 c02cd634 dee64c68 de249ef4 de23b008 dee64cb0 0000000d de23b000 + [ 37.460266] 9ee0: de23b007 c02cd78c 00000002 00000000 00000000 35636d68 00333438 00000000 + [ 37.468841] 9f00: 00000000 00000000 001e0000 00000000 00000000 00000000 00000000 0a10cec0 + [ 37.477416] 9f20: 00000002 de249f80 0000000d dee62990 de189b40 c0234d88 0000000d c010c354 + [ 37.485992] 9f40: 0000000d de210f28 000acc88 de249f80 0000000d de248000 00000000 c00b7bf8 + [ 37.494567] 9f60: de210f28 000acc88 de210f28 000acc88 00000000 00000000 0000000d c00b7ed8 + [ 37.503143] 9f80: 00000000 00000000 0000000d 00000000 0007fa28 0000000d 000acc88 00000004 + [ 37.511718] 9fa0: c000e544 c000e380 0007fa28 0000000d 00000001 000acc88 0000000d 00000000 + [ 37.520294] 9fc0: 0007fa28 0000000d 000acc88 00000004 00000001 00000020 00000002 00000000 + [ 37.528869] 9fe0: 00000000 beab8624 0000ea05 b6eaebac 600d0010 00000001 00000000 00000000 + [ 37.537475] [] (kfree+0x84/0x144) from [] (device_add+0x530/0x57c) + [ 37.545806] [] (device_add+0x530/0x57c) from [] (iio_device_register+0x8c8/0x990) + [ 37.555480] [] (iio_device_register+0x8c8/0x990) from [] (hmc5843_probe+0xec/0x114) + [ 37.565338] [] (hmc5843_probe+0xec/0x114) from [] (i2c_device_probe+0xc4/0xf8) + [ 37.574737] [] (i2c_device_probe+0xc4/0xf8) from [] (driver_probe_device+0x118/0x218) + [ 37.584777] [] (driver_probe_device+0x118/0x218) from [] (bus_for_each_drv+0x4c/0x84) + [ 37.594818] [] (bus_for_each_drv+0x4c/0x84) from [] (device_attach+0x78/0xa4) + [ 37.604125] [] (device_attach+0x78/0xa4) from [] (bus_probe_device+0x28/0x9c) + [ 37.613433] [] (bus_probe_device+0x28/0x9c) from [] (device_add+0x3f4/0x57c) + [ 37.622650] [] (device_add+0x3f4/0x57c) from [] (i2c_new_device+0xf8/0x19c) + [ 37.631805] [] (i2c_new_device+0xf8/0x19c) from [] (i2c_sysfs_new_device+0xb4/0x130) + [ 37.641754] [] (i2c_sysfs_new_device+0xb4/0x130) from [] (dev_attr_store+0x18/0x24) + [ 37.651611] [] (dev_attr_store+0x18/0x24) from [] (sysfs_write_file+0x10c/0x140) + [ 37.661193] [] (sysfs_write_file+0x10c/0x140) from [] (vfs_write+0xb0/0x178) + [ 37.670410] [] (vfs_write+0xb0/0x178) from [] (sys_write+0x3c/0x68) + [ 37.678833] [] (sys_write+0x3c/0x68) from [] (ret_fast_syscall+0x0/0x3c) + [ 37.687683] Code: 1593301c e5932000 e3120080 1a000000 (e7f001f2) + [ 37.700775] ---[ end trace aaf805debdb69390 ]--- + +Client data was assigned to iio_dev structure in probe but in +hmc5843_init_client function casted to private driver data structure which +is wrong. Possibly calling mutex_init(&data->lock); corrupt data +which the lead to above crash. + +Signed-off-by: Marek Belisko +Acked-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/iio/magnetometer/hmc5843.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/staging/iio/magnetometer/hmc5843.c ++++ b/drivers/staging/iio/magnetometer/hmc5843.c +@@ -521,7 +521,9 @@ static int hmc5843_detect(struct i2c_cli + /* Called when we have found a new HMC5843. */ + static void hmc5843_init_client(struct i2c_client *client) + { +- struct hmc5843_data *data = i2c_get_clientdata(client); ++ struct iio_dev *indio_dev = i2c_get_clientdata(client); ++ struct hmc5843_data *data = iio_priv(indio_dev); ++ + hmc5843_set_meas_conf(client, data->meas_conf); + hmc5843_set_rate(client, data->rate); + hmc5843_configure(client, data->operating_mode); diff --git a/queue-3.3/tty-serial-altera_uart-check-for-null-platform_data-in-probe.patch b/queue-3.3/tty-serial-altera_uart-check-for-null-platform_data-in-probe.patch new file mode 100644 index 00000000000..e93305a2266 --- /dev/null +++ b/queue-3.3/tty-serial-altera_uart-check-for-null-platform_data-in-probe.patch @@ -0,0 +1,39 @@ +From acede70d6561f2d042d9dbb153d9a3469479c0ed Mon Sep 17 00:00:00 2001 +From: Yuriy Kozlov +Date: Thu, 29 Mar 2012 09:55:27 +0200 +Subject: tty: serial: altera_uart: Check for NULL platform_data in probe. + +From: Yuriy Kozlov + +commit acede70d6561f2d042d9dbb153d9a3469479c0ed upstream. + +Follow altera_jtag_uart. This fixes a crash if there is a mistake in the DTS. + +Signed-off-by: Yuriy Kozlov +Signed-off-by: Tobias Klauser +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/altera_uart.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/tty/serial/altera_uart.c ++++ b/drivers/tty/serial/altera_uart.c +@@ -555,7 +555,7 @@ static int __devinit altera_uart_probe(s + res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (res_mem) + port->mapbase = res_mem->start; +- else if (platp->mapbase) ++ else if (platp) + port->mapbase = platp->mapbase; + else + return -EINVAL; +@@ -563,7 +563,7 @@ static int __devinit altera_uart_probe(s + res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); + if (res_irq) + port->irq = res_irq->start; +- else if (platp->irq) ++ else if (platp) + port->irq = platp->irq; + + /* Check platform data first so we can override device node data */