1. 23 Feb, 2012 2 commits
  2. 22 Feb, 2012 22 commits
  3. 21 Feb, 2012 13 commits
    • Sarah Sharp's avatar
      xhci: Fix encoding for HS bulk/control NAK rate. · 340a3504
      Sarah Sharp authored
      The xHCI 0.96 spec says that HS bulk and control endpoint NAK rate must
      be encoded as an exponent of two number of microframes.  The endpoint
      descriptor has the NAK rate encoded in number of microframes.  We were
      just copying the value from the endpoint descriptor into the endpoint
      context interval field, which was not correct.  This lead to the VIA
      host rejecting the add of a bulk OUT endpoint from any USB 2.0 mass
      storage device.
      
      The fix is to use the correct encoding.  Refactor the code to convert
      number of frames to an exponential number of microframes, and make sure
      we convert the number of microframes in HS bulk and control endpoints to
      an exponent.
      
      This should be back ported to kernels as old as 2.6.31, that contain the
      commit dfa49c4a "USB: xhci - fix math
      in xhci_get_endpoint_interval"
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
      Suggested-by: default avatarAndiry Xu <andiry.xu@amd.com>
      Cc: stable@vger.kernel.org
      340a3504
    • Elric Fu's avatar
      USB: Set hub depth after USB3 hub reset · a45aa3b3
      Elric Fu authored
      The superspeed device attached to a USB 3.0 hub(such as VIA's)
      doesn't respond the address device command after resume. The
      root cause is the superspeed hub will miss the Hub Depth value
      that is used as an offset into the route string to locate the
      bits it uses to determine the downstream port number after
      reset, and all packets can't be routed to the device attached
      to the superspeed hub.
      
      Hub driver sends a Set Hub Depth request to the superspeed hub
      except for USB 3.0 root hub when the hub is initialized and
      doesn't send the request again after reset due to the resume
      process. So moving the code that sends the Set Hub Depth request
      to the superspeed hub from hub_configure() to hub_activate()
      is to cover those situations include initialization and reset.
      
      The patch should be backported to kernels as old as 2.6.39.
      Signed-off-by: default avatarElric Fu <elricfu1@gmail.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable@vger.kernel.org
      a45aa3b3
    • Sarah Sharp's avatar
      USB: Fix handoff when BIOS disables host PCI device. · cab928ee
      Sarah Sharp authored
      On some systems with an Intel Panther Point xHCI host controller, the
      BIOS disables the xHCI PCI device during boot, and switches the xHCI
      ports over to EHCI.  This allows the BIOS to access USB devices without
      having xHCI support.
      
      The downside is that the xHCI BIOS handoff mechanism will fail because
      memory mapped I/O is not enabled for the disabled PCI device.
      Jesse Barnes says this is expected behavior.  The PCI core will enable
      BARs before quirks run, but it will leave it in an undefined state, and
      it may not have memory mapped I/O enabled.
      
      Make the generic USB quirk handler call pci_enable_device() to re-enable
      MMIO, and call pci_disable_device() once the host-specific BIOS handoff
      is finished.  This will balance the ref counts in the PCI core.  When
      the PCI probe function is called, usb_hcd_pci_probe() will call
      pci_enable_device() again.
      
      This should be back ported to kernels as old as 2.6.31.  That was the
      first kernel with xHCI support, and no one has complained about BIOS
      handoffs failing due to memory mapped I/O being disabled on other hosts
      (EHCI, UHCI, or OHCI).
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: default avatarOliver Neukum <oneukum@suse.de>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: stable@vger.kernel.org
      cab928ee
    • Takashi Iwai's avatar
      Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus · fe879e2f
      Takashi Iwai authored
      A couple of small, driver specific fixes - nothing too exciting going
      on.
      fe879e2f
    • Eric Paris's avatar
      ARM/audit: include audit header and fix audit arch · 5180bb39
      Eric Paris authored
      Both bugs being fixed were introduced in:
      29ef73b7
      
      Include linux/audit.h to fix below build errors:
      
        CC      arch/arm/kernel/ptrace.o
      arch/arm/kernel/ptrace.c: In function 'syscall_trace':
      arch/arm/kernel/ptrace.c:919: error: implicit declaration of function 'audit_syscall_exit'
      arch/arm/kernel/ptrace.c:921: error: implicit declaration of function 'audit_syscall_entry'
      arch/arm/kernel/ptrace.c:921: error: 'AUDIT_ARCH_ARMEB' undeclared (first use in this function)
      arch/arm/kernel/ptrace.c:921: error: (Each undeclared identifier is reported only once
      arch/arm/kernel/ptrace.c:921: error: for each function it appears in.)
      make[1]: *** [arch/arm/kernel/ptrace.o] Error 1
      make: *** [arch/arm/kernel] Error 2
      
      This part of the patch is:
      Reported-by: default avatarAxel Lin <axel.lin@gmail.com>
      Reported-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
      (They both provided patches to fix it)
      
      This patch also (at the request of the list) fixes the fact that
      ARM has both LE and BE versions however the audit code was called as if
      it was always BE.  If audit userspace were to try to interpret the bits
      it got from a LE system it would obviously do so incorrectly.  Fix this
      by using the right arch flag on the right system.
      
      This part of the patch is:
      Reported-by: default avatarRussell King - ARM Linux <linux@arm.linux.org.uk>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      5180bb39
    • Kuninori Morimoto's avatar
      ASoC: ak4642: fixup HeadPhone L/R dapm settings · e555cf36
      Kuninori Morimoto authored
      Current ak4642 driver had wrong dapm settings for headphone L/R.
      If you select headphone L, and select R after that,
      headphone L setting was removed by R settings.
      
      This patch fixes it up.
      It provides just "Headphone Enable" to user side
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      e555cf36
    • Russell King's avatar
      ARM: OMAP: fix voltage domain build errors with PM_OPP disabled · 3ddd4d0c
      Russell King authored
      The voltage domain code wants the voltage tables, which are in the
      opp*.c files.  These files aren't built when PM_OPP is disabled,
      causing the following build errors at link time:
      
      twl-common.c:(.init.text+0x2e48): undefined reference to `omap34xx_vddmpu_volt_data'
      twl-common.c:(.init.text+0x2e4c): undefined reference to `omap34xx_vddcore_volt_data'
      twl-common.c:(.init.text+0x2e5c): undefined reference to `omap36xx_vddmpu_volt_data'
      twl-common.c:(.init.text+0x2e60): undefined reference to `omap36xx_vddcore_volt_data'
      twl-common.c:(.init.text+0x2830): undefined reference to `omap44xx_vdd_mpu_volt_data'
      twl-common.c:(.init.text+0x283c): undefined reference to `omap44xx_vdd_iva_volt_data'
      twl-common.c:(.init.text+0x2844): undefined reference to `omap44xx_vdd_core_volt_data'
      Acked-by: default avatarKevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      3ddd4d0c
    • Myron Stowe's avatar
      ARM/PCI: Remove ARM's duplicate definition of 'pcibios_max_latency' · e23e8c06
      Myron Stowe authored
      The patch series to re-factor PCI's 'latency timer' setup (re:
      http://marc.info/?l=linux-kernel&m=131983853831049&w=2) forgot to
      remove the ARM specific definition of 'pcibios_max_latency' once such
      had been moved into the pci core resulting in ARM related compile
      errors -
        drivers/built-in.o:(.data+0x230): multiple definition of
        `pcibios_max_latency'
        arch/arm/common/built-in.o:(.data+0x40c): first defined here
        make[1]: *** [vmlinux.o] Error 1
      
      In the series, patch 2/16 (commit 168c8619) converted the ARM
      specific version of 'pcibios_set_master()' to a non-inlined version.
      This was done in preperation for hosting it up into PCI's core, which
      was done in patch 10/16 (commit 96c55900) of the series (and
      where the removal of ARM's 'pcibios_max_latency' was overlooked).
      Reported-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarMyron Stowe <myron.stowe@redhat.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      e23e8c06
    • Santosh Shilimkar's avatar
      ARM: 7336/1: smp_twd: Don't register CPUFREQ notifiers if local timers are not initialised · 910ba598
      Santosh Shilimkar authored
      Current ARM local timer code registers CPUFREQ notifiers even in case
      the twd_timer_setup() isn't called. That seems to be wrong and
      would eventually lead to kernel crash on the CPU frequency transitions
      on the SOCs where the local timer doesn't exist or broken because of
      hardware BUG. Fix it by testing twd_evt and *__this_cpu_ptr(twd_evt).
      
      The issue was observed with v3.3-rc3 and building an OMAP2+ kernel
      on OMAP3 SOC which doesn't have TWD.
      
      Below is the dump for reference :
      
       Unable to handle kernel paging request at virtual address 007e900
       pgd = cdc20000
       [007e9000] *pgd=00000000
       Internal error: Oops: 5 [#1] SMP
       Modules linked in:
       CPU: 0    Not tainted  (3.3.0-rc3-pm+debug+initramfs #9)
       PC is at twd_update_frequency+0x34/0x48
       LR is at twd_update_frequency+0x10/0x48
       pc : [<c001382c>]    lr : [<c0013808>]    psr: 60000093
       sp : ce311dd8  ip : 00000000  fp : 00000000
       r10: 00000000  r9 : 00000001  r8 : ce310000
       r7 : c0440458  r6 : c00137f8  r5 : 00000000  r4 : c0947a74
       r3 : 00000000  r2 : 007e9000  r1 : 00000000  r0 : 00000000
       Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment usr
       Control: 10c5387d  Table: 8dc20019  DAC: 00000015
       Process sh (pid: 599, stack limit = 0xce3102f8)
       Stack: (0xce311dd8 to 0xce312000)
       1dc0:                                                       6000c
       1de0: 00000001 00000002 00000000 00000000 00000000 00000000 00000
       1e00: ffffffff c093d8f0 00000000 ce311ebc 00000001 00000001 ce310
       1e20: c001386c c0437c4c c0e95b60 c0e95ba8 00000001 c0e95bf8 ffff4
       1e40: 00000000 00000000 c005ef74 ce310000 c0435cf0 ce311ebc 00000
       1e60: ce352b40 0007a120 c08d5108 c08ba040 c08ba040 c005f030 00000
       1e80: c08bc554 c032fe2c 0007a120 c08d4b64 ce352b40 c08d8618 ffff8
       1ea0: c08ba040 c033364c ce311ecc c0433b50 00000002 ffffffea c0330
       1ec0: 0007a120 0007a120 22222201 00000000 22222222 00000000 ce357
       1ee0: ce3d6000 cdc2aed8 ce352ba0 c0470164 00000002 c032f47c 00034
       1f00: c0331cac ce352b40 00000007 c032f6d0 ce352bbc 0003d090 c0930
       1f20: c093d8bc c03306a4 00000007 ce311f80 00000007 cdc2aec0 ce358
       1f40: ce8d20c0 00000007 b6fe5000 ce311f80 00000007 ce310000 0000c
       1f60: c000de74 ce987400 ce8d20c0 b6fe5000 00000000 00000000 0000c
       1f80: 00000000 00000000 001fbac8 00000000 00000007 001fbac8 00004
       1fa0: c000df04 c000dd60 00000007 001fbac8 00000001 b6fe5000 00000
       1fc0: 00000007 001fbac8 00000007 00000004 b6fe5000 00000000 00202
       1fe0: 00000000 beb565f8 00101ffc 00008e8c 60000010 00000001 00000
       [<c001382c>] (twd_update_frequency+0x34/0x48) from [<c008ac4c>] )
       [<c008ac4c>] (smp_call_function_single+0x17c/0x1c8) from [<c0013)
       [<c0013890>] (twd_cpufreq_transition+0x24/0x30) from [<c0437c4c>)
       [<c0437c4c>] (notifier_call_chain+0x44/0x84) from [<c005efe4>] ()
       [<c005efe4>] (__srcu_notifier_call_chain+0x70/0xa4) from [<c005f)
       [<c005f030>] (srcu_notifier_call_chain+0x18/0x20) from [<c032fe2)
       [<c032fe2c>] (cpufreq_notify_transition+0xc8/0x1b0) from [<c0333)
       [<c033364c>] (omap_target+0x1b4/0x28c) from [<c032f47c>] (__cpuf)
       [<c032f47c>] (__cpufreq_driver_target+0x50/0x64) from [<c0331d24)
       [<c0331d24>] (cpufreq_set+0x78/0x98) from [<c032f6d0>] (store_sc)
       [<c032f6d0>] (store_scaling_setspeed+0x5c/0x74) from [<c03306a4>)
       [<c03306a4>] (store+0x58/0x74) from [<c014d868>] (sysfs_write_fi)
       [<c014d868>] (sysfs_write_file+0x80/0xb4) from [<c00f2c2c>] (vfs)
       [<c00f2c2c>] (vfs_write+0xa8/0x138) from [<c00f2e9c>] (sys_write)
       [<c00f2e9c>] (sys_write+0x40/0x6c) from [<c000dd60>] (ret_fast_s)
       Code: e594300c e792210c e1a01000 e5840004 (e7930002)
       ---[ end trace 5da3b5167c1ecdda ]---
      Reported-by: default avatarKevin Hilman <khilman@ti.com>
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Tested-by: default avatarKevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      910ba598
    • Linus Torvalds's avatar
      i387: export 'fpu_owner_task' per-cpu variable · 27e74da9
      Linus Torvalds authored
      (And define it properly for x86-32, which had its 'current_task'
      declaration in separate from x86-64)
      
      Bitten by my dislike for modules on the machines I use, and the fact
      that apparently nobody else actually wanted to test the patches I sent
      out.
      
      Snif. Nobody else cares.
      
      Anyway, we probably should uninline the 'kernel_fpu_begin()' function
      that is what modules actually use and that references this, but this is
      the minimal fix for now.
      Reported-by: default avatarJosh Boyer <jwboyer@gmail.com>
      Reported-and-tested-by: default avatarJongman Heo <jongman.heo@samsung.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      27e74da9
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 8ebbfb49
      Linus Torvalds authored
      Assorted fixes, sat in -next for a week or so...
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        ocfs2: deal with wraparounds of i_nlink in ocfs2_rename()
        vfs: fix compat_sys_stat() handling of overflows in st_nlink
        quota: Fix deadlock with suspend and quotas
        vfs: Provide function to get superblock and wait for it to thaw
        vfs: fix panic in __d_lookup() with high dentry hashtable counts
        autofs4 - fix lockdep splat in autofs
        vfs: fix d_inode_lookup() dentry ref leak
      8ebbfb49
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 39e255da
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        [S390] correct ktime to tod clock comparator conversion
        [S390] 3215 deadlock with tty_wakeup
        [S390] incorrect PageTables counter for kvm page tables
        [S390] idle: avoid RCU usage in extended quiescent state
      39e255da
    • Linus Torvalds's avatar
  4. 20 Feb, 2012 3 commits
    • Linus Torvalds's avatar
      i387: support lazy restore of FPU state · 7e16838d
      Linus Torvalds authored
      This makes us recognize when we try to restore FPU state that matches
      what we already have in the FPU on this CPU, and avoids the restore
      entirely if so.
      
      To do this, we add two new data fields:
      
       - a percpu 'fpu_owner_task' variable that gets written any time we
         update the "has_fpu" field, and thus acts as a kind of back-pointer
         to the task that owns the CPU.  The exception is when we save the FPU
         state as part of a context switch - if the save can keep the FPU
         state around, we leave the 'fpu_owner_task' variable pointing at the
         task whose FP state still remains on the CPU.
      
       - a per-thread 'last_cpu' field, that indicates which CPU that thread
         used its FPU on last.  We update this on every context switch
         (writing an invalid CPU number if the last context switch didn't
         leave the FPU in a lazily usable state), so we know that *that*
         thread has done nothing else with the FPU since.
      
      These two fields together can be used when next switching back to the
      task to see if the CPU still matches: if 'fpu_owner_task' matches the
      task we are switching to, we know that no other task (or kernel FPU
      usage) touched the FPU on this CPU in the meantime, and if the current
      CPU number matches the 'last_cpu' field, we know that this thread did no
      other FP work on any other CPU, so the FPU state on the CPU must match
      what was saved on last context switch.
      
      In that case, we can avoid the 'f[x]rstor' entirely, and just clear the
      CR0.TS bit.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7e16838d
    • Linus Torvalds's avatar
      i387: use 'restore_fpu_checking()' directly in task switching code · 80ab6f1e
      Linus Torvalds authored
      This inlines what is usually just a couple of instructions, but more
      importantly it also fixes the theoretical error case (can that FPU
      restore really ever fail? Maybe we should remove the checking).
      
      We can't start sending signals from within the scheduler, we're much too
      deep in the kernel and are holding the runqueue lock etc.  So don't
      bother even trying.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      80ab6f1e
    • Linus Torvalds's avatar
      i387: fix up some fpu_counter confusion · cea20ca3
      Linus Torvalds authored
      This makes sure we clear the FPU usage counter for newly created tasks,
      just so that we start off in a known state (for example, don't try to
      preload the FPU state on the first task switch etc).
      
      It also fixes a thinko in when we increment the fpu_counter at task
      switch time, introduced by commit 34ddc81a ("i387: re-introduce FPU
      state preloading at context switch time").  We should increment the
      *new* task fpu_counter, not the old task, and only if we decide to use
      that state (whether lazily or preloaded).
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cea20ca3