3.2.16-stable review
Subsystems (40)
Greg KH
maintainercover 3.2.16-stable review
NOTE: This is going to be the last 3.2-stable kernel that I release. Someone else _might_ be picking it up, but that coordination is not finalized at this time, so be aware of this, and plan on this being the last 3.2-stable kernel that is released.
This is the start of the stable review cycle for the 3.2.16 release. There are 68 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Apr 21 21:08:16 UTC 2012. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.2.16-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Makefile | 4 +- arch/arm/boot/compressed/head.S | 2 +- arch/arm/mm/proc-v7.S | 12 +++ arch/ia64/include/asm/futex.h | 9 +- arch/s390/Kconfig | 1 - arch/s390/include/asm/pgalloc.h | 3 - arch/s390/include/asm/tlb.h | 22 +---- arch/s390/mm/pgtable.c | 63 +++++++++++++- arch/sparc/kernel/ds.c | 2 +- arch/sparc/kernel/rtrap_64.S | 7 -- drivers/acpi/acpica/acobject.h | 1 + drivers/acpi/acpica/dsargs.c | 2 +- drivers/acpi/acpica/excreate.c | 6 ++ drivers/block/cciss_scsi.c | 3 +- drivers/bluetooth/ath3k.c | 4 + drivers/bluetooth/btusb.c | 3 + drivers/bluetooth/hci_ldisc.c | 4 +- drivers/dma/Kconfig | 13 ++- drivers/dma/pch_dma.c | 8 +- drivers/gpio/Kconfig | 11 +-- drivers/gpio/gpio-pch.c | 2 + drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 13 +-- drivers/gpu/drm/i915/intel_dp.c | 49 ++++++++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/radeon/atombios_encoders.c | 4 + drivers/gpu/drm/radeon/radeon_connectors.c | 4 +- drivers/gpu/drm/radeon/radeon_i2c.c | 4 + drivers/gpu/drm/radeon/radeon_irq_kms.c | 6 ++ drivers/md/bitmap.c | 2 + .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 +++- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c | 15 ++-- drivers/net/wireless/ath/ath9k/calib.c | 5 +- drivers/net/wireless/rtlwifi/pci.c | 7 +- drivers/rtc/rtc-pl031.c | 3 +- drivers/spi/Kconfig | 6 +- drivers/spi/spi-topcliff-pch.c | 38 ++++---- drivers/staging/iio/magnetometer/hmc5843.c | 4 +- drivers/tty/serial/altera_uart.c | 4 +- drivers/tty/serial/amba-pl011.c | 15 +++- drivers/tty/serial/pch_uart.c | 1 + drivers/usb/core/driver.c | 9 +- drivers/usb/core/hub.c | 16 ++++ drivers/usb/core/message.c | 11 +-- drivers/usb/gadget/pch_udc.c | 91 ++++++++++++++++++-- drivers/usb/host/pci-quirks.c | 10 ++- drivers/usb/host/xhci-ext-caps.h | 5 +- drivers/usb/host/xhci-mem.c | 9 +- drivers/usb/host/xhci-pci.c | 2 + drivers/usb/host/xhci-ring.c | 2 +- drivers/usb/host/xhci.c | 9 +- drivers/usb/host/xhci.h | 4 + drivers/usb/serial/ftdi_sio.c | 36 ++++---- drivers/usb/serial/option.c | 1 + drivers/usb/serial/pl2303.c | 2 +- drivers/usb/serial/sierra.c | 1 + drivers/usb/serial/usb-serial.c | 8 ++ drivers/video/uvesafb.c | 11 ++- fs/ext4/ext4.h | 3 - fs/ext4/extents.c | 4 - fs/ext4/super.c | 16 ---- include/net/bluetooth/hci.h | 1 + kernel/futex.c | 36 +++----- kernel/futex_compat.c | 36 +++----- kernel/time/tick-sched.c | 4 +- mm/hugetlb.c | 2 + net/bluetooth/hci_core.c | 7 ++ security/commoncap.c | 6 ++ tools/perf/util/hist.c | 12 +++ 69 files changed, 489 insertions(+), 248 deletions(-)
Greg KH
maintainerPATCH 1/68 drm/i915: mask transcoder select bits before setting them on LVDS
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jesse Barnes <[email protected]>
commit 7885d2052bd94395e337709cfba093a41f273ff1 upstream.
The transcoder port may changed from mode set to mode set, so make sure to mask out the selection bits before setting the right ones or we'll get black screens when going from transcoder B to A.
--- drivers/gpu/drm/i915/intel_display.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_display.c +8 -5
@@ -5646,12 +5646,15 @@ static int ironlake_crtc_mode_set(structif (is_lvds) { temp =I915_READ (PCH_LVDS ); temp |=LVDS_PORT_EN |LVDS_A0A2_CLKA_POWER_UP ; -if (HAS_PCH_CPT (dev)) +if (HAS_PCH_CPT (dev)) { + temp &= ~PORT_TRANS_SEL_MASK ; temp |=PORT_TRANS_SEL_CPT (pipe); -else if (pipe ==1 ) - temp |=LVDS_PIPEB_SELECT ; -else - temp &= ~LVDS_PIPEB_SELECT ; + }else { +if (pipe ==1 ) + temp |=LVDS_PIPEB_SELECT ; +else + temp &= ~LVDS_PIPEB_SELECT ; + }/* set the corresponsding LVDS_BORDER bit */ temp |= dev_priv->lvds_border_bits;
Greg KH
maintainerPATCH 2/68 drm/radeon/kms: fix DVO setup on some r4xx chips
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit afceb9319f21b18ee3bc15ee9a5f92e18ef8a8c9 upstream.
Some r4xx chips have the wrong frev in the DVOEncoderControl table. It should always be 1 on r4xx. Fixes modesetting on DVO on r4xx chips with the bad frev.
Reported by twied on #radeon.
--- drivers/gpu/drm/radeon/atombios_encoders.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/radeon/atombios_encoders.c +4 -0
@@ -246,6 +246,10 @@ atombios_dvo_setup(struct drm_encoder *eif (!atom_parse_cmd_header (rdev->mode_info.atom_context, index, &frev, &crev))return ; +/* some R4xx chips have the wrong frev */ +if (rdev->family <=CHIP_RV410 ) + frev =1 ; +switch (frev) {case 1 :switch (crev) {
Greg KH
maintainerPATCH 3/68 drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <[email protected]>
commit 27c1cbd06a7620b354cbb363834f3bb8df4f410d upstream.
The 845g shares the errata with i830 whereby executing a command within 2 cachelines of the end of the ringbuffer may cause a GPU hang.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
@@ -1052,7 +1052,7 @@ int intel_init_ring_buffer(struct drm_de* of the buffer. */ ring->effective_size = ring->size; -if (IS_I830 (ring->dev)) +if (IS_I830 (ring->dev) ||IS_845G (ring->dev)) ring->effective_size -=128 ;return 0 ;
Greg KH
maintainerPATCH 4/68 drm/radeon: only add the mm i2c bus if the hw_i2c module param is set
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit 46783150a6552f9513f08e62cfcc07125d6e502b upstream.
It seems it can corrupt the monitor EDID in certain cases on certain boards when running sensors detect. It's rarely used anyway outside of AIW boards.
http://lists.lm-sensors.org/pipermail/lm-sensors/2012-April/035847.html
http://lists.freedesktop.org/archives/xorg/2011-January/052239.html
--- drivers/gpu/drm/radeon/radeon_i2c.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/radeon/radeon_i2c.c +4 -0
@@ -890,6 +890,10 @@ struct radeon_i2c_chan *radeon_i2c_creatstruct radeon_i2c_chan *i2c;int ret; +/* don't add the mm_i2c bus unless hw_i2c is enabled */ +if (rec->mm_i2c && (radeon_hw_i2c ==0 )) +return NULL ; + i2c =kzalloc (sizeof (struct radeon_i2c_chan ),GFP_KERNEL );if (i2c ==NULL )return NULL ;
Greg KH
maintainerPATCH 5/68 drm/i915: properly compute dp dithering for user-created modes
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Vetter <[email protected]>
commit c4867936474183332db4c19791a65fdad6474fd5 upstream.
We've only computed whether we need to fall back to 6bpc due to dp link bandwidth constrains in mode_valid, but not mode_fixup. Under various circumstances X likes to create new modes which then lack proper 6bpc flags (if required), resulting in mode_fixup failures and ultimately black screens.
Chris Wilson pointed out that we still get things wrong for bpp > 24, but that should be fixed in another patch (and it'll be easier because this patch consolidates the logic).
The likely culprit for this regression is
commit 3d794f87238f74d80e78a7611c7fbde8a54c85c2
Author: Keith Packard <[email protected]> Date: Wed Jan 25 08:16:25 2012 -0800
drm/i915: Force explicit bpp selection for intel_dp_link_required
v2: Fix indentation and tune down the too bold claim that this should fix the world. Both noticed by Chris Wilson.
v3: Try to really git add things.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48170
--- drivers/gpu/drm/i915/intel_dp.c | 49 ++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +35 -14
@@ -219,14 +219,38 @@ intel_dp_max_data_rate(int max_link_clocreturn (max_link_clock * max_lanes *8 ) /10 ; } +static bool +intel_dp_adjust_dithering (struct intel_dp *intel_dp, +struct drm_display_mode *mode, +struct drm_display_mode *adjusted_mode) +{ +int max_link_clock =intel_dp_link_clock (intel_dp_max_link_bw (intel_dp)); +int max_lanes =intel_dp_max_lane_count (intel_dp); +int max_rate, mode_rate; + + mode_rate =intel_dp_link_required (mode->clock,24 ); + max_rate =intel_dp_max_data_rate (max_link_clock, max_lanes); + +if (mode_rate > max_rate) { + mode_rate =intel_dp_link_required (mode->clock,18 ); +if (mode_rate > max_rate) +return false; + +if (adjusted_mode) + adjusted_mode->private_flags + |=INTEL_MODE_DP_FORCE_6BPC ; + +return true; + } + +return true; +} +static int intel_dp_mode_valid (struct drm_connector *connector,struct drm_display_mode *mode) {struct intel_dp *intel_dp =intel_attached_dp (connector); -int max_link_clock =intel_dp_link_clock (intel_dp_max_link_bw (intel_dp)); -int max_lanes =intel_dp_max_lane_count (intel_dp); -int max_rate, mode_rate;if (is_edp (intel_dp) && intel_dp->panel_fixed_mode) {if (mode->hdisplay > intel_dp->panel_fixed_mode->hdisplay)
@@ -236,16 +260,8 @@ intel_dp_mode_valid(struct drm_connectorreturn MODE_PANEL ; } - mode_rate =intel_dp_link_required (mode->clock,24 ); - max_rate =intel_dp_max_data_rate (max_link_clock, max_lanes); - -if (mode_rate > max_rate) { - mode_rate =intel_dp_link_required (mode->clock,18 ); -if (mode_rate > max_rate) -return MODE_CLOCK_HIGH ; -else - mode->private_flags |=INTEL_MODE_DP_FORCE_6BPC ; - } +if (!intel_dp_adjust_dithering (intel_dp, mode,NULL )) +return MODE_CLOCK_HIGH ;if (mode->clock <10000 )return MODE_CLOCK_LOW ;
@@ -673,7 +689,7 @@ intel_dp_mode_fixup(struct drm_encoder *int lane_count, clock;int max_lane_count =intel_dp_max_lane_count (intel_dp);int max_clock =intel_dp_max_link_bw (intel_dp) ==DP_LINK_BW_2_7 ?1 :0 ; -int bpp = mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ?18 :24 ; +int bpp;static int bws[2 ] = {DP_LINK_BW_1_62 ,DP_LINK_BW_2_7 };if (is_edp (intel_dp) && intel_dp->panel_fixed_mode) {
@@ -687,6 +703,11 @@ intel_dp_mode_fixup(struct drm_encoder * mode->clock = intel_dp->panel_fixed_mode->clock; } +if (!intel_dp_adjust_dithering (intel_dp, mode, adjusted_mode)) +return false; + + bpp = adjusted_mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ?18 :24 ; +for (lane_count =1 ; lane_count <= max_lane_count; lane_count <<=1 ) {for (clock =0 ; clock <= max_clock; clock++) {int link_avail =intel_dp_max_data_rate (intel_dp_link_clock (bws[clock]), lane_count);
Greg KH
maintainerPATCH 6/68 drm/i915: make rc6 module parameter read-only
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jesse Barnes <[email protected]>
commit f57f9c167af7cb3fd315e6a8ebe194a8aea0832a upstream.
People have been getting confused and thinking this is a runtime control.
--- drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +1 -1
@@ -64,7 +64,7 @@ MODULE_PARM_DESC(semaphores, "Use semaphores for inter-ring sync (default: -1 (use per-chip defaults))");int i915_enable_rc6__read_mostly =-1 ; -module_param_named (i915_enable_rc6, i915_enable_rc6, int,0600 ); +module_param_named (i915_enable_rc6, i915_enable_rc6, int,0400 );MODULE_PARM_DESC (i915_enable_rc6,"Enable power-saving render C-state 6 (default: -1 (use per-chip default)" );
Greg KH
maintainerPATCH 7/68 rtlwifi: Add missing DMA buffer unmapping for PCI drivers
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <[email protected]>
commit 673f7786e205c87b5d978c62827b9a66d097bebb upstream.
In https://bugzilla.kernel.org/show_bug.cgi?id=42976, a system with driver rtl8192se used as an AP suffers from "Out of SW-IOMMU space" errors. These are caused by the DMA buffers used for beacons never being unmapped.
This bug was also reported at
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/961618
--- drivers/net/wireless/rtlwifi/pci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/rtlwifi/pci.c +6 -1
@@ -926,8 +926,13 @@ static void _rtl_pci_prepare_bcn_taskletmemset (&tcb_desc,0 ,sizeof (struct rtl_tcb_desc )); ring = &rtlpci->tx_ring[BEACON_QUEUE ]; pskb =__skb_dequeue (&ring->queue); -if (pskb) +if (pskb) { +struct rtl_tx_desc *entry = &ring->desc[ring->idx]; +pci_unmap_single (rtlpci->pdev, rtlpriv->cfg->ops->get_desc ( + (u8 *) entry, true,HW_DESC_TXBUFF_ADDR ), + pskb->len,PCI_DMA_TODEVICE );kfree_skb (pskb); + }/*NB: the beacon data buffer must be 32-bit aligned. */ pskb =ieee80211_beacon_get (hw, mac->vif);
Greg KH
maintainerPATCH 8/68 ARM: 7379/1: DT: fix atags_to_fdt() second call site
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Zyngier <[email protected]>
commit 9c5fd9e85f574d9d0361b2b878f55732290afe5b upstream.
atags_to_fdt() returns 1 when it fails to find a valid FDT signature. The CONFIG_ARM_ATAG_DTB_COMPAT code is supposed to retry with another location, but only does so when the initial call doesn't fail.
Fix this by using the correct condition in the assembly code.
--- arch/arm/boot/compressed/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/compressed/head.S +1 -1
@@ -273,7 +273,7 @@ restart: adr r0, LC0 add r0, r0, #0x100 mov r1, r6 sub r2, sp, r6 - blne atags_to_fdt + bleq atags_to_fdt ldmfd sp!, {r0-r3, ip, lr} sub sp, sp, #0x10000
Greg KH
maintainerPATCH 9/68 ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonathan Austin <[email protected]>
commit 078c04545ba56da21567728a909a496df5ff730d upstream.
Currently when ThumbEE is not enabled (!CONFIG_ARM_THUMBEE) the ThumbEE register states are not saved/restored at context switch. The default state of the ThumbEE Ctrl register (TEECR) allows userspace accesses to the ThumbEE Base Handler register (TEEHBR). This can cause unexpected behaviour when people use ThumbEE on !CONFIG_ARM_THUMBEE kernels, as well as allowing covert communication - eg between userspace tasks running inside chroot jails.
This patch sets up TEECR in order to prevent user-space access to TEEHBR when !CONFIG_ARM_THUMBEE. In this case, tasks are sent SIGILL if they try to access TEEHBR.
--- arch/arm/mm/proc-v7.S | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mm/proc-v7.S +12 -0
@@ -382,6 +382,18 @@ __v7_setup: mcr p15, 0, r5, c10, c2, 0 @ write PRRR mcr p15, 0, r6, c10, c2, 1 @ write NMRR #endif +#ifndef CONFIG_ARM_THUMBEE + mrc p15, 0, r0, c0, c1, 0 @ read ID_PFR0 for ThumbEE + and r0, r0, #(0xf << 12) @ ThumbEE enabled field + teq r0, #(1 << 12) @ check if ThumbEE is present + bne 1f + mov r5, #0 + mcr p14, 6, r5, c1, c0, 0 @ Initialize TEEHBR to 0 + mrc p14, 6, r0, c0, c0, 0 @ load TEECR + orr r0, r0, #1 @ set the 1st bit in order to + mcr p14, 6, r0, c0, c0, 0 @ stop userspace TEEHBR access +1: +#endif adr r5, v7_crval ldmia r5, {r5, r6} #ifdef CONFIG_CPU_ENDIAN_BE8
Greg KH
maintainerPATCH 10/68 md/bitmap: prevent bitmap_daemon_work running while initialising bitmap
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit afbaa90b80b1ec66e5137cc3824746bfdf559b18 upstream.
If a bitmap is added while the array is active, it is possible for bitmap_daemon_work to run while the bitmap is being initialised.
This is particularly a problem if bitmap_daemon_work sees bitmap->filemap as non-NULL before it has been filled in properly. So hold bitmap_info.mutex while filling in ->filemap
to prevent problems.
This patch is suitable for any -stable kernel, though it might not apply cleanly before about 3.1.
--- drivers/md/bitmap.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/bitmap.c +2 -0
@@ -1819,7 +1819,9 @@ int bitmap_load(struct mddev *mddev)* re-add of a missing device */ start = mddev->recovery_cp; +mutex_lock (&mddev->bitmap_info.mutex); err =bitmap_init_from_disk (bitmap, start); +mutex_unlock (&mddev->bitmap_info.mutex);if (err) goto out;
Greg KH
maintainerPATCH 11/68 Bluetooth: uart-ldisc: Fix memory leak
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
This is a partial, self-contained, minimal backport of commit 797fe796c4335b35d95d5326824513befdb5d1e9 upstream which fixes the memory leak:
Bluetooth: uart-ldisc: Fix memory leak and remove destruct cb
We currently leak the hci_uart object if HCI_UART_PROTO_SET is never set because the hci-destruct callback will then never be called. This fix removes the hci-destruct callback and frees the driver internal private hci_uart object directly on tty-close. We call hci_unregister_dev() here so the hci-core will never call our callbacks again (except destruct). Therefore, we can safely free the driver internal data right away and set the destruct callback to NULL.
--- drivers/bluetooth/hci_ldisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/hci_ldisc.c +1 -1
@@ -237,7 +237,6 @@ static void hci_uart_destruct(struct hcireturn ;BT_DBG ("%s" , hdev->name); -kfree (hdev->driver_data); }/* ------ LDISC part ------ */
@@ -316,6 +315,7 @@ static void hci_uart_tty_close(struct tthci_free_dev (hdev); } } +kfree (hu); } }
Greg KH
maintainerPATCH 12/68 Bluetooth: hci_ldisc: fix NULL-pointer dereference on tty_close
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 33b69bf80a3704d45341928e4ff68b6ebd470686 upstream.
Do not close protocol driver until device has been unregistered.
This fixes a race between tty_close and hci_dev_open which can result in a NULL-pointer dereference.
The line discipline closes the protocol driver while we may still have hci_dev_open sleeping on the req_lock mutex resulting in a NULL-pointer dereference when lock is acquired and hci_init_req called.
Bug is 100% reproducible using hciattach and a disconnected serial port:
0. # hciattach -n ttyO1 any noflow
1. hci_dev_open called from hci_power_on grabs req lock
2. hci_init_req executes but device fails to initialise (times out eventually)
3. hci_dev_open is called from hci_sock_ioctl and sleeps on req lock
4. hci_uart_tty_close detaches protocol driver and cancels init req
5. hci_dev_open (1) releases req lock
6. hci_dev_open (3) grabs req lock, calls hci_init_req, which triggers oops when request is prepared in hci_uart_send_frame
[ 137.201263] Unable to handle kernel NULL pointer dereference at virtual address 00000028 [ 137.209838] pgd = c0004000 [ 137.212677] [00000028] *pgd=00000000 [ 137.216430] Internal error: Oops: 17 [#1] [ 137.220642] Modules linked in: [ 137.223846] CPU: 0 Tainted: G W (3.3.0-rc6-dirty #406) [ 137.230529] PC is at __lock_acquire+0x5c/0x1ab0 [ 137.235290] LR is at lock_acquire+0x9c/0x128 [ 137.239776] pc : [<c0071490>] lr : [<c00733f8>] psr: 20000093 [ 137.239776] sp : cf869dd8 ip : c0529554 fp : c051c730 [ 137.251800] r10: 00000000 r9 : cf8673c0 r8 : 00000080 [ 137.257293] r7 : 00000028 r6 : 00000002 r5 : 00000000 r4 : c053fd70 [ 137.264129] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000001 [ 137.270965] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 137.278717] Control: 10c5387d Table: 8f0f4019 DAC: 00000015 [ 137.284729] Process kworker/u:1 (pid: 7, stack limit = 0xcf8682e8) [ 137.291229] Stack: (0xcf869dd8 to 0xcf86a000) [ 137.295776] 9dc0: c0529554 00000000 [ 137.304351] 9de0: cf8673c0 cf868000 d03ea1ef cf868000 000001ef 00000470 00000000 00000002 [ 137.312927] 9e00: cf8673c0 00000001 c051c730 c00716ec 0000000c 00000440 c0529554 00000001 [ 137.321533] 9e20: c051c730 cf868000 d03ea1f3 00000000 c053b978 00000000 00000028 cf868000 [ 137.330078] 9e40: 00000000 00000000 00000002 00000000 00000000 c00733f8 00000002 00000080 [ 137.338684] 9e60: 00000000 c02a1d50 00000000 00000001 60000013 c0969a1c 60000093 c053b96c [ 137.347259] 9e80: 00000002 00000018 20000013 c02a1d50 cf0ac000 00000000 00000002 cf868000 [ 137.355834] 9ea0: 00000089 c0374130 00000002 00000000 c02a1d50 cf0ac000 0000000c cf0fc540 [ 137.364410] 9ec0: 00000018 c02a1d50 cf0fc540 00000000 cf0fc540 c0282238 c028220c cf178d80 [ 137.372985] 9ee0: 127525d8 c02821cc 9a1fa451 c032727c 9a1fa451 127525d8 cf0fc540 cf0ac4ec [ 137.381561] 9f00: cf0ac000 cf0fc540 cf0ac584 c03285f4 c0328580 cf0ac4ec cf85c740 c05510cc [ 137.390136] 9f20: ce825400 c004c914 00000002 00000000 c004c884 ce8254f5 cf869f48 00000000 [ 137.398712] 9f40: c0328580 ce825415 c0a7f914 c061af64 00000000 c048cf3c cf8673c0 cf85c740 [ 137.407287] 9f60: c05510cc c051a66c c05510ec c05510c4 cf85c750 cf868000 00000089 c004d6ac [ 137.415863] 9f80: 00000000 c0073d14 00000001 cf853ed8 cf85c740 c004d558 00000013 00000000 [ 137.424438] 9fa0: 00000000 00000000 00000000 c00516b0 00000000 00000000 cf85c740 00000000 [ 137.433013] 9fc0: 00000001 dead4ead ffffffff ffffffff c0551674 00000000 00000000 c0450aa4 [ 137.441589] 9fe0: cf869fe0 cf869fe0 cf853ed8 c005162c c0013b30 c0013b30 00ffff00 00ffff00 [ 137.450164] [<c0071490>] (__lock_acquire+0x5c/0x1ab0) from [<c00733f8>] (lock_acquire+0x9c/0x128) [ 137.459503] [<c00733f8>] (lock_acquire+0x9c/0x128) from [<c0374130>] (_raw_spin_lock_irqsave+0x44/0x58) [ 137.469360] [<c0374130>] (_raw_spin_lock_irqsave+0x44/0x58) from [<c02a1d50>] (skb_queue_tail+0x18/0x48) [ 137.479339] [<c02a1d50>] (skb_queue_tail+0x18/0x48) from [<c0282238>] (h4_enqueue+0x2c/0x34) [ 137.488189] [<c0282238>] (h4_enqueue+0x2c/0x34) from [<c02821cc>] (hci_uart_send_frame+0x34/0x68) [ 137.497497] [<c02821cc>] (hci_uart_send_frame+0x34/0x68) from [<c032727c>] (hci_send_frame+0x50/0x88) [ 137.507171] [<c032727c>] (hci_send_frame+0x50/0x88) from [<c03285f4>] (hci_cmd_work+0x74/0xd4) [ 137.516204] [<c03285f4>] (hci_cmd_work+0x74/0xd4) from [<c004c914>] (process_one_work+0x1a0/0x4ec) [ 137.525604] [<c004c914>] (process_one_work+0x1a0/0x4ec) from [<c004d6ac>] (worker_thread+0x154/0x344) [ 137.535278] [<c004d6ac>] (worker_thread+0x154/0x344) from [<c00516b0>] (kthread+0x84/0x90) [ 137.543975] [<c00516b0>] (kthread+0x84/0x90) from [<c0013b30>] (kernel_thread_exit+0x0/0x8) [ 137.552734] Code: e59f4e5c e5941000 e3510000 0a000031 (e5971000) [ 137.559234] ---[ end trace 1b75b31a2719ed1e ]---
--- drivers/bluetooth/hci_ldisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/hci_ldisc.c +1 -1
@@ -309,11 +309,11 @@ static void hci_uart_tty_close(struct tthci_uart_close (hdev);if (test_and_clear_bit (HCI_UART_PROTO_SET , &hu->flags)) { - hu->proto->close (hu);if (hdev) {hci_unregister_dev (hdev);hci_free_dev (hdev); } + hu->proto->close (hu); }kfree (hu); }
Greg KH
maintainerPATCH 13/68 ext4: address scalability issue by removing extent cache statistics
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <[email protected]>
commit 9cd70b347e9761ea2d2ac3d758c529a48a8193e6 upstream.
Andi Kleen and Tim Chen have reported that under certain circumstances the extent cache statistics are causing scalability problems due to cache line bounces.
--- fs/ext4/ext4.h | 3 --- fs/ext4/extents.c | 4 ---- fs/ext4/super.c | 16 ---------------- 3 files changed, 23 deletions(-)
fs/ext4/ext4.h +0 -3
@@ -1185,9 +1185,6 @@ struct ext4_sb_info {unsigned long s_ext_blocks;unsigned long s_ext_extents;#endif -/* ext4 extent cache stats */ -unsigned long extent_cache_hits; -unsigned long extent_cache_misses;/* for buddy allocator */ struct ext4_group_info ***s_group_info;
fs/ext4/extents.c +0 -4
@@ -2052,10 +2052,6 @@ static int ext4_ext_check_cache(struct i ret =1 ; } errout: -if (!ret) - sbi->extent_cache_misses++; -else - sbi->extent_cache_hits++;trace_ext4_ext_in_cache (inode, block, ret);spin_unlock (&EXT4_I (inode)->i_block_reservation_lock);return ret;
fs/ext4/super.c +0 -16
@@ -2504,18 +2504,6 @@ static ssize_t lifetime_write_kbytes_sho EXT4_SB(sb)->s_sectors_written_start) >> 1))); } -static ssize_t extent_cache_hits_show (struct ext4_attr *a, -struct ext4_sb_info *sbi,char *buf) -{ -return snprintf (buf,PAGE_SIZE ,"%lu\n" , sbi->extent_cache_hits); -} - -static ssize_t extent_cache_misses_show (struct ext4_attr *a, -struct ext4_sb_info *sbi,char *buf) -{ -return snprintf (buf,PAGE_SIZE ,"%lu\n" , sbi->extent_cache_misses); -} -static ssize_t inode_readahead_blks_store (struct ext4_attr *a,struct ext4_sb_info *sbi,const char *buf,size_t count)
@@ -2573,8 +2561,6 @@ static struct ext4_attr ext4_attr_##nameEXT4_RO_ATTR (delayed_allocation_blocks);EXT4_RO_ATTR (session_write_kbytes);EXT4_RO_ATTR (lifetime_write_kbytes); -EXT4_RO_ATTR (extent_cache_hits); -EXT4_RO_ATTR (extent_cache_misses);EXT4_ATTR_OFFSET (inode_readahead_blks,0644 , sbi_ui_show, inode_readahead_blks_store, s_inode_readahead_blks);EXT4_RW_ATTR_SBI_UI (inode_goal, s_inode_goal);
@@ -2590,8 +2576,6 @@ static struct attribute *ext4_attrs[] =ATTR_LIST (delayed_allocation_blocks),ATTR_LIST (session_write_kbytes),ATTR_LIST (lifetime_write_kbytes), -ATTR_LIST (extent_cache_hits), -ATTR_LIST (extent_cache_misses),ATTR_LIST (inode_readahead_blks),ATTR_LIST (inode_goal), ATTR_LIST(mb_stats),
Greg KH
maintainerPATCH 14/68 ia64: fix futex_atomic_cmpxchg_inatomic()
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Luck, Tony" <[email protected]>
commit c76f39bddb84f93f70a5520d9253ec0317bec216 upstream.
Michel Lespinasse cleaned up the futex calling conventions in commit 37a9d912b24f ("futex: Sanitize cmpxchg_futex_value_locked API").
But the ia64 implementation was subtly broken. Gcc does not know that register "r8" will be updated by the fault handler if the cmpxchg instruction takes an exception. So it feels safe in letting the initialization of r8 slide to after the cmpxchg. Result: we always return 0 whether the user address faulted or not.
Fix by moving the initialization of r8 into the __asm__ code so gcc won't move it.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42757
--- arch/ia64/include/asm/futex.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
arch/ia64/include/asm/futex.h +5 -4
@@ -107,15 +107,16 @@ futex_atomic_cmpxchg_inatomic(u32 *uval,return -EFAULT ; { - register unsigned long r8 __asm ("r8") = 0; + registerunsigned long r8 __asm ("r8" );unsigned long prev; __asm__ __volatile__(" mf;; \n" -" mov ar.ccv=%3;; \n" -"[1:] cmpxchg4.acq %0=[%1],%2,ar.ccv \n" +" mov %0=r0 \n" +" mov ar.ccv=%4;; \n" +"[1:] cmpxchg4.acq %1=[%2],%3,ar.ccv \n" " .xdata4 \"__ex_table\", 1b-., 2f-. \n" "[2:]" - :"=r" (prev) + :"=r" (r8),"=r" (prev) :"r" (uaddr),"r" (newval),"rO" ((long ) (unsigned ) oldval) :"memory" );
Greg KH
maintainerPATCH 15/68 drivers/rtc/rtc-pl031.c: enable clock on all ST variants
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <[email protected]>
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.
--- drivers/rtc/rtc-pl031.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/rtc/rtc-pl031.c +1 -2
@@ -339,8 +339,7 @@ static int pl031_probe(struct amba_devicdev_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 );
Greg KH
maintainerPATCH 16/68 hugetlb: fix race condition in hugetlb_fault()
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Metcalf <[email protected]>
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.
--- mm/hugetlb.c | 2 ++ 1 file changed, 2 insertions(+)
mm/hugetlb.c +2 -0
@@ -2686,6 +2686,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);
@@ -2717,6 +2718,7 @@ out_page_table_lock: }if (page != pagecache_page)unlock_page (page); +put_page (page); out_mutex:mutex_unlock (&hugetlb_instantiation_mutex);
Greg KH
maintainerPATCH 17/68 staging: iio: hmc5843: Fix crash in probe function.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Belisko <[email protected]>
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 : [<c00b408c>] lr : [<c00b4028>] 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] [<c00b408c>] (kfree+0x84/0x144) from [<c0236274>] (device_add+0x530/0x57c) [ 37.545806] [<c0236274>] (device_add+0x530/0x57c) from [<c032fa40>] (iio_device_register+0x8c8/0x990) [ 37.555480] [<c032fa40>] (iio_device_register+0x8c8/0x990) from [<c0330164>] (hmc5843_probe+0xec/0x114) [ 37.565338] [<c0330164>] (hmc5843_probe+0xec/0x114) from [<c02ccfd8>] (i2c_device_probe+0xc4/0xf8) [ 37.574737] [<c02ccfd8>] (i2c_device_probe+0xc4/0xf8) from [<c02381a8>] (driver_probe_device+0x118/0x218) [ 37.584777] [<c02381a8>] (driver_probe_device+0x118/0x218) from [<c0236bb0>] (bus_for_each_drv+0x4c/0x84) [ 37.594818] [<c0236bb0>] (bus_for_each_drv+0x4c/0x84) from [<c0238030>] (device_attach+0x78/0xa4) [ 37.604125] [<c0238030>] (device_attach+0x78/0xa4) from [<c02377ec>] (bus_probe_device+0x28/0x9c) [ 37.613433] [<c02377ec>] (bus_probe_device+0x28/0x9c) from [<c0236138>] (device_add+0x3f4/0x57c) [ 37.622650] [<c0236138>] (device_add+0x3f4/0x57c) from [<c02cd634>] (i2c_new_device+0xf8/0x19c) [ 37.631805] [<c02cd634>] (i2c_new_device+0xf8/0x19c) from [<c02cd78c>] (i2c_sysfs_new_device+0xb4/0x130) [ 37.641754] [<c02cd78c>] (i2c_sysfs_new_device+0xb4/0x130) from [<c0234d88>] (dev_attr_store+0x18/0x24) [ 37.651611] [<c0234d88>] (dev_attr_store+0x18/0x24) from [<c010c354>] (sysfs_write_file+0x10c/0x140) [ 37.661193] [<c010c354>] (sysfs_write_file+0x10c/0x140) from [<c00b7bf8>] (vfs_write+0xb0/0x178) [ 37.670410] [<c00b7bf8>] (vfs_write+0xb0/0x178) from [<c00b7ed8>] (sys_write+0x3c/0x68) [ 37.678833] [<c00b7ed8>] (sys_write+0x3c/0x68) from [<c000e380>] (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.
--- drivers/staging/iio/magnetometer/hmc5843.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/iio/magnetometer/hmc5843.c +3 -1
@@ -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);
Greg KH
maintainerPATCH 18/68 tty: serial: altera_uart: Check for NULL platform_data in probe.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuriy Kozlov <[email protected]>
commit acede70d6561f2d042d9dbb153d9a3469479c0ed upstream.
Follow altera_jtag_uart. This fixes a crash if there is a mistake in the DTS.
--- drivers/tty/serial/altera_uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/altera_uart.c +2 -2
@@ -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 */
Greg KH
maintainerPATCH 19/68 sparc64: Eliminate obsolete __handle_softirq() function
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Paul E. McKenney" <[email protected]>
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.
--- arch/sparc/kernel/rtrap_64.S | 7 ------- 1 file changed, 7 deletions(-)
arch/sparc/kernel/rtrap_64.S +0 -7
@@ -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
Greg KH
maintainerPATCH 20/68 sparc64: Fix bootup crash on sun4v.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "David S. Miller" <[email protected]>
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.
--- arch/sparc/kernel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/kernel/ds.c +1 -1
@@ -1267,4 +1267,4 @@ static int __init ds_init(void)return vio_register_driver (&ds_driver); } -subsys_initcall (ds_init); +fs_initcall (ds_init);
Greg KH
maintainerPATCH 21/68 cciss: Initialize scsi host max_sectors for tape drive support
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Stephen M. Cameron" <[email protected]>
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.
--- drivers/block/cciss_scsi.c | 1 + 1 file changed, 1 insertion(+)
drivers/block/cciss_scsi.c +1 -0
@@ -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;
Greg KH
maintainerPATCH 22/68 cciss: Fix scsi tape io with more than 255 scatter gather elements
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Stephen M. Cameron" <[email protected]>
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.
--- drivers/block/cciss_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/cciss_scsi.c +1 -1
@@ -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
Greg KH
maintainerPATCH 23/68 perf hists: Catch and handle out-of-date hist entry maps.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Miller <[email protected]>
commit 63fa471dd49e9c9ce029d910d1024330d9b1b145 upstream.
When a process exec()'s, all the maps are retired, but we keep the hist entries around which hold references to those outdated maps.
If the same library gets mapped in for which we have hist entries, a new map will be created. But when we take a perf entry hit within that map, we'll find the existing hist entry with the older map.
This causes symbol translations to be done incorrectly. For example, the perf entry processing will lookup the correct uptodate map entry and use that to calculate the symbol and DSO relative address. But later when we update the histogram we'll translate the address using the outdated map file instead leading to conditions such as out-of-range offsets in symbol__inc_addr_samples().
Therefore, update the map of the hist_entry dynamically at lookup/ creation time.
--- tools/perf/util/hist.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
tools/perf/util/hist.c +12 -0
@@ -230,6 +230,18 @@ struct hist_entry *__hists__add_entry(stif (!cmp) { he->period += period; ++he->nr_events; + +/* If the map of an existing hist_entry has +* become out-of-date due to an exec() or +* similar, update it. Otherwise we will +* mis-adjust symbol addresses when computing +* the history counter to increment. +*/ +if (he->ms.map != entry->ms.map) { + he->ms.map = entry->ms.map; +if (he->ms.map) + he->ms.map->referenced = true; + } goto out; }
Greg KH
maintainerPATCH 24/68 video:uvesafb: Fix oops that uvesafb try to execute NX-protected page
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang YanQing <[email protected]>
commit b78f29ca0516266431688c5eb42d39ce42ec039a upstream.
This patch fix the oops below that catched in my machine
[ 81.560602] uvesafb: NVIDIA Corporation, GT216 Board - 0696a290, Chip Rev , OEM: NVIDIA, VBE v3.0 [ 81.609384] uvesafb: protected mode interface info at c000:d350 [ 81.609388] uvesafb: pmi: set display start = c00cd3b3, set palette = c00cd40e [ 81.609390] uvesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da [ 81.614558] uvesafb: VBIOS/hardware doesn't support DDC transfers [ 81.614562] uvesafb: no monitor limits have been set, default refresh rate will be used [ 81.614994] uvesafb: scrolling: ypan using protected mode interface, yres_virtual=4915 [ 81.744147] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) [ 81.744153] BUG: unable to handle kernel paging request at c00cd3b3 [ 81.744159] IP: [<c00cd3b3>] 0xc00cd3b2 [ 81.744167] *pdpt = 00000000016d6001 *pde = 0000000001c7b067 *pte = 80000000000cd163 [ 81.744171] Oops: 0011 [#1] SMP [ 81.744174] Modules linked in: uvesafb(+) cfbcopyarea cfbimgblt cfbfillrect [ 81.744178] [ 81.744181] Pid: 3497, comm: modprobe Not tainted 3.3.0-rc4NX+ #71 Acer Aspire 4741 /Aspire 4741 [ 81.744185] EIP: 0060:[<c00cd3b3>] EFLAGS: 00010246 CPU: 0 [ 81.744187] EIP is at 0xc00cd3b3 [ 81.744189] EAX: 00004f07 EBX: 00000000 ECX: 00000000 EDX: 00000000 [ 81.744191] ESI: f763f000 EDI: f763f6e8 EBP: f57f3a0c ESP: f57f3a00 [ 81.744192] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 81.744195] Process modprobe (pid: 3497, ti=f57f2000 task=f748c600 task.ti=f57f2000) [ 81.744196] Stack: [ 81.744197] f82512c5 f759341c 00000000 f57f3a30 c124a9bc 00000001 00000001 000001e0 [ 81.744202] f8251280 f763f000 f7593400 00000000 f57f3a40 c12598dd f5c0c000 00000000 [ 81.744206] f57f3b10 c1255efe c125a21a 00000006 f763f09c 00000000 c1c6cb60 f7593400 [ 81.744210] Call Trace: [ 81.744215] [<f82512c5>] ? uvesafb_pan_display+0x45/0x60 [uvesafb] [ 81.744222] [<c124a9bc>] fb_pan_display+0x10c/0x160 [ 81.744226] [<f8251280>] ? uvesafb_vbe_find_mode+0x180/0x180 [uvesafb] [ 81.744230] [<c12598dd>] bit_update_start+0x1d/0x50 [ 81.744232] [<c1255efe>] fbcon_switch+0x39e/0x550 [ 81.744235] [<c125a21a>] ? bit_cursor+0x4ea/0x560 [ 81.744240] [<c129b6cb>] redraw_screen+0x12b/0x220 [ 81.744245] [<c128843b>] ? tty_do_resize+0x3b/0xc0 [ 81.744247] [<c129ef42>] vc_do_resize+0x3d2/0x3e0 [ 81.744250] [<c129efb4>] vc_resize+0x14/0x20 [ 81.744253] [<c12586bd>] fbcon_init+0x29d/0x500 [ 81.744255] [<c12984c4>] ? set_inverse_trans_unicode+0xe4/0x110 [ 81.744258] [<c129b378>] visual_init+0xb8/0x150 [ 81.744261] [<c129c16c>] bind_con_driver+0x16c/0x360 [ 81.744264] [<c129b47e>] ? register_con_driver+0x6e/0x190 [ 81.744267] [<c129c3a1>] take_over_console+0x41/0x50 [ 81.744269] [<c1257b7a>] fbcon_takeover+0x6a/0xd0 [ 81.744272] [<c12594b8>] fbcon_event_notify+0x758/0x790 [ 81.744277] [<c10929e2>] notifier_call_chain+0x42/0xb0 [ 81.744280] [<c1092d30>] __blocking_notifier_call_chain+0x60/0x90 [ 81.744283] [<c1092d7a>] blocking_notifier_call_chain+0x1a/0x20 [ 81.744285] [<c124a5a1>] fb_notifier_call_chain+0x11/0x20 [ 81.744288] [<c124b759>] register_framebuffer+0x1d9/0x2b0 [ 81.744293] [<c1061c73>] ? ioremap_wc+0x33/0x40 [ 81.744298] [<f82537c6>] uvesafb_probe+0xaba/0xc40 [uvesafb] [ 81.744302] [<c12bb81f>] platform_drv_probe+0xf/0x20 [ 81.744306] [<c12ba558>] driver_probe_device+0x68/0x170 [ 81.744309] [<c12ba731>] __device_attach+0x41/0x50 [ 81.744313] [<c12b9088>] bus_for_each_drv+0x48/0x70 [ 81.744316] [<c12ba7f3>] device_attach+0x83/0xa0 [ 81.744319] [<c12ba6f0>] ? __driver_attach+0x90/0x90 [ 81.744321] [<c12b991f>] bus_probe_device+0x6f/0x90 [ 81.744324] [<c12b8a45>] device_add+0x5e5/0x680 [ 81.744329] [<c122a1a3>] ? kvasprintf+0x43/0x60 [ 81.744332] [<c121e6e4>] ? kobject_set_name_vargs+0x64/0x70 [ 81.744335] [<c121e6e4>] ? kobject_set_name_vargs+0x64/0x70 [ 81.744339] [<c12bbe9f>] platform_device_add+0xff/0x1b0 [ 81.744343] [<f8252906>] uvesafb_init+0x50/0x9b [uvesafb] [ 81.744346] [<c100111f>] do_one_initcall+0x2f/0x170 [ 81.744350] [<f82528b6>] ? uvesafb_is_valid_mode+0x66/0x66 [uvesafb] [ 81.744355] [<c10c6994>] sys_init_module+0xf4/0x1410 [ 81.744359] [<c1157fc0>] ? vfsmount_lock_local_unlock_cpu+0x30/0x30 [ 81.744363] [<c144cb10>] sysenter_do_call+0x12/0x36 [ 81.744365] Code: f5 00 00 00 32 f6 66 8b da 66 d1 e3 66 ba d4 03 8a e3 b0 1c 66 ef b0 1e 66 ef 8a e7 b0 1d 66 ef b0 1f 66 ef e8 fa 00 00 00 61 c3 <60> e8 c8 00 00 00 66 8b f3 66 8b da 66 ba d4 03 b0 0c 8a e5 66 [ 81.744388] EIP: [<c00cd3b3>] 0xc00cd3b3 SS:ESP 0068:f57f3a00 [ 81.744391] CR2: 00000000c00cd3b3 [ 81.744393] ---[ end trace 18b2c87c925b54d6 ]---
--- drivers/video/uvesafb.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/video/uvesafb.c +9 -2
@@ -815,8 +815,15 @@ static int __devinit uvesafb_vbe_init(st par->pmi_setpal = pmi_setpal; par->ypan = ypan; -if (par->pmi_setpal || par->ypan) -uvesafb_vbe_getpmi (task, par); +if (par->pmi_setpal || par->ypan) { +if (__supported_pte_mask & _PAGE_NX) { + par->pmi_setpal = par->ypan =0 ; +printk (KERN_WARNING "uvesafb: NX protection is actively." +"We have better not to use the PMI.\n" ); + }else { +uvesafb_vbe_getpmi (task, par); + } + }#else /* The protected mode interface is not available on non-x86. */ par->pmi_setpal = par->ypan =0 ;
Greg KH
maintainerPATCH 25/68 nohz: Fix stale jiffies update in tick_nohz_restart()
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neal Cardwell <[email protected]>
commit 6f103929f8979d2638e58d7f7fda0beefcb8ee7e upstream.
Fix tick_nohz_restart() to not use a stale ktime_t "now" value when calling tick_do_update_jiffies64(now).
If we reach this point in the loop it means that we crossed a tick boundary since we grabbed the "now" timestamp, so at this point "now" refers to a time in the old jiffy, so using the old value for "now" is incorrect, and is likely to give us a stale jiffies value.
In particular, the first time through the loop the tick_do_update_jiffies64(now) call is always a no-op, since the caller, tick_nohz_restart_sched_tick(), will have already called tick_do_update_jiffies64(now) with that "now" value.
Note that tick_nohz_stop_sched_tick() already uses the correct
approach: when we notice we cross a jiffy boundary, grab a new timestamp with ktime_get(), and *then* update jiffies.
--- kernel/time/tick-sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/time/tick-sched.c +2 -2
@@ -508,9 +508,9 @@ static void tick_nohz_restart(struct tic hrtimer_get_expires(&ts->sched_timer), 0))break ; } -/* Update jiffies and reread time */ -tick_do_update_jiffies64 (now); +/* Reread time and update jiffies */ now =ktime_get (); +tick_do_update_jiffies64 (now); } }
Greg KH
maintainerPATCH 26/68 pch_uart: Fix MSI setting issue
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit 867c902e07d5677e2a5b54c0435e589513abde48 upstream.
The following patch (MSI setting) is not enough.
commit e463595fd9c752fa4bf06b47df93ef9ade3c7cf0
Author: Alexander Stein <[email protected]> Date: Mon Jul 4 08:58:31 2011 +0200
pch_uart: Add MSI support
To enable MSI mode, PCI bus-mastering must be enabled. This patch enables the setting.
--- drivers/tty/serial/pch_uart.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/pch_uart.c +1 -0
@@ -1438,6 +1438,7 @@ static struct eg20t_port *pch_uart_init_ }pci_enable_msi (pdev); +pci_set_master (pdev); iobase =pci_resource_start (pdev,0 ); mapbase =pci_resource_start (pdev,1 );
Greg KH
maintainerPATCH 27/68 USB: serial: fix race between probe and open
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit a65a6f14dc24a90bde3f5d0073ba2364476200bf upstream.
Fix race between probe and open by making sure that the disconnected flag is not cleared until all ports have been registered.
A call to tty_open while probe is running may get a reference to the serial structure in serial_install before its ports have been registered. This may lead to usb_serial_core calling driver open before port is fully initialised.
With ftdi_sio this result in the following NULL-pointer dereference as the private data has not been initialised at open:
[ 199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] [ 199.698297] *pde = 00000000 [ 199.698303] Oops: 0000 [#1] PREEMPT SMP [ 199.698313] Modules linked in: ftdi_sio usbserial [ 199.698323] [ 199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J [ 199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0 [ 199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio] [ 199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600 [ 199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc [ 199.698356] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000) [ 199.698364] Stack: [ 199.698368] f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800 [ 199.698387] 00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222 [ 199.698479] 22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab [ 199.698496] Call Trace: [ 199.698504] [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial] [ 199.698511] [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial] [ 199.698521] [<c126380c>] tty_port_open+0x7c/0xd0 [ 199.698527] [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial] [ 199.698534] [<f806e76f>] serial_open+0x2f/0x70 [usbserial] [ 199.698540] [<c125d07c>] tty_open+0x20c/0x510 [ 199.698546] [<c10e9eb7>] chrdev_open+0xe7/0x230 [ 199.698553] [<c10e48f2>] __dentry_open+0x1f2/0x390 [ 199.698559] [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50 [ 199.698565] [<c10e4b76>] nameidata_to_filp+0x66/0x80 [ 199.698570] [<c10e9dd0>] ? cdev_put+0x20/0x20 [ 199.698576] [<c10f3e08>] do_last+0x198/0x730 [ 199.698581] [<c10f4440>] path_openat+0xa0/0x350 [ 199.698587] [<c10f47d5>] do_filp_open+0x35/0x80 [ 199.698593] [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50 [ 199.698599] [<c10ff110>] ? alloc_fd+0xc0/0x100 [ 199.698605] [<c10f0b72>] ? getname_flags+0x72/0x120 [ 199.698611] [<c10e4450>] do_sys_open+0xf0/0x1c0 [ 199.698617] [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10 [ 199.698623] [<c10e458e>] sys_open+0x2e/0x40 [ 199.698628] [<c144c990>] sysenter_do_call+0x12/0x36 [ 199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24 [ 199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc [ 199.698893] CR2: 0000000000000078 [ 199.698925] ---[ end trace 77c43ec023940cff ]---
--- drivers/usb/serial/usb-serial.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/usb/serial/usb-serial.c +8 -0
@@ -1059,6 +1059,12 @@ int usb_serial_probe(struct usb_interfac serial->attached =1 ; } +/* Avoid race with tty_open and serial_install by setting the +* disconnected flag and not clearing it until all ports have been +* registered. +*/ + serial->disconnected =1 ; +if (get_free_serial (serial, num_ports, &minor) ==NULL ) {dev_err (&interface->dev,"No more free serial devices\n" ); goto probe_error;
@@ -1083,6 +1089,8 @@ int usb_serial_probe(struct usb_interfac } } + serial->disconnected =0 ; +usb_serial_console_init (debug, minor); exit:
Greg KH
maintainerPATCH 28/68 USB: pl2303: fix DTR/RTS being raised on baud rate change
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit ce5c9851855bab190c9a142761d54ba583ab094c upstream.
DTR/RTS should only be raised when changing baudrate from B0 and not on any baud rate change (> B0).
--- drivers/usb/serial/pl2303.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/pl2303.c +1 -1
@@ -421,7 +421,7 @@ static void pl2303_set_termios(struct tt control = priv->line_control;if ((cflag &CBAUD ) ==B0 ) priv->line_control &= ~(CONTROL_DTR |CONTROL_RTS ); -else +else if ((old_termios->c_cflag &CBAUD ) ==B0 ) priv->line_control |= (CONTROL_DTR |CONTROL_RTS );if (control != priv->line_control) { control = priv->line_control;
Greg KH
maintainerPATCH 29/68 USB: option: re-add NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED to option_id array
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Santiago Garcia Mantinan <[email protected]>
commit 9ac2feb22b5b821d81463bef92698ef7682a3145 upstream.
Re-add NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED to option_id array
--- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/option.c +1 -0
@@ -708,6 +708,7 @@ static const struct usb_device_id option { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED) }, + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED3) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED4) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED5) },
Greg KH
maintainerPATCH 30/68 USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Arlott <[email protected]>
commit fca5430d48d53eaf103498c33fd0d1984b9f448b upstream.
Handling of TIOCMIWAIT was changed by commit 1d749f9afa657f6ee9336b2bc1fcd750a647d157
USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
FTDI_STATUS_B0_MASK does not indicate the changed modem status lines, it indicates the value of the current modem status lines. An xor is still required to determine which lines have changed.
The count was only being incremented if the line was high. The only reason TIOCMIWAIT still worked was because the status packet is repeated every 1ms, so the count was always changing. The wakeup itself still ran based on the status lines changing.
This change fixes handling of updates to the modem status lines and allows multiple processes to use TIOCMIWAIT concurrently.
Tested with two processes waiting on different status lines being toggled independently.
--- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/usb/serial/ftdi_sio.c +13 -11
@@ -75,7 +75,7 @@ struct ftdi_private {unsigned long last_dtr_rts;/* saved modem control outputs */ struct async_icount icount;wait_queue_head_t delta_msr_wait;/* Used for TIOCMIWAIT */ -char prev_status, diff_status;/* Used for TIOCMIWAIT */ +char prev_status;/* Used for TIOCMIWAIT */ char transmit_empty;/* If transmitter is empty or not */ struct usb_serial_port *port;__u16 interface;/* FT2232C, FT2232H or FT4232H port interface
@@ -1979,17 +1979,19 @@ static int ftdi_process_packet(struct ttN.B. packet may be processed more than once, but differences are only processed once. */ status = packet[0 ] &FTDI_STATUS_B0_MASK ; -if (status &FTDI_RS0_CTS ) - priv->icount.cts++; -if (status &FTDI_RS0_DSR ) - priv->icount.dsr++; -if (status &FTDI_RS0_RI ) - priv->icount.rng++; -if (status &FTDI_RS0_RLSD ) - priv->icount.dcd++;if (status != priv->prev_status) { - priv->diff_status |= status ^ priv->prev_status; -wake_up_interruptible (&priv->delta_msr_wait); +char diff_status = status ^ priv->prev_status; + +if (diff_status &FTDI_RS0_CTS ) + priv->icount.cts++; +if (diff_status &FTDI_RS0_DSR ) + priv->icount.dsr++; +if (diff_status &FTDI_RS0_RI ) + priv->icount.rng++; +if (diff_status &FTDI_RS0_RLSD ) + priv->icount.dcd++; + +wake_up_interruptible_all (&priv->delta_msr_wait); priv->prev_status = status; }
Greg KH
maintainerPATCH 31/68 USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT when the device is removed
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Arlott <[email protected]>
commit 876ae50d94b02f3f523aa451b45ec5fb9c25d221 upstream.
There are two issues here, one is that the device is generating spurious very fast modem status line changes somewhere:
CTS becomes high then low 18µs later:
[121226.924373] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=6 [121226.924378] ftdi_process_packet: status=10 prev=00 diff=10 [121226.924382] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=7 (wake_up_interruptible is called) [121226.924391] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=7 [121226.924394] ftdi_process_packet: status=00 prev=10 diff=10 [121226.924397] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=8
(wake_up_interruptible is called)
This wakes up the task in TIOCMIWAIT:
[121226.924405] ftdi_ioctl: 19451 rng=0->0 dsr=10->10 dcd=0->0 cts=6->8
(wait from 20:51:46 returns and observes both changes)
Which then calls TIOCMIWAIT again:
20:51:46.400239 ioctl(3, TIOCMIWAIT, 0x20) = 0 22:11:09.441818 ioctl(3, TIOCMGET, [TIOCM_DTR|TIOCM_RTS]) = 0 22:11:09.442812 ioctl(3, TIOCMIWAIT, 0x20) = -1 EIO (Input/output error) (the second wake_up_interruptible takes effect and an I/O error occurs)
The other issue is that TIOCMIWAIT will wait forever (unless the task is interrupted) if the device is removed.
This change removes the -EIO return that occurs if the counts don't appear to have changed. Multiple counts may have been processed as one or the waiting task may have started waiting after recording the current count.
It adds a bool to indicate that the device has been removed so that TIOCMIWAIT doesn't wait forever, and wakes up any tasks so that they can return -EIO.
--- drivers/usb/serial/ftdi_sio.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/usb/serial/ftdi_sio.c +7 -5
@@ -76,6 +76,7 @@ struct ftdi_private {struct async_icount icount;wait_queue_head_t delta_msr_wait;/* Used for TIOCMIWAIT */ char prev_status;/* Used for TIOCMIWAIT */ +bool dev_gone;/* Used to abort TIOCMIWAIT */ char transmit_empty;/* If transmitter is empty or not */ struct usb_serial_port *port;__u16 interface;/* FT2232C, FT2232H or FT4232H port interface
@@ -1679,6 +1680,7 @@ static int ftdi_sio_port_probe(struct usinit_waitqueue_head (&priv->delta_msr_wait); priv->flags =ASYNC_LOW_LATENCY ; + priv->dev_gone = false;if (quirk && quirk->port_probe) quirk->port_probe (priv);
@@ -1836,6 +1838,9 @@ static int ftdi_sio_port_remove(struct udbg ("%s" , __func__); + priv->dev_gone = true; +wake_up_interruptible_all (&priv->delta_msr_wait); +remove_sysfs_attrs (port);kref_put (&priv->kref, ftdi_sio_priv_release);
@@ -2390,15 +2395,12 @@ static int ftdi_ioctl(struct tty_struct*/ case TIOCMIWAIT : cprev = priv->icount; -while (1 ) { +while (!priv->dev_gone) {interruptible_sleep_on (&priv->delta_msr_wait);/* see if a signal did it */ if (signal_pending (current))return -ERESTARTSYS ; cnow = priv->icount; -if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && - cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) -return -EIO ;/* no change => error */ if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) || ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
@@ -2407,7 +2409,7 @@ static int ftdi_ioctl(struct tty_struct } cprev = cnow; } -/* not reached */ +return -EIO ;break ;case TIOCSERGETLSR :return get_lsr_info (port, (struct serial_struct __user *)arg);
Greg KH
maintainerPATCH 32/68 USB: sierra: add support for Sierra Wireless MC7710
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anton Samokhvalov <[email protected]>
commit c5d703dcc776cb542b41665f2b7e2ba054efb4a7 upstream.
Just add new device id. 3G works fine, LTE not tested.
--- drivers/usb/serial/sierra.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/sierra.c +1 -0
@@ -289,6 +289,7 @@ static const struct usb_device_id id_tab { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */ { USB_DEVICE(0x1199, 0x6859) }, /* Sierra Wireless AirCard 885 E */ { USB_DEVICE(0x1199, 0x685A) }, /* Sierra Wireless AirCard 885 E */ + { USB_DEVICE(0x1199, 0x68A2) }, /* Sierra Wireless MC7710 *//* Sierra Wireless C885 */ { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6880, 0xFF, 0xFF, 0xFF)},/* Sierra Wireless C888, Air Card 501, USB 303, USB 304 */
Greg KH
maintainerPATCH 33/68 USB: dont clear urb->dev in scatter-gather library
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit bcf398537630bf20b4dbe59ba855b69f404c93cf upstream.
This patch (as1517b) fixes an error in the USB scatter-gather library. The library code uses urb->dev to determine whether or nor an URB is currently active; the completion handler sets urb->dev to NULL. However the core unlinking routines need to use urb->dev. Since unlinking always racing with completion, the completion handler must not clear urb->dev -- it can lead to invalid memory accesses when a transfer has to be cancelled.
This patch fixes the problem by getting rid of the lines that clear urb->dev after urb has been submitted. As a result we may end up trying to unlink an URB that failed in submission or that has already completed, so an extra check is added after each unlink to avoid printing an error message when this happens. The checks are updated in both sg_complete() and sg_cancel(), and the second is updated to match the first (currently it prints out unnecessary warning messages if a device is unplugged while a transfer is in progress).
--- drivers/usb/core/message.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/usb/core/message.c +6 -5
@@ -308,7 +308,8 @@ static void sg_complete(struct urb *urb) retval =usb_unlink_urb (io->urbs [i]);if (retval != -EINPROGRESS && retval != -ENODEV && - retval != -EBUSY ) + retval != -EBUSY && + retval != -EIDRM )dev_err (&io->dev->dev,"%s, unlink --> %d\n" , __func__, retval);
@@ -317,7 +318,6 @@ static void sg_complete(struct urb *urb) }spin_lock (&io->lock); } - urb->dev =NULL ;/* on the last completion, signal usb_sg_wait() */ io->bytes += urb->actual_length;
@@ -524,7 +524,6 @@ void usb_sg_wait(struct usb_sg_request *case -ENXIO :/* hc didn't queue this one */ case -EAGAIN :case -ENOMEM : - io->urbs[i]->dev =NULL ; retval =0 ;yield ();break ;
@@ -542,7 +541,6 @@ void usb_sg_wait(struct usb_sg_request */* fail any uncompleted urbs */ default : - io->urbs[i]->dev =NULL ; io->urbs[i]->status = retval;dev_dbg (&io->dev->dev,"%s, submit --> %d\n" , __func__, retval);
@@ -593,7 +591,10 @@ void usb_sg_cancel(struct usb_sg_requestif (!io->urbs [i]->dev)continue ; retval =usb_unlink_urb (io->urbs [i]); -if (retval != -EINPROGRESS && retval != -EBUSY ) +if (retval != -EINPROGRESS + && retval != -ENODEV + && retval != -EBUSY + && retval != -EIDRM )dev_warn (&io->dev->dev,"%s, unlink --> %d\n" , __func__, retval); }
Greg KH
maintainerPATCH 34/68 USB: dont ignore suspend errors for root hubs
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit cd4376e23a59a2adf3084cb5f4a523e6d5fd4e49 upstream.
This patch (as1532) fixes a mistake in the USB suspend code. When the system is going to sleep, we should ignore errors in powering down USB devices, because they don't really matter. The devices will go to low power anyway when the entire USB bus gets suspended (except for SuperSpeed devices; maybe they will need special treatment later).
However we should not ignore errors in suspending root hubs, especially if the error indicates that the suspend raced with a wakeup request. Doing so might leave the bus powered on while the system was supposed to be asleep, or it might cause the suspend of the root hub's parent controller device to fail, or it might cause a wakeup request to be ignored.
The patch fixes the problem by ignoring errors only when the device in question is not a root hub.
--- drivers/usb/core/driver.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/usb/core/driver.c +7 -2
@@ -1198,8 +1198,13 @@ static int usb_suspend_both(struct usb_dif (status ==0 ) { status =usb_suspend_device (udev, msg); -/* Again, ignore errors during system sleep transitions */ -if (!PMSG_IS_AUTO (msg)) +/* +* Ignore errors from non-root-hub devices during +* system sleep transitions. For the most part, +* these devices should go to low power anyway when +* the entire bus is suspended. +*/ +if (udev->parent && !PMSG_IS_AUTO (msg)) status =0 ; }
Greg KH
maintainerPATCH 35/68 xhci: dont re-enable IE constantly
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felipe Balbi <[email protected]>
commit 4e833c0b87a30798e67f06120cecebef6ee9644c upstream.
While we're at that, define IMAN bitfield to aid readability.
The interrupt enable bit should be set once on driver init, and we shouldn't need to continually re-enable it. Commit c21599a3 introduced a read of the irq_pending register, and that allows us to preserve the state of the IE bit. Before that commit, we were blindly writing 0x3 to the register.
This patch should be backported to kernels as old as 2.6.36, or ones that contain the commit c21599a36165dbc78b380846b254017a548b9de5 "USB:
xhci: Reduce reads and writes of interrupter registers".
--- drivers/usb/host/xhci-ring.c | 2 +- drivers/usb/host/xhci.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-ring.c +1 -1
@@ -2343,7 +2343,7 @@ hw_died:u32 irq_pending;/* Acknowledge the PCI interrupt */ irq_pending =xhci_readl (xhci, &xhci->ir_set->irq_pending); - irq_pending |=0x3 ; + irq_pending |=IMAN_IP ;xhci_writel (xhci, irq_pending, &xhci->ir_set->irq_pending); }
drivers/usb/host/xhci.h +4 -0
@@ -205,6 +205,10 @@ struct xhci_op_regs {#define CMD_PM_INDEX (1 << 11)/* bits 12:31 are reserved (and should be preserved on writes). */ +/* IMAN - Interrupt Management Register */ +#define IMAN_IP (1 << 1) +#define IMAN_IE (1 << 0) +/* USBSTS - USB status - status bitmasks */ /* HC not running - set to 1 when run/stop bit is cleared. */ #define STS_HALT XHCI_STS_HALT
Greg KH
maintainerPATCH 36/68 xhci: Dont write zeroed pointers to xHC registers.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarah Sharp <[email protected]>
commit 159e1fcc9a60fc7daba23ee8fcdb99799de3fe84 upstream.
When xhci_mem_cleanup() is called, we can't be sure if the xHC is actually halted. We can ask the xHC to halt by writing to the RUN bit in the command register, but that might timeout due to a HW hang.
If the host controller is still running, we should not write zeroed values to the event ring dequeue pointers or base tables, the DCBAA pointers, or the command ring pointers. Eric Fu reports his VIA VL800 host accesses the event ring pointers after a failed register restore on resume from suspend. The hypothesis is that the host never actually halted before the register write to change the event ring pointer to zero.
Remove all writes of zeroed values to pointer registers in xhci_mem_cleanup(). Instead, make all callers of the function reset the host controller first, which will reset those registers to zero. xhci_mem_init() is the only caller that doesn't first halt and reset the host controller before calling xhci_mem_cleanup().
This should be backported to kernels as old as 2.6.32.
--- drivers/usb/host/xhci-mem.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/usb/host/xhci-mem.c +2 -7
@@ -1704,11 +1704,6 @@ void xhci_mem_cleanup(struct xhci_hcd *xint i;/* Free the Event Ring Segment Table and the actual Event Ring */ -if (xhci->ir_set) { -xhci_writel (xhci,0 , &xhci->ir_set->erst_size); -xhci_write_64 (xhci,0 , &xhci->ir_set->erst_base); -xhci_write_64 (xhci,0 , &xhci->ir_set->erst_dequeue); - } size =sizeof (struct xhci_erst_entry )*(xhci->erst.num_entries);if (xhci->erst.entries) dma_free_coherent(&pdev->dev, size,
@@ -1720,7 +1715,6 @@ void xhci_mem_cleanup(struct xhci_hcd *x xhci->event_ring =NULL ;xhci_dbg (xhci,"Freed event ring\n" ); -xhci_write_64 (xhci,0 , &xhci->op_regs->cmd_ring);if (xhci->cmd_ring)xhci_ring_free (xhci, xhci->cmd_ring); xhci->cmd_ring =NULL ;
@@ -1749,7 +1743,6 @@ void xhci_mem_cleanup(struct xhci_hcd *x xhci->medium_streams_pool =NULL ;xhci_dbg (xhci,"Freed medium stream array pool\n" ); -xhci_write_64 (xhci,0 , &xhci->op_regs->dcbaa_ptr);if (xhci->dcbaa)dma_free_coherent (&pdev->dev,sizeof (*xhci->dcbaa), xhci->dcbaa, xhci->dcbaa->dma);
@@ -2358,6 +2351,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, fail:xhci_warn (xhci,"Couldn't initialize memory\n" ); +xhci_halt (xhci); +xhci_reset (xhci);xhci_mem_cleanup (xhci);return -ENOMEM ; }
Greg KH
maintainerPATCH 37/68 xhci: Restore event ring dequeue pointer on resume.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarah Sharp <[email protected]>
commit fb3d85bc7193f23c9a564502df95564c49a32c91 upstream.
The xhci_save_registers() function saved the event ring dequeue pointer in the s3 register structure, but xhci_restore_registers() never restored it. No other code in the xHCI successful resume path would ever restore it either. Fix that.
This should be backported to kernels as old as 2.6.37, that contain the commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power management implementation".
--- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/xhci.c +1 -0
@@ -681,6 +681,7 @@ static void xhci_restore_registers(strucxhci_writel (xhci, xhci->s3.irq_control, &xhci->ir_set->irq_control);xhci_writel (xhci, xhci->s3.erst_size, &xhci->ir_set->erst_size);xhci_write_64 (xhci, xhci->s3.erst_base, &xhci->ir_set->erst_base); +xhci_write_64 (xhci, xhci->s3.erst_dequeue, &xhci->ir_set->erst_dequeue); }static void xhci_set_cmd_ring_deq (struct xhci_hcd *xhci)
Greg KH
maintainerPATCH 38/68 USB: fix bug of device descriptor got from superspeed device
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Elric Fu <[email protected]>
commit d8aec3dbdfd02627e198e7956ab4aaeba2a349fa upstream.
When the Seagate Goflex USB3.0 device is attached to VIA xHCI host, sometimes the device will downgrade mode to high speed. By the USB analyzer, I found the device finished the link training process and worked at superspeed mode. But the device descriptor got from the device shows the device works at 2.1. It is very strange and seems like the device controller of Seagate Goflex has a little confusion.
The first 8 bytes of device descriptor should be:
12 01 00 03 00 00 00 09
But the first 8 bytes of wrong device descriptor are:
12 01 10 02 00 00 00 40
The wrong device descriptor caused the initialization of mass storage failed. After a while, the device would be recognized as a high speed device and works fine.
This patch will warm reset the device to fix the issue after finding the bcdUSB field of device descriptor isn't 0x0300 but the speed mode of device is superspeed.
This patch should be backported to kernels as old as 3.2, or ones that contain the commit 75d7cf72ab9fa01dc70877aa5c68e8ef477229dc "usbcore:
refine warm reset logic".
--- drivers/usb/core/hub.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/usb/core/hub.c +16 -0
@@ -3072,6 +3072,22 @@ hub_port_init (struct usb_hub *hub, struif (retval) goto fail; +/* +* Some superspeed devices have finished the link training process +* and attached to a superspeed hub port, but the device descriptor +* got from those devices show they aren't superspeed devices. Warm +* reset the port attached by the devices can fix them. +*/ +if ((udev->speed ==USB_SPEED_SUPER ) && + (le16_to_cpu (udev->descriptor.bcdUSB) <0x0300 )) { +dev_err (&udev->dev,"got a wrong device descriptor, " +"warm reset device\n" ); +hub_port_reset (hub, port1, udev, +HUB_BH_RESET_TIME , true); + retval = -EINVAL ; + goto fail; + } +if (udev->descriptor.bMaxPacketSize0 ==0xff || udev->speed ==USB_SPEED_SUPER ) i =512 ;
Greg KH
maintainerPATCH 39/68 xHCI: add XHCI_RESET_ON_RESUME quirk for VIA xHCI host
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Elric Fu <[email protected]>
commit 457a4f61f9bfc3ae76e5b49f30f25d86bb696f67 upstream.
The suspend operation of VIA xHCI host have some issues and hibernate operation works fine, so The XHCI_RESET_ON_RESUME quirk is added for it.
This patch should base on "xHCI: Don't write zeroed pointer to xHC registers" that is released by Sarah. Otherwise, the host system error will ocurr in the hibernate operation process.
This should be backported to stable kernels as old as 2.6.37, that contain the commit c877b3b2ad5cb9d4fe523c5496185cc328ff3ae9 "xhci: Add reset on resume quirk for asrock p67 host".
--- drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-pci.c +2 -0
@@ -95,6 +95,8 @@ static void xhci_pci_quirks(struct devic xhci->quirks |=XHCI_RESET_ON_RESUME ;xhci_dbg (xhci,"QUIRK: Resetting on resume\n" ); } +if (pdev->vendor ==PCI_VENDOR_ID_VIA ) + xhci->quirks |=XHCI_RESET_ON_RESUME ; }/* called during probe() after chip reset completes */
Greg KH
maintainerPATCH 40/68 xHCI: Correct the #define XHCI_LEGACY_DISABLE_SMI
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex He <[email protected]>
commit 95018a53f7653e791bba1f54c8d75d9cb700d1bd upstream.
Re-define XHCI_LEGACY_DISABLE_SMI and used it in right way. All SMI enable bits will be cleared to zero and flag bits 29:31 are also cleared to zero. Other bits should be presvered as Table 146.
This patch should be backported to kernels as old as 2.6.31.
--- drivers/usb/host/pci-quirks.c | 10 +++++++--- drivers/usb/host/xhci-ext-caps.h | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/usb/host/pci-quirks.c +7 -3
@@ -825,9 +825,13 @@ static void __devinit quirk_usb_handoff_ } } -/* Disable any BIOS SMIs */ -writel (XHCI_LEGACY_DISABLE_SMI , - base + ext_cap_offset +XHCI_LEGACY_CONTROL_OFFSET ); + val =readl (base + ext_cap_offset +XHCI_LEGACY_CONTROL_OFFSET ); +/* Mask off (turn off) any enabled SMIs */ + val &=XHCI_LEGACY_DISABLE_SMI ; +/* Mask all SMI events bits, RW1C */ + val |=XHCI_LEGACY_SMI_EVENTS ; +/* Disable any BIOS SMIs and clear all SMI events*/ +writel (val, base + ext_cap_offset +XHCI_LEGACY_CONTROL_OFFSET );if (usb_is_intel_switchable_xhci (pdev))usb_enable_xhci_ports (pdev);
drivers/usb/host/xhci-ext-caps.h +3 -2
@@ -62,8 +62,9 @@/* USB Legacy Support Control and Status Register - section 7.1.2 */ /* Add this offset, plus the value of xECP in HCCPARAMS to the base address */ #define XHCI_LEGACY_CONTROL_OFFSET (0x04) -/* bits 1:2, 5:12, and 17:19 need to be preserved; bits 21:28 should be zero */ -#define XHCI_LEGACY_DISABLE_SMI ((0x3 << 1) + (0xff << 5) + (0x7 << 17)) +/* bits 1:3, 5:12, and 17:19 need to be preserved; bits 21:28 should be zero */ +#define XHCI_LEGACY_DISABLE_SMI ((0x7 << 1) + (0xff << 5) + (0x7 << 17)) +#define XHCI_LEGACY_SMI_EVENTS (0x7 << 29)/* USB 2.0 xHCI 0.96 L1C capability - section 7.2.2.1.3.2 */ #define XHCI_L1C (1 << 16)
Greg KH
maintainerPATCH 41/68 fix tlb flushing for page table pages
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Schwidefsky <[email protected]>
commit cd94154cc6a28dd9dc271042c1a59c08d26da886 upstream.
Git commit 36409f6353fc2d7b6516e631415f938eadd92ffa "use generic RCU page-table freeing code" introduced a tlb flushing bug. Partially revert the above git commit and go back to s390 specific page table flush code.
For s390 the TLB can contain three types of entries, "normal" TLB page-table entries, TLB combined region-and-segment-table (CRST) entries and real-space entries. Linux does not use real-space entries which leaves normal TLB entries and CRST entries. The CRST entries are intermediate steps in the page-table translation called translation paths. For example a 4K page access in a three-level page table setup will create two CRST TLB entries and one page-table TLB entry. The advantage of that approach is that a page access next to the previous one can reuse the CRST entries and needs just a single read from memory to create the page-table TLB entry. The disadvantage is that the TLB flushing rules are more complicated, before any page-table may be freed the TLB needs to be flushed.
In short: the generic RCU page-table freeing code is incorrect for the CRST entries, in particular the check for mm_users < 2 is troublesome.
This is applicable to 3.0+ kernels.
--- arch/s390/Kconfig | 1 arch/s390/include/asm/pgalloc.h | 3 - arch/s390/include/asm/tlb.h | 22 ------------- arch/s390/mm/pgtable.c | 63 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 61 insertions(+), 28 deletions(-)
arch/s390/Kconfig +0 -1
@@ -90,7 +90,6 @@ config S390 select HAVE_GET_USER_PAGES_FAST select HAVE_ARCH_MUTEX_CPU_RELAX select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 - select HAVE_RCU_TABLE_FREE if SMP select ARCH_SAVE_PAGE_KEYS if HIBERNATION select ARCH_INLINE_SPIN_TRYLOCK select ARCH_INLINE_SPIN_TRYLOCK_BH
arch/s390/include/asm/pgalloc.h +0 -3
@@ -22,10 +22,7 @@ void crst_table_free(struct mm_struct *,unsigned long *page_table_alloc (struct mm_struct *,unsigned long );void page_table_free (struct mm_struct *,unsigned long *); -#ifdef CONFIG_HAVE_RCU_TABLE_FREE void page_table_free_rcu (struct mmu_gather *,unsigned long *); -void __tlb_remove_table (void *_table); -#endif static inline void clear_table (unsigned long *s,unsigned long val,size_t n) {
arch/s390/include/asm/tlb.h +1 -21
@@ -30,14 +30,10 @@struct mmu_gather {struct mm_struct *mm; -#ifdef CONFIG_HAVE_RCU_TABLE_FREE struct mmu_table_batch *batch; -#endif unsigned int fullmm; -unsigned int need_flush; }; -#ifdef CONFIG_HAVE_RCU_TABLE_FREEstruct mmu_table_batch {struct rcu_head rcu;unsigned int nr;
@@ -49,7 +45,6 @@ struct mmu_table_batch {extern void tlb_table_flush (struct mmu_gather *tlb);extern void tlb_remove_table (struct mmu_gather *tlb,void *table); -#endif static inline void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
@@ -57,29 +52,20 @@ static inline void tlb_gather_mmu(struct { tlb->mm = mm; tlb->fullmm = full_mm_flush; - tlb->need_flush =0 ; -#ifdef CONFIG_HAVE_RCU_TABLE_FREE tlb->batch =NULL ; -#endif if (tlb->fullmm)__tlb_flush_mm (mm); }static inline void tlb_flush_mmu (struct mmu_gather *tlb) { -if (!tlb->need_flush) -return ; - tlb->need_flush =0 ; -__tlb_flush_mm (tlb->mm); -#ifdef CONFIG_HAVE_RCU_TABLE_FREE tlb_table_flush (tlb); -#endif }static inline void tlb_finish_mmu (struct mmu_gather *tlb,unsigned long start,unsigned long end) { -tlb_flush_mmu (tlb); +tlb_table_flush (tlb); }/*
@@ -105,10 +91,8 @@ static inline void tlb_remove_page(strucstatic inline void pte_free_tlb (struct mmu_gather *tlb,pgtable_t pte,unsigned long address) { -#ifdef CONFIG_HAVE_RCU_TABLE_FREE if (!tlb->fullmm)return page_table_free_rcu (tlb, (unsigned long *) pte); -#endif page_table_free (tlb->mm, (unsigned long *) pte); }
@@ -125,10 +109,8 @@ static inline void pmd_free_tlb(struct m#ifdef __s390x__if (tlb->mm->context.asce_limit <= (1UL <<31 ))return ; -#ifdef CONFIG_HAVE_RCU_TABLE_FREE if (!tlb->fullmm)return tlb_remove_table (tlb, pmd); -#endif crst_table_free (tlb->mm, (unsigned long *) pmd);#endif }
@@ -146,10 +128,8 @@ static inline void pud_free_tlb(struct m#ifdef __s390x__if (tlb->mm->context.asce_limit <= (1UL <<42 ))return ; -#ifdef CONFIG_HAVE_RCU_TABLE_FREE if (!tlb->fullmm)return tlb_remove_table (tlb, pud); -#endif crst_table_free (tlb->mm, (unsigned long *) pud);#endif }
arch/s390/mm/pgtable.c +60 -3
75 lines not on this page · raw message
Greg KH
maintainerPATCH 42/68 serial: PL011: clear pending interrupts
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <[email protected]>
commit 9b96fbacda34079dea0638ee1e92c56286f6114a upstream.
Chanho Min reported that when the boot loader transfers control to the kernel, there may be pending interrupts causing the UART to lock up in an eternal loop trying to pick tokens from the FIFO (since the RX interrupt flag indicates there are tokens) while in practice there are no tokens - in fact there is only a pending IRQ flag.
This patch address the issue with a combination of two patches suggested by Russell King that clears and mask all interrupts at probe() and clears any pending error and RX interrupts at port startup time.
We suspect the spurious interrupts are a side-effect of switching the UART from FIFO to non-FIFO mode.
--- drivers/tty/serial/amba-pl011.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/tty/serial/amba-pl011.c +11 -4
@@ -1380,6 +1380,10 @@ static int pl011_startup(struct uart_por uap->port.uartclk =clk_get_rate (uap->clk); +/* Clear pending error and receive interrupts */ +writew (UART011_OEIS |UART011_BEIS |UART011_PEIS |UART011_FEIS | +UART011_RTIS |UART011_RXIS , uap->port.membase +UART011_ICR ); +/* * Allocate the IRQ */
@@ -1414,10 +1418,6 @@ static int pl011_startup(struct uart_por cr = UART01x_CR_UARTEN |UART011_CR_RXE |UART011_CR_TXE ;writew (cr, uap->port.membase +UART011_CR ); -/* Clear pending error interrupts */ -writew (UART011_OEIS |UART011_BEIS |UART011_PEIS |UART011_FEIS , - uap->port.membase +UART011_ICR ); -/* * initialise the old status of the modem signals */
@@ -1432,6 +1432,9 @@ static int pl011_startup(struct uart_por* as well. */ spin_lock_irq (&uap->port.lock); +/* Clear out any spuriously appearing RX interrupts */ +writew (UART011_RTIS |UART011_RXIS , + uap->port.membase +UART011_ICR ); uap->im =UART011_RTIM ;if (!pl011_dma_rx_running (uap)) uap->im |=UART011_RXIM ;
@@ -1916,6 +1919,10 @@ static int pl011_probe(struct amba_devic goto unmap; } +/* Ensure interrupts from this UART are masked and cleared */ +writew (0 , uap->port.membase +UART011_IMSC ); +writew (0xffff , uap->port.membase +UART011_ICR ); + uap->vendor = vendor; uap->lcrh_rx = vendor->lcrh_rx; uap->lcrh_tx = vendor->lcrh_tx;
Greg KH
maintainerPATCH 43/68 serial: PL011: move interrupt clearing
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <[email protected]>
commit c3d8b76f61586714cdc5f219ba45592a54caaa55 upstream.
Commit 360f748b204275229f8398cb2f9f53955db1503b "serial: PL011: clear pending interrupts" attempts to clear interrupts by writing to a yet-unassigned memory address. This fixes the issue.
The breaking patch is marked for stable so should be carried along with the other patch.
--- drivers/tty/serial/amba-pl011.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/tty/serial/amba-pl011.c +4 -4
@@ -1919,10 +1919,6 @@ static int pl011_probe(struct amba_devic goto unmap; } -/* Ensure interrupts from this UART are masked and cleared */ -writew (0 , uap->port.membase +UART011_IMSC ); -writew (0xffff , uap->port.membase +UART011_ICR ); - uap->vendor = vendor; uap->lcrh_rx = vendor->lcrh_rx; uap->lcrh_tx = vendor->lcrh_tx;
@@ -1939,6 +1935,10 @@ static int pl011_probe(struct amba_devic uap->port.line = i;pl011_dma_probe (uap); +/* Ensure interrupts from this UART are masked and cleared */ +writew (0 , uap->port.membase +UART011_IMSC ); +writew (0xffff , uap->port.membase +UART011_ICR ); +snprintf (uap->type,sizeof (uap->type),"PL011 rev%u" ,amba_rev (dev)); amba_ports[i] = uap;
Greg KH
maintainerPATCH 44/68 fcaps: clear the same personality flags as suid when fcaps are used
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Paris <[email protected]>
commit d52fc5dde171f030170a6cb78034d166b13c9445 upstream.
If a process increases permissions using fcaps all of the dangerous personality flags which are cleared for suid apps should also be cleared. Thus programs given priviledge with fcaps will continue to have address space randomization enabled even if the parent tried to disable it to make it easier to attack.
--- security/commoncap.c | 5 +++++ 1 file changed, 5 insertions(+)
security/commoncap.c +5 -0
@@ -514,6 +514,11 @@ int cap_bprm_set_creds(struct linux_binp } skip: +/* if we have fs caps, clear dangerous personality flags */ +if (!cap_issubset (new->cap_permitted, old->cap_permitted)) + bprm->per_clear |=PER_CLEAR_ON_SETID ; + +/* Don't let someone trace a set[ug]id/setpcap binary with the revised * credentials unless they have the appropriate permit */
Greg KH
maintainerPATCH 45/68 ath9k: fix max noise floor threshold
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rajkumar Manoharan <[email protected]>
commit 2ee0a07028d2cde6e131b73f029dae2b93c50f3a upstream.
Currently the maximum noise floor limit is set as too high (-60dB). The assumption of having a higher threshold limit is that it would help de-sensitize the receiver (reduce phy errors) from continuous interference. But when we have a bursty interference where there are collisions and then free air time and if the receiver is desensitized too much, it will miss the normal packets too. Lets make use of chips specific min, nom and max limits always. This patch helps to improve the connection stability in congested networks.
--- drivers/net/wireless/ath/ath9k/calib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath9k/calib.c +2 -3
@@ -20,7 +20,6 @@/* Common calibration code */ -#define ATH9K_NF_TOO_HIGH -60static int16_t ath9k_hw_get_nf_hist_mid (int16_t *nfCalBuffer) {
@@ -348,10 +347,10 @@ static void ath9k_hw_nf_sanitize(struct"NF calibrated [%s] [chain %d] is %d\n" , (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); -if (nf[i] >ATH9K_NF_TOO_HIGH ) { +if (nf[i] > limit->max) {ath_dbg (common,ATH_DBG_CALIBRATE ,"NF[%d] (%d) > MAX (%d), correcting to MAX\n" , - i, nf[i],ATH9K_NF_TOO_HIGH ); + i, nf[i], limit->max); nf[i] = limit->max; }else if (nf[i] < limit->min) { ath_dbg(common, ATH_DBG_CALIBRATE,
Greg KH
maintainerPATCH 46/68 xhci: Fix register save/restore order.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarah Sharp <[email protected]>
commit c7713e736526d8c9f6f87716fb90562a8ffaff2c upstream.
The xHCI 1.0 spec errata released on June 13, 2011, changes the ordering that the xHCI registers are saved and restored in. It moves the interrupt pending (IMAN) and interrupt control (IMOD) registers to be saved and restored last. I believe that's because the host controller may attempt to fetch the event ring table when interrupts are re-enabled. Therefore we need to restore the event ring registers before we re-enable interrupts.
This should be backported to kernels as old as 2.6.37, that contain the commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power management implementation"
--- drivers/usb/host/xhci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/xhci.c +4 -4
@@ -664,11 +664,11 @@ static void xhci_save_registers(struct x xhci->s3.dev_nt =xhci_readl (xhci, &xhci->op_regs->dev_notification); xhci->s3.dcbaa_ptr =xhci_read_64 (xhci, &xhci->op_regs->dcbaa_ptr); xhci->s3.config_reg =xhci_readl (xhci, &xhci->op_regs->config_reg); - xhci->s3.irq_pending =xhci_readl (xhci, &xhci->ir_set->irq_pending); - xhci->s3.irq_control =xhci_readl (xhci, &xhci->ir_set->irq_control); xhci->s3.erst_size =xhci_readl (xhci, &xhci->ir_set->erst_size); xhci->s3.erst_base =xhci_read_64 (xhci, &xhci->ir_set->erst_base); xhci->s3.erst_dequeue =xhci_read_64 (xhci, &xhci->ir_set->erst_dequeue); + xhci->s3.irq_pending =xhci_readl (xhci, &xhci->ir_set->irq_pending); + xhci->s3.irq_control =xhci_readl (xhci, &xhci->ir_set->irq_control); }static void xhci_restore_registers (struct xhci_hcd *xhci)
@@ -677,11 +677,11 @@ static void xhci_restore_registers(strucxhci_writel (xhci, xhci->s3.dev_nt, &xhci->op_regs->dev_notification);xhci_write_64 (xhci, xhci->s3.dcbaa_ptr, &xhci->op_regs->dcbaa_ptr);xhci_writel (xhci, xhci->s3.config_reg, &xhci->op_regs->config_reg); -xhci_writel (xhci, xhci->s3.irq_pending, &xhci->ir_set->irq_pending); -xhci_writel (xhci, xhci->s3.irq_control, &xhci->ir_set->irq_control);xhci_writel (xhci, xhci->s3.erst_size, &xhci->ir_set->erst_size);xhci_write_64 (xhci, xhci->s3.erst_base, &xhci->ir_set->erst_base);xhci_write_64 (xhci, xhci->s3.erst_dequeue, &xhci->ir_set->erst_dequeue); +xhci_writel (xhci, xhci->s3.irq_pending, &xhci->ir_set->irq_pending); +xhci_writel (xhci, xhci->s3.irq_control, &xhci->ir_set->irq_control); }static void xhci_set_cmd_ring_deq (struct xhci_hcd *xhci)
Greg KH
maintainerPATCH 47/68 Bluetooth: hci_core: fix NULL-pointer dereference at unregister
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 94324962066231a938564bebad0f941cd2d06bb2 upstream.
Make sure hci_dev_open returns immediately if hci_dev_unregister has been called.
This fixes a race between hci_dev_open and hci_dev_unregister which can lead to a NULL-pointer dereference.
Bug is 100% reproducible using hciattach and a disconnected serial port:
0. # hciattach -n /dev/ttyO1 any noflow
1. hci_dev_open called from hci_power_on grabs req lock
2. hci_init_req executes but device fails to initialise (times out eventually)
3. hci_dev_open is called from hci_sock_ioctl and sleeps on req lock
4. hci_uart_tty_close calls hci_dev_unregister and sleeps on req lock in hci_dev_do_close
5. hci_dev_open (1) releases req lock
6. hci_dev_do_close grabs req lock and returns as device is not up
7. hci_dev_unregister sleeps in destroy_workqueue
8. hci_dev_open (3) grabs req lock, calls hci_init_req and eventually sleeps
9. hci_dev_unregister finishes, while hci_dev_open is still running...
[ 79.627136] INFO: trying to register non-static key. [ 79.632354] the code is fine but needs lockdep annotation. [ 79.638122] turning off the locking correctness validator. [ 79.643920] [<c00188bc>] (unwind_backtrace+0x0/0xf8) from [<c00729c4>] (__lock_acquire+0x1590/0x1ab0) [ 79.653594] [<c00729c4>] (__lock_acquire+0x1590/0x1ab0) from [<c00733f8>] (lock_acquire+0x9c/0x128) [ 79.663085] [<c00733f8>] (lock_acquire+0x9c/0x128) from [<c0040a88>] (run_timer_softirq+0x150/0x3ac) [ 79.672668] [<c0040a88>] (run_timer_softirq+0x150/0x3ac) from [<c003a3b8>] (__do_softirq+0xd4/0x22c) [ 79.682281] [<c003a3b8>] (__do_softirq+0xd4/0x22c) from [<c003a924>] (irq_exit+0x8c/0x94) [ 79.690856] [<c003a924>] (irq_exit+0x8c/0x94) from [<c0013a50>] (handle_IRQ+0x34/0x84) [ 79.699157] [<c0013a50>] (handle_IRQ+0x34/0x84) from [<c0008530>] (omap3_intc_handle_irq+0x48/0x4c) [ 79.708648] [<c0008530>] (omap3_intc_handle_irq+0x48/0x4c) from [<c037499c>] (__irq_usr+0x3c/0x60) [ 79.718048] Exception stack(0xcf281fb0 to 0xcf281ff8) [ 79.723358] 1fa0: 0001e6a0 be8dab00 0001e698 00036698 [ 79.731933] 1fc0: 0002df98 0002df38 0000001f 00000000 b6f234d0 00000000 00000004 00000000 [ 79.740509] 1fe0: 0001e6f8 be8d6aa0 be8dac50 0000aab8 80000010 ffffffff [ 79.747497] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 79.756011] pgd = cf3b4000 [ 79.758850] [00000000] *pgd=8f0c7831, *pte=00000000, *ppte=00000000 [ 79.765502] Internal error: Oops: 80000007 [#1] [ 79.770294] Modules linked in: [ 79.773529] CPU: 0 Tainted: G W (3.3.0-rc6-00002-gb5d5c87 #421) [ 79.781066] PC is at 0x0 [ 79.783721] LR is at run_timer_softirq+0x16c/0x3ac [ 79.788787] pc : [<00000000>] lr : [<c0040aa4>] psr: 60000113 [ 79.788787] sp : cf281ee0 ip : 00000000 fp : cf280000 [ 79.800903] r10: 00000004 r9 : 00000100 r8 : b6f234d0 [ 79.806427] r7 : c0519c28 r6 : cf093488 r5 : c0561a00 r4 : 00000000 [ 79.813323] r3 : 00000000 r2 : c054eee0 r1 : 00000001 r0 : 00000000 [ 79.820190] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 79.827728] Control: 10c5387d Table: 8f3b4019 DAC: 00000015 [ 79.833801] Process gpsd (pid: 1265, stack limit = 0xcf2802e8) [ 79.839965] Stack: (0xcf281ee0 to 0xcf282000) [ 79.844573] 1ee0: 00000002 00000000 c0040a24 00000000 00000002 cf281f08 00200200 00000000 [ 79.853210] 1f00: 00000000 cf281f18 cf281f08 00000000 00000000 00000000 cf281f18 cf281f18 [ 79.861816] 1f20: 00000000 00000001 c056184c 00000000 00000001 b6f234d0 c0561848 00000004 [ 79.870452] 1f40: cf280000 c003a3b8 c051e79c 00000001 00000000 00000100 3fa9e7b8 0000000a [ 79.879089] 1f60: 00000025 cf280000 00000025 00000000 00000000 b6f234d0 00000000 00000004 [ 79.887756] 1f80: 00000000 c003a924 c053ad38 c0013a50 fa200000 cf281fb0 ffffffff c0008530 [ 79.896362] 1fa0: 0001e6a0 0000aab8 80000010 c037499c 0001e6a0 be8dab00 0001e698 00036698 [ 79.904998] 1fc0: 0002df98 0002df38 0000001f 00000000 b6f234d0 00000000 00000004 00000000 [ 79.913665] 1fe0: 0001e6f8 be8d6aa0 be8dac50 0000aab8 80000010 ffffffff 00fbf700 04ffff00 [ 79.922302] [<c0040aa4>] (run_timer_softirq+0x16c/0x3ac) from [<c003a3b8>] (__do_softirq+0xd4/0x22c) [ 79.931945] [<c003a3b8>] (__do_softirq+0xd4/0x22c) from [<c003a924>] (irq_exit+0x8c/0x94) [ 79.940582] [<c003a924>] (irq_exit+0x8c/0x94) from [<c0013a50>] (handle_IRQ+0x34/0x84) [ 79.948913] [<c0013a50>] (handle_IRQ+0x34/0x84) from [<c0008530>] (omap3_intc_handle_irq+0x48/0x4c) [ 79.958404] [<c0008530>] (omap3_intc_handle_irq+0x48/0x4c) from [<c037499c>] (__irq_usr+0x3c/0x60) [ 79.967773] Exception stack(0xcf281fb0 to 0xcf281ff8) [ 79.973083] 1fa0: 0001e6a0 be8dab00 0001e698 00036698 [ 79.981658] 1fc0: 0002df98 0002df38 0000001f 00000000 b6f234d0 00000000 00000004 00000000 [ 79.990234] 1fe0: 0001e6f8 be8d6aa0 be8dac50 0000aab8 80000010 ffffffff [ 79.997161] Code: bad PC value [ 80.000396] ---[ end trace 6f6739840475f9ee ]--- [ 80.005279] Kernel panic - not syncing: Fatal exception in interrupt
--- include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_core.c | 7 +++++++ 2 files changed, 8 insertions(+)
include/net/bluetooth/hci.h +1 -0
@@ -84,6 +84,7 @@ enum {HCI_SERVICE_CACHE ,HCI_LINK_KEYS ,HCI_DEBUG_KEYS , +HCI_UNREGISTER , HCI_RESET, };
net/bluetooth/hci_core.c +7 -0
@@ -510,6 +510,11 @@ int hci_dev_open(__u16 dev)hci_req_lock (hdev); +if (test_bit (HCI_UNREGISTER , &hdev->flags)) { + ret = -ENODEV ; + goto done; + } +if (hdev->rfkill &&rfkill_blocked (hdev->rfkill)) { ret = -ERFKILL ; goto done;
@@ -1540,6 +1545,8 @@ int hci_unregister_dev(struct hci_dev *hBT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus); +set_bit (HCI_UNREGISTER , &hdev->flags); +write_lock_bh (&hci_dev_list_lock);list_del (&hdev->list);write_unlock_bh (&hci_dev_list_lock);
Greg KH
maintainerPATCH 48/68 pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit 868fea0507308b6548bba7debe5f5c2d5ca47fca upstream.
ML7831 is companion chip for Intel Atom E6xx series.
--- drivers/gpio/Kconfig | 11 ++++++----- drivers/gpio/gpio-pch.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-)
drivers/gpio/Kconfig +6 -5
@@ -387,7 +387,7 @@ config GPIO_LANGWELL Say Y here to support Intel Langwell/Penwell GPIO. config GPIO_PCH - tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GPIO" + tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7223/ML7831) GPIO" depends on PCI && X86 select GENERIC_IRQ_CHIP help
@@ -395,11 +395,12 @@ config GPIO_PCH which is an IOH(Input/Output Hub) for x86 embedded processor. This driver can access PCH GPIO device. - This driver also can be used for OKI SEMICONDUCTOR IOH(Input/ - Output Hub), ML7223. + This driver also can be used for LAPIS Semiconductor IOH(Input/ + Output Hub), ML7223 and ML7831. ML7223 IOH is for MP(Media Phone) use. - ML7223 is companion chip for Intel Atom E6xx series. - ML7223 is completely compatible for Intel EG20T PCH. + ML7831 IOH is for general purpose use. + ML7223/ML7831 is companion chip for Intel Atom E6xx series. + ML7223/ML7831 is completely compatible for Intel EG20T PCH. config GPIO_ML_IOH tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support"
drivers/gpio/gpio-pch.c +1 -0
@@ -524,6 +524,7 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gpio_ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043) }, + { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803) }, { 0, } };MODULE_DEVICE_TABLE (pci, pch_gpio_pcidev_id);
Greg KH
maintainerPATCH 49/68 gpio: Add missing spin_lock_init in gpio-pch driver
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Axel Lin <[email protected]>
commit d166370ad86b33b1111af3a0cdd7de94e03789a6 upstream.
This bug was introduced by commit d568a681
"gpio-pch: add spinlock in suspend/resume processing" which adds a spinlock to struct pch_gpio but never init the spinlock.
--- drivers/gpio/gpio-pch.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/gpio-pch.c +1 -0
@@ -392,6 +392,7 @@ static int __devinit pch_gpio_probe(stru chip->reg = chip->base;pci_set_drvdata (pdev, chip);mutex_init (&chip->lock); +spin_lock_init (&chip->spinlock);pch_gpio_setup (chip); ret =gpiochip_add (&chip->gpio);if (ret) {
Greg KH
maintainerPATCH 50/68 usb: gadget: pch_udc: Fix disconnect issue
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit c50a3bff0edb0acd49d8033a12ea4668e09a31ad upstream.
ISSUE:
When the driver notifies a gadget of a disconnect event, a system rarely freezes.
CAUSE:
When the driver calls dev->driver->disconnect(), it is not calling spin_unlock().
--- drivers/usb/gadget/pch_udc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/usb/gadget/pch_udc.c +4 -1
@@ -2335,8 +2335,11 @@ static void pch_udc_svc_ur_interrupt(str/* Complete request queue */ empty_req_queue (ep); } -if (dev->driver && dev->driver->disconnect) +if (dev->driver && dev->driver->disconnect) { +spin_unlock (&dev->lock); dev->driver->disconnect (&dev->gadget); +spin_lock (&dev->lock); + } }/**
Greg KH
maintainerPATCH 51/68 usb: gadget: pch_udc: Fix wrong return value
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit c802672cd36cd063bfd54d54c8c34825ab5b2357 upstream.
ISSUE:
If the return value of pch_udc_pcd_init() is False, the return value of this function is unsettled.
Since pch_udc_pcd_init() always returns 0, there is not actually the issue.
CAUSE:
If pch_udc_pcd_init() is True, the variable, retval, is not set for an appropriate value.
--- drivers/usb/gadget/pch_udc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/gadget/pch_udc.c +3 -1
@@ -2915,8 +2915,10 @@ static int pch_udc_probe(struct pci_dev } pch_udc = dev;/* initialize the hardware */ -if (pch_udc_pcd_init (dev)) +if (pch_udc_pcd_init (dev)) { + retval = -ENODEV ; goto finished; + }if (request_irq (pdev->irq, pch_udc_isr,IRQF_SHARED ,KBUILD_MODNAME , dev)) { dev_err(&pdev->dev, "%s: request_irq(%d) fail\n", __func__,
Greg KH
maintainerPATCH 52/68 usb: gadget: pch_udc: Fix USB suspend issue
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit 84566abba058b2aae8d603dfa90b5a3778a6714f upstream.
ISSUE:
After USB Suspend, a system rarely freezes.
CAUSE:
When USB Suspend occurred, the driver is not notifying a gadget of the event.
--- drivers/usb/gadget/pch_udc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/usb/gadget/pch_udc.c +8 -1
@@ -2475,8 +2475,15 @@ static void pch_udc_dev_isr(struct pch_uif (dev_intr &UDC_DEVINT_SC )pch_udc_svc_cfg_interrupt (dev);/* USB Suspend interrupt */ -if (dev_intr &UDC_DEVINT_US ) +if (dev_intr &UDC_DEVINT_US ) { +if (dev->driver + && dev->driver->suspend) { +spin_unlock (&dev->lock); + dev->driver->suspend (&dev->gadget); +spin_lock (&dev->lock); + }dev_dbg (&dev->pdev->dev,"USB_SUSPEND\n" ); + }/* Clear the SOF interrupt, if enabled */ if (dev_intr &UDC_DEVINT_SOF )dev_dbg (&dev->pdev->dev,"SOF\n" );
Greg KH
maintainerPATCH 53/68 usb: gadget: pch_udc: Fix usb/gadget/pch_udc: Fix ether gadget connect/disconnect issue
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit 1c575d2d2e3ff2a7cb3c2e2165064199cfd8ad32 upstream.
ISSUE:
After a USB cable is connect/disconnected, the system rarely freezes.
CAUSE:
Since the USB device controller cannot know to disconnect the USB cable, when it is used without detecting VBUS by GPIO, the UDC driver does not notify to USB Gadget.
Since USB Gadget cannot know to disconnect, a false setting occurred when the USB cable is connected/disconnect repeatedly.
--- drivers/usb/gadget/pch_udc.c | 70 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 4 deletions(-)
drivers/usb/gadget/pch_udc.c +66 -4
@@ -311,6 +311,7 @@ struct pch_udc_ep {* @registered: driver regsitered with system * @suspended: driver in suspended state * @connected: gadget driver associated +* @vbus_session: required vbus_session state * @set_cfg_not_acked: pending acknowledgement 4 setup * @waiting_zlp_ack: pending acknowledgement 4 ZLP * @data_requests: DMA pool for data requests
@@ -337,6 +338,7 @@ struct pch_udc_dev { registered:1, suspended:1, connected:1, + vbus_session:1, set_cfg_not_acked:1, waiting_zlp_ack:1;struct pci_pool *data_requests;
@@ -554,6 +556,31 @@ static void pch_udc_clear_disconnect(str }/** +* pch_udc_reconnect() - This API initializes usb device controller, +* and clear the disconnect status. +* @dev: Reference to pch_udc_regs structure +*/ +static void pch_udc_init (struct pch_udc_dev *dev); +static void pch_udc_reconnect (struct pch_udc_dev *dev) +{ +pch_udc_init (dev); + +/* enable device interrupts */ +/* pch_udc_enable_interrupts() */ +pch_udc_bit_clr (dev,UDC_DEVIRQMSK_ADDR , +UDC_DEVINT_UR |UDC_DEVINT_US | +UDC_DEVINT_ENUM | +UDC_DEVINT_SI |UDC_DEVINT_SC ); + +/* Clear the disconnect */ +pch_udc_bit_set (dev,UDC_DEVCTL_ADDR ,UDC_DEVCTL_RES ); +pch_udc_bit_clr (dev,UDC_DEVCTL_ADDR ,UDC_DEVCTL_SD ); +mdelay (1 ); +/* Resume USB signalling */ +pch_udc_bit_clr (dev,UDC_DEVCTL_ADDR ,UDC_DEVCTL_RES ); +} + +/** * pch_udc_vbus_session() - set or clearr the disconnect status. * @dev: Reference to pch_udc_regs structure * @is_active: Parameter specifying the action
@@ -563,10 +590,18 @@ static void pch_udc_clear_disconnect(strstatic inline void pch_udc_vbus_session (struct pch_udc_dev *dev,int is_active) { -if (is_active) -pch_udc_clear_disconnect (dev); -else +if (is_active) { +pch_udc_reconnect (dev); + dev->vbus_session =1 ; + }else { +if (dev->driver && dev->driver->disconnect) { +spin_unlock (&dev->lock); + dev->driver->disconnect (&dev->gadget); +spin_lock (&dev->lock); + }pch_udc_set_disconnect (dev); + dev->vbus_session =0 ; + } }/**
@@ -1126,7 +1161,17 @@ static int pch_udc_pcd_pullup(struct usbif (!gadget)return -EINVAL ; dev = container_of(gadget, struct pch_udc_dev, gadget); -pch_udc_vbus_session (dev, is_on); +if (is_on) { +pch_udc_reconnect (dev); + }else { +if (dev->driver && dev->driver->disconnect) { +spin_unlock (&dev->lock); + dev->driver->disconnect (&dev->gadget); +spin_lock (&dev->lock); + } +pch_udc_set_disconnect (dev); + } +return 0 ; }
@@ -2482,6 +2527,15 @@ static void pch_udc_dev_isr(struct pch_u dev->driver->suspend (&dev->gadget);spin_lock (&dev->lock); } + +if (dev->vbus_session ==0 ) { +if (dev->driver && dev->driver->disconnect) { +spin_unlock (&dev->lock); + dev->driver->disconnect (&dev->gadget); +spin_lock (&dev->lock); + } +pch_udc_reconnect (dev); + }dev_dbg (&dev->pdev->dev,"USB_SUSPEND\n" ); }/* Clear the SOF interrupt, if enabled */
@@ -2509,6 +2563,14 @@ static irqreturn_t pch_udc_isr(int irq, dev_intr =pch_udc_read_device_interrupts (dev); ep_intr =pch_udc_read_ep_interrupts (dev); +/* For a hot plug, this find that the controller is hung up. */ +if (dev_intr == ep_intr) +if (dev_intr ==pch_udc_readl (dev,UDC_DEVCFG_ADDR )) { +dev_dbg (&dev->pdev->dev,"UDC: Hung up\n" ); +/* The controller is reset */ +pch_udc_writel (dev,UDC_SRST ,UDC_SRST_ADDR ); +return IRQ_HANDLED ; + }if (dev_intr)/* Clear device interrupts */ pch_udc_write_device_interrupts (dev, dev_intr);
Greg KH
maintainerPATCH 54/68 usb: gadget: pch_udc: Reduce redundant interrupt
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit 833310402c54ad9b676b465fc53ad276b13d36be upstream.
ISSUE:
USB Suspend interrupts occur frequently.
CAUSE:
When it is called pch_udc_reconnect() in USB Suspend, it repeats reset and Suspend.
SOLUTION:pch_udc_reconnect() does not enable all interrupts. When an enumeration event occurred the driver enables all interrupts.
--- drivers/usb/gadget/pch_udc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/usb/gadget/pch_udc.c +6 -3
@@ -568,9 +568,7 @@ static void pch_udc_reconnect(struct pch/* enable device interrupts */ /* pch_udc_enable_interrupts() */ pch_udc_bit_clr (dev,UDC_DEVIRQMSK_ADDR , -UDC_DEVINT_UR |UDC_DEVINT_US | -UDC_DEVINT_ENUM | -UDC_DEVINT_SI |UDC_DEVINT_SC ); +UDC_DEVINT_UR |UDC_DEVINT_ENUM );/* Clear the disconnect */ pch_udc_bit_set (dev,UDC_DEVCTL_ADDR ,UDC_DEVCTL_RES );
@@ -2419,6 +2417,11 @@ static void pch_udc_svc_enum_interrupt(spch_udc_set_dma (dev,DMA_DIR_TX );pch_udc_set_dma (dev,DMA_DIR_RX );pch_udc_ep_set_rrdy (&(dev->ep[UDC_EP0OUT_IDX ])); + +/* enable device interrupts */ +pch_udc_enable_interrupts (dev,UDC_DEVINT_UR |UDC_DEVINT_US | +UDC_DEVINT_ES |UDC_DEVINT_ENUM | +UDC_DEVINT_SI |UDC_DEVINT_SC ); }/**
Greg KH
maintainerPATCH 55/68 ACPICA: Fix to allow region arguments to reference other scopes
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lin Ming <[email protected]>
commit 8931d9ea78848b073bf299594f148b83abde4a5e upstream.
Allow referenced objects to be in a different scope.
http://www.acpica.org/bugzilla/show_bug.cgi?id=937
http://marc.info/?l=linux-acpi&m=131636632718222&w=2
ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110112/psargs-359) ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110112/nsinit-349)
Scope (_SB)
{
Name (RAMB, 0xDF5A1018)
OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000)
}For above ASL code, we need to save scope node(\_SB) to lookup the argument node(\_SB.RAMB).
--- drivers/acpi/acpica/acobject.h | 1 + drivers/acpi/acpica/dsargs.c | 2 +- drivers/acpi/acpica/excreate.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/acpi/acpica/acobject.h +1 -0
@@ -358,6 +358,7 @@ typedef enum {*/ struct acpi_object_extra { ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ +struct acpi_namespace_node *scope_node;void *region_context;/* Region-specific data */ u8 *aml_start;u32 aml_length;
drivers/acpi/acpica/dsargs.c +1 -1
@@ -384,7 +384,7 @@ acpi_status acpi_ds_get_region_arguments/* Execute the argument AML */ - status =acpi_ds_execute_arguments (node, node->parent, + status =acpi_ds_execute_arguments (node, extra_desc->extra.scope_node, extra_desc->extra.aml_length, extra_desc->extra.aml_start);if (ACPI_FAILURE (status)) {
drivers/acpi/acpica/excreate.c +6 -0
@@ -330,6 +330,12 @@ acpi_ex_create_region(u8 * aml_start, region_obj2 = obj_desc->common.next_object; region_obj2->extra.aml_start = aml_start; region_obj2->extra.aml_length = aml_length; +if (walk_state->scope_info) { + region_obj2->extra.scope_node = + walk_state->scope_info->scope.node; + }else { + region_obj2->extra.scope_node = node; + }/* Init the region from the operands */
Greg KH
maintainerPATCH 56/68 security: fix compile error in commoncap.c
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonghwan Choi <[email protected]>
commit 51b79bee627d526199b2f6a6bef8ee0c0739b6d1 upstream.
Add missing "personality.h"security/commoncap.c: In function 'cap_bprm_set_creds':security/commoncap.c:510: error: 'PER_CLEAR_ON_SETID' undeclared (first use in this function) security/commoncap.c:510: error: (Each undeclared identifier is reported only once security/commoncap.c:510: error: for each function it appears in.)
--- security/commoncap.c | 1 + 1 file changed, 1 insertion(+)
security/commoncap.c +1 -0
@@ -28,6 +28,7 @@#include <linux/prctl.h> #include <linux/securebits.h> #include <linux/user_namespace.h> +#include <linux/personality.h> /* * If a non-root user executes a setuid-root binary in
Greg KH
maintainerPATCH 57/68 pch_gbe: Do not abort probe on bad MAC
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Darren Hart <[email protected]>
commit 2b53d07891630dead46d65c8f896955fd3ae0302 upstream.
If the MAC is invalid or not implemented, do not abort the probe. Issue a warning and prevent bringing the interface up until a MAC is set manually (via ifconfig $IFACE hw ether $MAC).
Tested on two platforms, one with a valid MAC, the other without a MAC. The real MAC is used if present, the interface fails to come up until the MAC is set on the other. They successfully get an IP over DHCP and pass a simple ping and login over ssh test.
This is meant to allow the Inforce SYS940X development board:
http://www.inforcecomputing.com/SYS940X_ECX.html
(and others suffering from a missing MAC) to work with the mainline kernel. Without this patch, the probe will fail and the interface will not be created, preventing the user from configuring the MAC manually.
This does not make any attempt to address a missing or invalid MAC for the pch_phub driver.
--- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +14 -3
@@ -1745,6 +1745,12 @@ int pch_gbe_up(struct pch_gbe_adapter *astruct pch_gbe_rx_ring *rx_ring = adapter->rx_ring;int err; +/* Ensure we have a valid MAC */ +if (!is_valid_ether_addr (adapter->hw.mac.addr)) { +pr_err ("Error: Invalid MAC address\n" ); +return -EINVAL ; + } +/* hardware has been reset, we need to reload some things */ pch_gbe_set_multi (netdev);
@@ -2467,9 +2473,14 @@ static int pch_gbe_probe(struct pci_devmemcpy (netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);if (!is_valid_ether_addr (netdev->dev_addr)) { -dev_err (&pdev->dev,"Invalid MAC Address\n" ); - ret = -EIO ; - goto err_free_adapter; +/* +* If the MAC is invalid (or just missing), display a warning +* but do not abort setting up the device. pch_gbe_up will +* prevent the interface from being brought up until a valid MAC +* is set. +*/ +dev_err (&pdev->dev,"Invalid MAC address, " +"interface disabled.\n" ); }setup_timer (&adapter->watchdog_timer, pch_gbe_watchdog, (unsigned long )adapter);
Greg KH
maintainerPATCH 58/68 pch_gbe: memory corruption calling pch_gbe_validate_option()
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 73f98eab9b9e0bab492ca06add5657d9e702ddb1 upstream.
pch_gbe_validate_option() modifies 32 bits of memory but we pass &hw->phy.autoneg_advertised which only has 16 bits and &hw->mac.fc which only has 8 bits.
--- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c +8 -7
@@ -321,10 +321,10 @@ static void pch_gbe_check_copper_optionspr_debug ("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n" ); hw->phy.autoneg_advertised = opt.def; }else { - hw->phy.autoneg_advertised = AutoNeg; -pch_gbe_validate_option ( - (int *)(&hw->phy.autoneg_advertised), - &opt, adapter); +int tmp = AutoNeg; + +pch_gbe_validate_option (&tmp, &opt, adapter); + hw->phy.autoneg_advertised = tmp; } }
@@ -495,9 +495,10 @@ void pch_gbe_check_options(struct pch_gb .arg = { .l = { .nr = (int)ARRAY_SIZE(fc_list), .p = fc_list } } }; - hw->mac.fc = FlowControl; -pch_gbe_validate_option ((int *)(&hw->mac.fc), - &opt, adapter); +int tmp = FlowControl; + +pch_gbe_validate_option (&tmp, &opt, adapter); + hw->mac.fc = tmp; }pch_gbe_check_copper_options (adapter);
Greg KH
maintainerPATCH 59/68 pch_dma: Support new device LAPIS Semiconductor ML7831 IOH
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit ca7fe2db892dcf91b2c72ee352eda4ff867903a7 upstream.
ML7831 is companion chip for Intel Atom E6xx series.
--- drivers/dma/Kconfig | 13 ++++++------- drivers/dma/pch_dma.c | 8 ++++++-- 2 files changed, 12 insertions(+), 9 deletions(-)
drivers/dma/Kconfig +6 -7
@@ -201,18 +201,17 @@ config PL330_DMA platform_data for a dma-pl330 device. config PCH_DMA - tristate "Intel EG20T PCH / OKI Semi IOH(ML7213/ML7223) DMA support" + tristate "Intel EG20T PCH / OKI Semi IOH(ML7213/ML7223/ML7831) DMA support" depends on PCI && X86 select DMA_ENGINE help Enable support for Intel EG20T PCH DMA engine. - This driver also can be used for OKI SEMICONDUCTOR IOH(Input/ - Output Hub), ML7213 and ML7223. - ML7213 IOH is for IVI(In-Vehicle Infotainment) use and ML7223 IOH is - for MP(Media Phone) use. - ML7213/ML7223 is companion chip for Intel Atom E6xx series. - ML7213/ML7223 is completely compatible for Intel EG20T PCH. + Output Hub), ML7213, ML7223 and ML7831. + ML7213 IOH is for IVI(In-Vehicle Infotainment) use, ML7223 IOH is + for MP(Media Phone) use and ML7831 IOH is for general purpose use. + ML7213/ML7223/ML7831 is companion chip for Intel Atom E6xx series. + ML7213/ML7223/ML7831 is completely compatible for Intel EG20T PCH. config IMX_SDMA tristate "i.MX SDMA support"
drivers/dma/pch_dma.c +6 -2
@@ -1018,6 +1018,8 @@ static void __devexit pch_dma_remove(str#define PCI_DEVICE_ID_ML7223_DMA2_4CH 0x800E#define PCI_DEVICE_ID_ML7223_DMA3_4CH 0x8017#define PCI_DEVICE_ID_ML7223_DMA4_4CH 0x803B +#define PCI_DEVICE_ID_ML7831_DMA1_8CH 0x8810 +#define PCI_DEVICE_ID_ML7831_DMA2_4CH 0x8815DEFINE_PCI_DEVICE_TABLE (pch_dma_id_table) = { {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_EG20T_PCH_DMA_8CH ),8 },
@@ -1030,6 +1032,8 @@ DEFINE_PCI_DEVICE_TABLE(pch_dma_id_table { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_DMA2_4CH), 4}, /* Video SPI */ { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_DMA3_4CH), 4}, /* Security */ { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_DMA4_4CH), 4}, /* FPGA */ + { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_DMA1_8CH), 8}, /* UART */ + { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_DMA2_4CH), 4}, /* SPI */ { 0, }, };
@@ -1057,7 +1061,7 @@ static void __exit pch_dma_exit(void)module_init (pch_dma_init);module_exit (pch_dma_exit); -MODULE_DESCRIPTION ("Intel EG20T PCH / OKI SEMICONDUCTOR ML7213 IOH " -"DMA controller driver" ); +MODULE_DESCRIPTION ("Intel EG20T PCH / OKI SEMICON ML7213/ML7223/ML7831 IOH" +"DMA controller driver" );MODULE_AUTHOR ("Yong Wang <[email protected]>" );MODULE_LICENSE ("GPL v2" );
Greg KH
maintainerPATCH 60/68 spi-topcliff-pch: fix -Wuninitialized warning
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danny Kukawka <[email protected]>
commit de3bd7e6de25141c466773c2e0fa319b2fa93655 upstream.
Fix for:drivers/spi/spi-topcliff-pch.c: In function ‘pch_spi_handler_sub’:drivers/spi/spi-topcliff-pch.c:325:17: warning: ‘bpw_len’ may be
used uninitialized in this function [-Wuninitialized]drivers/spi/spi-topcliff-pch.c:325:42: warning: ‘rx_index’ may be
used uninitialized in this function [-Wuninitialized]drivers/spi/spi-topcliff-pch.c:325:42: warning: ‘tx_index’ may be
used uninitialized in this function [-Wuninitialized]
Move usage of tx_index, rx_index and bpw_len into the same block as where they are set to prevent uninitialized usage.
v2: instead of init variables with 0 move the whole block
[This patch title "warnings" makes you think "This patch is not for bug fix". However, this patch surely patch for bug fix.]
--- drivers/spi/spi-topcliff-pch.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)
drivers/spi/spi-topcliff-pch.c +16 -15
@@ -315,22 +315,23 @@ static void pch_spi_handler_sub(struct p data->tx_index = tx_index; data->rx_index = rx_index; - } - -/* if transfer complete interrupt */ -if (reg_spsr_val &SPSR_FI_BIT ) { -if ((tx_index == bpw_len) && (rx_index == tx_index)) { -/* disable interrupts */ -pch_spi_setclr_reg (data->master,PCH_SPCR ,0 ,PCH_ALL ); +/* if transfer complete interrupt */ +if (reg_spsr_val &SPSR_FI_BIT ) { +if ((tx_index == bpw_len) && (rx_index == tx_index)) { +/* disable interrupts */ +pch_spi_setclr_reg (data->master,PCH_SPCR ,0 , +PCH_ALL ); -/* transfer is completed; -inform pch_spi_process_messages */ - data->transfer_complete = true; - data->transfer_active = false; -wake_up (&data->wait); - }else { -dev_err (&data->master->dev, -"%s : Transfer is not completed" , __func__); +/* transfer is completed; +inform pch_spi_process_messages */ + data->transfer_complete = true; + data->transfer_active = false; +wake_up (&data->wait); + }else { +dev_err (&data->master->dev, +"%s : Transfer is not completed" , + __func__); + } } } }
Greg KH
maintainerPATCH 61/68 spi-topcliff-pch: Support new device LAPIS Semiconductor ML7831 IOH
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomoya MORINAGA <[email protected]>
commit 92b3a5c1bc3c7da1ae4675d014124f4a97ddb632 upstream.
ML7831 is companion chip for Intel Atom E6xx series.
--- drivers/spi/Kconfig | 6 +++--- drivers/spi/spi-topcliff-pch.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/spi/Kconfig +3 -3
@@ -346,14 +346,14 @@ config SPI_TI_SSP serial port. config SPI_TOPCLIFF_PCH - tristate "Intel EG20T PCH/OKI SEMICONDUCTOR ML7213 IOH SPI controller" + tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) SPI" depends on PCI help SPI driver for the Topcliff PCH (Platform Controller Hub) SPI bus used in some x86 embedded processors. - This driver also supports the ML7213, a companion chip for the - Atom E6xx series and compatible with the Intel EG20T PCH. + This driver also supports the ML7213/ML7223/ML7831, a companion chip + for the Atom E6xx series and compatible with the Intel EG20T PCH. config SPI_TXX9 tristate "Toshiba TXx9 SPI controller"
drivers/spi/spi-topcliff-pch.c +4 -1
@@ -95,16 +95,18 @@#define PCH_CLOCK_HZ 50000000#define PCH_MAX_SPBR 1023 -/* Definition for ML7213 by OKI SEMICONDUCTOR */ +/* Definition for ML7213/ML7831 by OKI SEMICONDUCTOR */ #define PCI_VENDOR_ID_ROHM 0x10DB#define PCI_DEVICE_ID_ML7213_SPI 0x802c#define PCI_DEVICE_ID_ML7223_SPI 0x800F +#define PCI_DEVICE_ID_ML7831_SPI 0x8816/* * Set the number of SPI instance max * Intel EG20T PCH : 1ch * OKI SEMICONDUCTOR ML7213 IOH : 2ch * OKI SEMICONDUCTOR ML7223 IOH : 1ch +* OKI SEMICONDUCTOR ML7831 IOH : 1ch */ #define PCH_SPI_MAX_DEV 2
@@ -218,6 +220,7 @@ static struct pci_device_id pch_spi_pcid { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_GE_SPI), 1, }, { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_SPI), 2, }, { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_SPI), 1, }, + { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_SPI), 1, }, { } };
Greg KH
maintainerPATCH 62/68 Bluetooth: Adding USB device 13d3:3375 as an Atheros AR3012.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eran <[email protected]>
commit 9498ba7a1d38d42eef4ef6d906ab1743c9f0fd6f upstream.
The bluetooth module in the Asus UX31/UX21 is based on Atheros AR3012 and requires a firmware to be uploaded before it's usable.
output of usb-devices for this module:
T: Bus=01 Lev=02 Prnt=02 Port=07 Cnt=03 Dev#= 6 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3375 Rev=00.02 S: Manufacturer=Atheros Communications S: Product=Bluetooth USB Host Controller S: SerialNumber=Alaska Day 2006 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
--- drivers/bluetooth/ath3k.c | 2 ++ drivers/bluetooth/btusb.c | 1 + 2 files changed, 3 insertions(+)
drivers/bluetooth/ath3k.c +2 -0
@@ -71,6 +71,7 @@ static struct usb_device_id ath3k_table[/* Atheros AR3012 with sflash firmware*/ { USB_DEVICE(0x0CF3, 0x3004) }, + { USB_DEVICE(0x13d3, 0x3375) },/* Atheros AR5BBU12 with sflash firmware */ { USB_DEVICE(0x0489, 0xE02C) },
@@ -87,6 +88,7 @@ static struct usb_device_id ath3k_blist_/* Atheros AR3012 with sflash firmware*/ { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, { }/* Terminating entry */ };
drivers/bluetooth/btusb.c +1 -0
@@ -126,6 +126,7 @@ static struct usb_device_id blacklist_ta/* Atheros 3012 with sflash firmware */ { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, /* Atheros AR5BBU12 with sflash firmware */ { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
Greg KH
maintainerPATCH 63/68 Bluetooth: Add Atheros maryann PIDVID support
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Cho, Yu-Chen" <[email protected]>
commit 07c0ea874d43c299d185948452945a361052b6e3 upstream.
Add Atheros maryann 0cf3:311d PIDVID support
This module is AR3012 Series.
Include /sys/kernel/debug/usb/devices output here for reference
before:
T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cf3 ProdID=311d Rev= 0.01 S: Manufacturer=Atheros Communications S: Product=Bluetooth USB Host Controller S: SerialNumber=Alaska Day 2006 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
after:
T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cf3 ProdID=311d Rev= 0.02 S: Manufacturer=Atheros Communications S: Product=Bluetooth USB Host Controller S: SerialNumber=Alaska Day 2006 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
--- drivers/bluetooth/ath3k.c | 2 ++ drivers/bluetooth/btusb.c | 1 + 2 files changed, 3 insertions(+)
drivers/bluetooth/ath3k.c +2 -0
@@ -71,6 +71,7 @@ static struct usb_device_id ath3k_table[/* Atheros AR3012 with sflash firmware*/ { USB_DEVICE(0x0CF3, 0x3004) }, + { USB_DEVICE(0x0CF3, 0x311D) }, { USB_DEVICE(0x13d3, 0x3375) },/* Atheros AR5BBU12 with sflash firmware */
@@ -88,6 +89,7 @@ static struct usb_device_id ath3k_blist_/* Atheros AR3012 with sflash firmware*/ { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, { } /* Terminating entry */
drivers/bluetooth/btusb.c +1 -0
@@ -126,6 +126,7 @@ static struct usb_device_id blacklist_ta/* Atheros 3012 with sflash firmware */ { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },/* Atheros AR5BBU12 with sflash firmware */
Greg KH
maintainerPATCH 64/68 Bluetooth: Add support for BCM20702A0 [0a5c:21e3]
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jesse Sung <[email protected]>
commit c0190925dacd976a67044f4382d4effbed568dce upstream.
Add another vendor specific ID for BCM20702A0.
output of usb-devices:
T: Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0a5c ProdID=21e3 Rev=01.12
S: Manufacturer=Broadcom Corp
S: Product=BCM20702A0
S: SerialNumber=9439E5CBF66C
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
--- drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+)
drivers/bluetooth/btusb.c +1 -0
@@ -101,6 +101,7 @@ static struct usb_device_id btusb_table[ { USB_DEVICE(0x0c10, 0x0000) },/* Broadcom BCM20702A0 */ + { USB_DEVICE(0x0a5c, 0x21e3) }, { USB_DEVICE(0x413c, 0x8197) }, { } /* Terminating entry */
Greg KH
maintainerPATCH 65/68 futex: Do not leak robust list to unprivileged process
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
commit bdbb776f882f5ad431aa1e694c69c1c3d6a4a5b8 upstream.
It was possible to extract the robust list head address from a setuid process if it had used set_robust_list(), allowing an ASLR info leak. This changes the permission checks to be the same as those used for similar info that comes out of /proc.
Running a setuid program that uses robust futexes would have had:
cred->euid != pcred->euid
cred->euid == pcred->uid
so the old permissions check would allow it. I'm not aware of any setuid programs that use robust futexes, so this is just a preventative measure.
(This patch is based on changes from grsecurity.)
--- kernel/futex.c | 36 +++++++++++++----------------------- kernel/futex_compat.c | 36 +++++++++++++----------------------- 2 files changed, 26 insertions(+), 46 deletions(-)
kernel/futex.c +13 -23
@@ -59,6 +59,7 @@#include <linux/magic.h> #include <linux/pid.h> #include <linux/nsproxy.h> +#include <linux/ptrace.h> #include <asm/futex.h>
@@ -2443,40 +2444,29 @@ SYSCALL_DEFINE3(get_robust_list, int, pi {struct robust_list_head __user *head;unsigned long ret; -const struct cred *cred =current_cred (), *pcred; +struct task_struct *p;if (!futex_cmpxchg_enabled)return -ENOSYS ; +rcu_read_lock (); + + ret = -ESRCH ;if (!pid) - head = current->robust_list; + p = current;else { -struct task_struct *p; - - ret = -ESRCH ; -rcu_read_lock (); p =find_task_by_vpid (pid);if (!p) goto err_unlock; - ret = -EPERM ; - pcred =__task_cred (p); -/* If victim is in different user_ns, then uids are not -comparable, so we must have CAP_SYS_PTRACE */ -if (cred->user->user_ns != pcred->user->user_ns) { -if (!ns_capable (pcred->user->user_ns,CAP_SYS_PTRACE )) - goto err_unlock; - goto ok; - } -/* If victim is in same user_ns, then uids are comparable */ -if (cred->euid != pcred->euid && - cred->euid != pcred->uid && - !ns_capable (pcred->user->user_ns,CAP_SYS_PTRACE )) - goto err_unlock; -ok: - head = p->robust_list; -rcu_read_unlock (); } + ret = -EPERM ; +if (!ptrace_may_access (p,PTRACE_MODE_READ )) + goto err_unlock; + + head = p->robust_list; +rcu_read_unlock (); +if (put_user (sizeof (*head), len_ptr))return -EFAULT ;return put_user (head, head_ptr);
kernel/futex_compat.c +13 -23
@@ -10,6 +10,7 @@#include <linux/compat.h> #include <linux/nsproxy.h> #include <linux/futex.h> +#include <linux/ptrace.h> #include <asm/uaccess.h>
@@ -136,40 +137,29 @@ compat_sys_get_robust_list(int pid, comp {struct compat_robust_list_head __user *head;unsigned long ret; -const struct cred *cred =current_cred (), *pcred; +struct task_struct *p;if (!futex_cmpxchg_enabled)return -ENOSYS ; +rcu_read_lock (); + + ret = -ESRCH ;if (!pid) - head = current->compat_robust_list; + p = current;else { -struct task_struct *p; - - ret = -ESRCH ; -rcu_read_lock (); p =find_task_by_vpid (pid);if (!p) goto err_unlock; - ret = -EPERM ; - pcred =__task_cred (p); -/* If victim is in different user_ns, then uids are not -comparable, so we must have CAP_SYS_PTRACE */ -if (cred->user->user_ns != pcred->user->user_ns) { -if (!ns_capable (pcred->user->user_ns,CAP_SYS_PTRACE )) - goto err_unlock; - goto ok; - } -/* If victim is in same user_ns, then uids are comparable */ -if (cred->euid != pcred->euid && - cred->euid != pcred->uid && - !ns_capable (pcred->user->user_ns,CAP_SYS_PTRACE )) - goto err_unlock; -ok: - head = p->compat_robust_list; -rcu_read_unlock (); } + ret = -EPERM ; +if (!ptrace_may_access (p,PTRACE_MODE_READ )) + goto err_unlock; + + head = p->compat_robust_list; +rcu_read_unlock (); +if (put_user (sizeof (*head), len_ptr))return -EFAULT ;return put_user (ptr_to_compat (head), head_ptr);
Greg KH
maintainerPATCH 66/68 drm/radeon/kms: fix the regression of DVI connector check
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit e36325071832f1ba96ac54fb8ba1459f08b05dd8 upstream.
The check of the encoder type in the commit [e00e8b5e: drm/radeon/kms:
fix analog load detection on DVI-I connectors] is obviously wrong, and it's the culprit of the regression on my workstation with DVI-analog connection resulting in the blank output.
Fixed the typo now.
--- drivers/gpu/drm/radeon/radeon_connectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_connectors.c +1 -1
@@ -946,7 +946,7 @@ radeon_dvi_detect(struct drm_connector * encoder =obj_to_encoder (obj); -if (encoder->encoder_type !=DRM_MODE_ENCODER_DAC || +if (encoder->encoder_type !=DRM_MODE_ENCODER_DAC && encoder->encoder_type !=DRM_MODE_ENCODER_TVDAC )continue ;
Greg KH
maintainerPATCH 67/68 drm/radeon: disable MSI on RV515
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Airlie <[email protected]>
commit 16a5e32b83fd946312b9b13590c75d20c95c5202 upstream.
My rv515 card is very flaky with msi enabled. Every so often it loses a rearm and never comes back, manually banging the rearm brings it back.
--- drivers/gpu/drm/radeon/radeon_irq_kms.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/radeon/radeon_irq_kms.c +6 -0
@@ -143,6 +143,12 @@ static bool radeon_msi_ok(struct radeon_ (rdev->pdev->subsystem_device == 0x01fd))return true; +/* RV515 seems to have MSI issues where it loses +* MSI rearms occasionally. This leads to lockups and freezes. +* disable it by default. +*/ +if (rdev->family ==CHIP_RV515 ) +return false;if (rdev->flags &RADEON_IS_IGP ) {/* APUs work fine with MSIs */ if (rdev->family >=CHIP_PALM )
Greg KH
maintainerPATCH 68/68 drm/radeon: fix load detect on rn50 with hardcoded EDIDs.
In reply to Greg KH3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Airlie <[email protected]>
commit a09d431f344d854e4fe9cfac44f78cb8202f3eb7 upstream.
When the force changes went in back in 3.3.0, we ended up returning disconnected in the !force case, and the connected in when forced, as it hit the hardcoded check.
Fix it so all exits go via the hardcoded check and stop spurious modesets on platforms with hardcoded EDIDs.
--- drivers/gpu/drm/radeon/radeon_connectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_connectors.c +1 -1
@@ -976,6 +976,7 @@ radeon_dvi_detect(struct drm_connector ** cases the DVI port is actually a virtual KVM port connected to the service * processor. */ +out:if ((!rdev->is_atom_bios) && (ret == connector_status_disconnected) && rdev->mode_info.bios_hardcoded_edid_size) {
@@ -983,7 +984,6 @@ radeon_dvi_detect(struct drm_connector * ret = connector_status_connected; } -out:/* updated in get modes as well since we need to know if it's analog or digital */ radeon_connector_update_scratch_regs (connector, ret);return ret;
Quoted 4 lines · Greg KH
NOTE: This is going to be the last 3.2-stable kernel that I release. Someone else _might_ be picking it up, but that coordination is not finalized at this time, so be aware of this, and plan on this being the last 3.2-stable kernel that is released.
[...]
I'd like to confirm that I will pick up and maintain a 3.2-longterm series.
Ben.
Signature · 2 lines
Ben Hutchings For every action, there is an equal and opposite criticism. - Harrison