1. 25 Oct, 2012 20 commits
  2. 24 Oct, 2012 6 commits
  3. 23 Oct, 2012 6 commits
  4. 22 Oct, 2012 3 commits
    • Lan Tianyu's avatar
      usb/xhci: Remove (__force__ __u16) before assigning DeviceRemovable and assign directly. · 27c411c9
      Lan Tianyu authored
      Struct usb_hub_descriptor.ss.DeviceRemovable has been defined as __le16
      and (__force__ __u16) doesn't need.
      Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      27c411c9
    • Lan Tianyu's avatar
      usb/xhci: release xhci->lock during turning on/off usb port's acpi power... · 170ed807
      Lan Tianyu authored
      usb/xhci: release xhci->lock during turning on/off usb port's acpi power resource and checking the existence of port's power resource
      
      When setting usb port's acpi power resource, there will be some xhci hub requests.
      This will cause dead lock since xhci->lock has been held before setting acpi power
      resource in the xhci_hub_control(). The usb_acpi_power_manageable() function might
      fall into sleep so release xhci->lock before invoking it.
      Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      170ed807
    • Octavian Purdila's avatar
      usb hub: send clear_tt_buffer_complete events when canceling TT clear work · 3b6054da
      Octavian Purdila authored
      There is a race condition in the USB hub code with regard to handling
      TT clear requests that can get the HCD driver in a deadlock. Usually
      when an TT clear request is scheduled it will be executed immediately:
      
      <7>[    6.077583] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
      <3>[    6.078041] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
      <7>[    6.078299] hub_tt_work:731
      <7>[    9.309089] usb 2-1.5: link qh1-0e01/f4d506c0 start 0 [1/2 us]
      <7>[    9.324526] ehci_hcd 0000:00:1d.0: reused qh f4d4db00 schedule
      <7>[    9.324539] usb 2-1.3: link qh1-0e01/f4d4db00 start 0 [1/2 us]
      <7>[    9.341530] usb 1-1.1: link qh4-0e01/f397aec0 start 2 [1/2 us]
      <7>[   10.116159] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
      <3>[   10.116459] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
      <7>[   10.116537] hub_tt_work:731
      
      However, if a suspend operation is triggered before hub_tt_work is
      scheduled, hub_quiesce will cancel the work without notifying the HCD
      driver:
      
      <3>[   35.033941] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d80
      <5>[   35.034022] sd 0:0:0:0: [sda] Stopping disk
      <7>[   35.034039] hub 2-1:1.0: hub_suspend
      <7>[   35.034067] usb 2-1: unlink qh256-0001/f3b1ab00 start 1 [1/0 us]
      <7>[   35.035085] hub 1-0:1.0: hub_suspend
      <7>[   35.035102] usb usb1: bus suspend, wakeup 0
      <7>[   35.035106] ehci_hcd 0000:00:1a.0: suspend root hub
      <7>[   35.035298] hub 2-0:1.0: hub_suspend
      <7>[   35.035313] usb usb2: bus suspend, wakeup 0
      <7>[   35.035315] ehci_hcd 0000:00:1d.0: suspend root hub
      <6>[   35.250017] PM: suspend of devices complete after 216.979 msecs
      <6>[   35.250822] PM: late suspend of devices complete after 0.799 msecs
      <7>[   35.252343] ehci_hcd 0000:00:1d.0: wakeup: 1
      <7>[   35.262923] ehci_hcd 0000:00:1d.0: --> PCI D3hot
      <7>[   35.263302] ehci_hcd 0000:00:1a.0: wakeup: 1
      <7>[   35.273912] ehci_hcd 0000:00:1a.0: --> PCI D3hot
      <6>[   35.274254] PM: noirq suspend of devices complete after 23.442 msecs
      <6>[   35.274975] ACPI: Preparing to enter system sleep state S3
      <6>[   35.292666] PM: Saving platform NVS memory
      <7>[   35.295030] Disabling non-boot CPUs ...
      <6>[   35.297351] CPU 1 is now offline
      <6>[   35.300345] CPU 2 is now offline
      <6>[   35.303929] CPU 3 is now offline
      <7>[   35.303931] lockdep: fixing up alternatives.
      <6>[   35.304825] Extended CMOS year: 2000
      
      When the device will resume the EHCI driver will get stuck in
      ehci_endpoint_disable waiting for the tt_clearing flag to reset:
      
      <0>[   47.610967] usb 2-1.3: **** DPM device timeout ****
      <7>[   47.610972]  f2f11c60 00000092 f2f11c0c c10624a5 00000003 f4c6e880 c1c8a4c0 c1c8a4c0
      <7>[   47.610983]  15c55698 0000000b f56b34c0 f2a45b70 f4c6e880 00000082 f2a4602c f2f11c30
      <7>[   47.610993]  c10787f8 f4cac000 f2a45b70 00000000 f4cac010 f2f11c58 00000046 00000001
      <7>[   47.611004] Call Trace:
      <7>[   47.611006]  [<c10624a5>] ? sched_clock_cpu+0xf5/0x160
      <7>[   47.611019]  [<c10787f8>] ? lock_release_holdtime.part.22+0x88/0xf0
      <7>[   47.611026]  [<c103ed46>] ? lock_timer_base.isra.35+0x26/0x50
      <7>[   47.611034]  [<c17592d3>] ? schedule_timeout+0x133/0x290
      <7>[   47.611044]  [<c175b43e>] schedule+0x1e/0x50
      <7>[   47.611051]  [<c17592d8>] schedule_timeout+0x138/0x290
      <7>[   47.611057]  [<c10624a5>] ? sched_clock_cpu+0xf5/0x160
      <7>[   47.611063]  [<c103e560>] ? usleep_range+0x40/0x40
      <7>[   47.611070]  [<c1759445>] schedule_timeout_uninterruptible+0x15/0x20
      <7>[   47.611077]  [<c14935f4>] ehci_endpoint_disable+0x64/0x160
      <7>[   47.611084]  [<c147d1ee>] ? usb_hcd_flush_endpoint+0x10e/0x1d0
      <7>[   47.611092]  [<c1165663>] ? sysfs_add_file+0x13/0x20
      <7>[   47.611100]  [<c147d5a9>] usb_hcd_disable_endpoint+0x29/0x40
      <7>[   47.611107]  [<c147fafc>] usb_disable_endpoint+0x5c/0x80
      <7>[   47.611111]  [<c147fb57>] usb_disable_interface+0x37/0x50
      <7>[   47.611116]  [<c1477650>] usb_reset_and_verify_device+0x4b0/0x640
      <7>[   47.611122]  [<c1474665>] ? hub_port_status+0xb5/0x100
      <7>[   47.611129]  [<c147a975>] usb_port_resume+0xd5/0x220
      <7>[   47.611136]  [<c148877f>] generic_resume+0xf/0x30
      <7>[   47.611142]  [<c14821a3>] usb_resume+0x133/0x180
      <7>[   47.611147]  [<c1473b10>] ? usb_dev_thaw+0x10/0x10
      <7>[   47.611152]  [<c1473b1d>] usb_dev_resume+0xd/0x10
      <7>[   47.611157]  [<c13baa60>] dpm_run_callback+0x40/0xb0
      <7>[   47.611164]  [<c13bdb03>] ? pm_runtime_enable+0x43/0x70
      <7>[   47.611171]  [<c13bafc6>] device_resume+0x1a6/0x2c0
      <7>[   47.611177]  [<c13ba940>] ? dpm_show_time+0xe0/0xe0
      <7>[   47.611183]  [<c13bb0f9>] async_resume+0x19/0x40
      <7>[   47.611189]  [<c10580c4>] async_run_entry_fn+0x64/0x160
      <7>[   47.611196]  [<c104a244>] ? process_one_work+0x104/0x480
      <7>[   47.611203]  [<c104a24c>] ? process_one_work+0x10c/0x480
      <7>[   47.611209]  [<c104a2c0>] process_one_work+0x180/0x480
      <7>[   47.611215]  [<c104a244>] ? process_one_work+0x104/0x480
      <7>[   47.611220]  [<c1058060>] ? async_schedule+0x10/0x10
      <7>[   47.611226]  [<c104c15c>] worker_thread+0x11c/0x2f0
      <7>[   47.611233]  [<c104c040>] ? manage_workers.isra.27+0x1f0/0x1f0
      <7>[   47.611239]  [<c10507f8>] kthread+0x78/0x80
      <7>[   47.611244]  [<c1750000>] ? timer_cpu_notify+0xd6/0x20d
      <7>[   47.611253]  [<c1050780>] ? __init_kthread_worker+0x60/0x60
      <7>[   47.611258]  [<c176357e>] kernel_thread_helper+0x6/0xd
      <7>[   47.611283] ------------[ cut here ]------------
      
      This patch changes hub_quiesce behavior to flush the TT clear work
      instead of canceling it, to make sure that no TT clear request remains
      uncompleted before suspend.
      Signed-off-by: default avatarOctavian Purdila <octavian.purdila@intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3b6054da
  5. 20 Oct, 2012 5 commits
    • Linus Torvalds's avatar
      Linux 3.7-rc2 · 6f0c0580
      Linus Torvalds authored
      6f0c0580
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · 198190a1
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
       "Main changes:
         - AArch64 Linux compilation fixes following 3.7-rc1 changes
           (MODULES_USE_ELF_RELA, update_vsyscall() prototype)
         - Unnecessary register setting in start_thread() (thanks to Al Viro)
         - ptrace fixes"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        arm64: fix alignment padding in assembly code
        arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints
        arm64: ptrace: make structure padding explicit for debug registers
        arm64: No need to set the x0-x2 registers in start_thread()
        arm64: Ignore memory blocks below PHYS_OFFSET
        arm64: Fix the update_vsyscall() prototype
        arm64: Select MODULES_USE_ELF_RELA
        arm64: Remove duplicate inclusion of mmu_context.h in smp.c
      198190a1
    • Marc Zyngier's avatar
      arm64: fix alignment padding in assembly code · aeed41a9
      Marc Zyngier authored
      An interesting effect of using the generic version of linkage.h
      is that the padding is defined in terms of x86 NOPs, which can have
      even more interesting effects when the assembly code looks like this:
      
      ENTRY(func1)
      	mov	x0, xzr
      ENDPROC(func1)
      	// fall through
      ENTRY(func2)
      	mov	x0, #1
      	ret
      ENDPROC(func2)
      
      Admittedly, the code is not very nice. But having code from another
      architecture doesn't look completely sane either.
      
      The fix is to add arm64's version of linkage.h, which causes the insertion
      of proper AArch64 NOPs.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      aeed41a9
    • Kees Cook's avatar
      use clamp_t in UNAME26 fix · 31fd84b9
      Kees Cook authored
      The min/max call needed to have explicit types on some architectures
      (e.g. mn10300). Use clamp_t instead to avoid the warning:
      
        kernel/sys.c: In function 'override_release':
        kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      31fd84b9
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8c1bee68
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Assorted small fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf python: Properly link with libtraceevent
        perf hists browser: Add back callchain folding symbol
        perf tools: Fix build on sparc.
        perf python: Link with libtraceevent
        perf python: Initialize 'page_size' variable
        tools lib traceevent: Fix missed freeing of subargs in free_arg() in filter
        lib tools traceevent: Add back pevent assignment in __pevent_parse_format()
        perf hists browser: Fix off-by-two bug on the first column
        perf tools: Remove warnings on JIT samples for srcline sort key
        perf tools: Fix segfault when using srcline sort key
        perf: Require exclude_guest to use PEBS - kernel side enforcement
        perf tool: Precise mode requires exclude_guest
      8c1bee68