1. 11 Jan, 2013 30 commits
  2. 17 Dec, 2012 10 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.0.57 · 881c0a02
      Greg Kroah-Hartman authored
      881c0a02
    • Anton Blanchard's avatar
      powerpc: Keep thread.dscr and thread.dscr_inherit in sync · 3882a18f
      Anton Blanchard authored
      commit 00ca0de0 upstream.
      
      When we update the DSCR either via emulation of mtspr(DSCR) or via
      a change to dscr_default in sysfs we don't update thread.dscr.
      We will eventually update it at context switch time but there is
      a period where thread.dscr is incorrect.
      
      If we fork at this point we will copy the old value of thread.dscr
      into the child. To avoid this, always keep thread.dscr in sync with
      reality.
      
      This issue was found with the following testcase:
      
      http://ozlabs.org/~anton/junkcode/dscr_inherit_test.cSigned-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarHaren Myneni <haren@us.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3882a18f
    • Anton Blanchard's avatar
      powerpc: Update DSCR on all CPUs when writing sysfs dscr_default · 1758e55f
      Anton Blanchard authored
      commit 1b6ca2a6 upstream.
      
      Writing to dscr_default in sysfs doesn't actually change the DSCR -
      we rely on a context switch on each CPU to do the work. There is no
      guarantee we will get a context switch in a reasonable amount of time
      so fire off an IPI to force an immediate change.
      
      This issue was found with the following test case:
      
      http://ozlabs.org/~anton/junkcode/dscr_explicit_test.cSigned-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarHaren Myneni <haren@us.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1758e55f
    • Dan Carpenter's avatar
      ftrace: Clear bits properly in reset_iter_read() · 7a09a2ff
      Dan Carpenter authored
      commit 70f77b3f upstream.
      
      There is a typo here where '&' is used instead of '|' and it turns the
      statement into a noop.  The original code is equivalent to:
      
      	iter->flags &= ~((1 << 2) & (1 << 4));
      
      Link: http://lkml.kernel.org/r/20120609161027.GD6488@elgon.mountainSigned-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7a09a2ff
    • Sarah Sharp's avatar
      xhci: Extend Fresco Logic MSI quirk. · dadc9f9c
      Sarah Sharp authored
      commit bba18e33 upstream.
      
      Ali reports that plugging a device into the Fresco Logic xHCI host with
      PCI device ID 1400 produces an IRQ error:
      
       do_IRQ: 3.176 No irq handler for vector (irq -1)
      
      Other early Fresco Logic host revisions don't support MSI, even though
      their PCI config space claims they do.  Extend the quirk to disabling
      MSI to this chipset revision.  Also enable the short transfer quirk,
      since it's likely this revision also has that quirk, and it should be
      harmless to enable.
      
      04:00.0 0c03: 1b73:1400 (rev 01) (prog-if 30 [XHCI])
              Subsystem: 1d5c:1000
              Physical Slot: 3
              Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
              Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
              Latency: 0, Cache Line Size: 64 bytes
              Interrupt: pin A routed to IRQ 51
              Region 0: Memory at d4600000 (32-bit, non-prefetchable) [size=64K]
              Capabilities: [50] Power Management version 3
                      Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                      Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
              Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
                      Address: 00000000feeff00c  Data: 41b1
              Capabilities: [80] Express (v1) Endpoint, MSI 00
                      DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <2us, L1 <32us
                              ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                      DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                              RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
                              MaxPayload 128 bytes, MaxReadReq 512 bytes
                      DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                      LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 unlimited
                              ClockPM- Surprise- LLActRep- BwNot-
                      LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                              ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                      LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
              Kernel driver in use: xhci_hcd
      
      This patch should be backported to stable kernels as old as 2.6.36, that
      contain the commit f5182b41 "xhci:
      Disable MSI for some Fresco Logic hosts."
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: default avatarA Sh <smr.ash1991@gmail.com>
      Tested-by: default avatarA Sh <smr.ash1991@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dadc9f9c
    • Alan Stern's avatar
      USB: OHCI: workaround for hardware bug: retired TDs not added to the Done Queue · e22045df
      Alan Stern authored
      commit 50ce5c06 upstream.
      
      This patch (as1636) is a partial workaround for a hardware bug
      affecting OHCI controllers by NVIDIA at least, maybe others too.  When
      the controller retires a Transfer Descriptor, it is supposed to add
      the TD onto the Done Queue.  But sometimes this doesn't happen, with
      the result that ohci-hcd never realizes the corresponding transfer has
      finished.  Symptoms can vary; a typical result is that USB audio stops
      working after a while.
      
      The patch works around the problem by recognizing that TDs are always
      processed in order.  Therefore, if a later TD is found on the Done
      Queue than all the earlier TDs for the same endpoint must be finished
      as well.
      
      Unfortunately this won't solve the problem in cases where the missing
      TD is the last one in the endpoint's queue.  A complete fix would
      require a signficant amount of change to the driver.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Tested-by: default avatarOliver Neukum <oneukum@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e22045df
    • Zhang Rui's avatar
      ACPI / video: ignore BIOS initial backlight value for HP Folio 13-2000 · ffedea0f
      Zhang Rui authored
      commit 129ff8f8 upstream.
      
      Or else the laptop will boot with a dimmed screen.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=51141Tested-by: default avatarStefan Nagy <public@stefan-nagy.at>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ffedea0f
    • Rafael J. Wysocki's avatar
      ACPI / PNP: Do not crash due to stale pointer use during system resume · cb2bf59b
      Rafael J. Wysocki authored
      commit a6b5e88c upstream.
      
      During resume from system suspend the 'data' field of
      struct pnp_dev in pnpacpi_set_resources() may be a stale pointer,
      due to removal of the associated ACPI device node object in the
      previous suspend-resume cycle.  This happens, for example, if a
      dockable machine is booted in the docking station and then suspended
      and resumed and suspended again.  If that happens,
      pnpacpi_build_resource_template() called from pnpacpi_set_resources()
      attempts to use that pointer and crashes.
      
      However, pnpacpi_set_resources() actually checks the device's ACPI
      handle, attempts to find the ACPI device node object attached to it
      and returns an error code if that fails, so in fact it knows what the
      correct value of dev->data should be.  Use this observation to update
      dev->data with the correct value if necessary and dump a call trace
      if that's the case (once).
      
      We still need to fix the root cause of this issue, but preventing
      systems from crashing because of it is an improvement too.
      Reported-and-tested-by: default avatarZdenek Kabelac <zdenek.kabelac@gmail.com>
      References: https://bugzilla.kernel.org/show_bug.cgi?id=51071Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cb2bf59b
    • Kamil Iskra's avatar
      ACPI / battery: Correct battery capacity values on Thinkpads · fd013d71
      Kamil Iskra authored
      commit 4000e626 upstream.
      
      Add a quirk to correctly report battery capacity on 2010 and 2011
      Lenovo Thinkpad models.
      
      The affected models that I tested (x201, t410, t410s, and x220)
      exhibit a problem where, when battery capacity reporting unit is mAh,
      the values being reported are wrong.  Pre-2010 and 2012 models appear
      to always report in mWh and are thus unaffected.  Also, in mid-2012
      Lenovo issued a BIOS update for the 2011 models that fixes the issue
      (tested on x220 with a post-1.29 BIOS).  No such update is available
      for the 2010 models, so those still need this patch.
      
      Problem description: for some reason, the affected Thinkpads switch
      the reporting unit between mAh and mWh; generally, mAh is used when a
      laptop is plugged in and mWh when it's unplugged, although a
      suspend/resume or rmmod/modprobe is needed for the switch to take
      effect.  The values reported in mAh are *always* wrong.  This does
      not appear to be a kernel regression; I believe that the values were
      never reported correctly.  I tested back to kernel 2.6.34, with
      multiple machines and BIOS versions.
      
      Simply plugging a laptop into mains before turning it on is enough to
      reproduce the problem.  Here's a sample /proc/acpi/battery/BAT0/info
      from Thinkpad x220 (before a BIOS update) with a 4-cell battery:
      
      present:                 yes
      design capacity:         2886 mAh
      last full capacity:      2909 mAh
      battery technology:      rechargeable
      design voltage:          14800 mV
      design capacity warning: 145 mAh
      design capacity low:     13 mAh
      cycle count:              0
      capacity granularity 1:  1 mAh
      capacity granularity 2:  1 mAh
      model number:            42T4899
      serial number:           21064
      battery type:            LION
      OEM info:                SANYO
      
      Once the laptop switches the unit to mWh (unplug from mains, suspend,
      resume), the output changes to:
      
      present:                 yes
      design capacity:         28860 mWh
      last full capacity:      29090 mWh
      battery technology:      rechargeable
      design voltage:          14800 mV
      design capacity warning: 1454 mWh
      design capacity low:     200 mWh
      cycle count:              0
      capacity granularity 1:  1 mWh
      capacity granularity 2:  1 mWh
      model number:            42T4899
      serial number:           21064
      battery type:            LION
      OEM info:                SANYO
      
      Can you see how the values for "design capacity", etc., differ by a
      factor of 10 instead of 14.8 (the design voltage of this battery)?
      On the battery itself it says: 14.8V, 1.95Ah, 29Wh, so clearly the
      values reported in mWh are correct and the ones in mAh are not.
      
      My guess is that this problem has been around ever since those
      machines were released, but because the most common Thinkpad
      batteries are rated at 10.8V, the error (8%) is small enough that it
      simply hasn't been noticed or at least nobody could be bothered to
      look into it.
      
      My patch works around the problem by adjusting the incorrectly
      reported mAh values by "10000 / design_voltage".  The patch also has
      code to figure out if it should be activated or not.  It only
      activates on Lenovo Thinkpads, only when the unit is mAh, and, as an
      extra precaution, only when the battery capacity reported through
      ACPI does not match what is reported through DMI (I've never
      encountered a machine where the first two conditions would be true
      but the last would not, but better safe than sorry).
      
      I've been using this patch for close to a year on several systems
      without any problems.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=41062Acked-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fd013d71
    • Greg Kroah-Hartman's avatar
      USB: mark uas driver as BROKEN · 092082a9
      Greg Kroah-Hartman authored
      commit fb37ef98 upstream.
      
      As reported https://bugzilla.kernel.org/show_bug.cgi?id=51031, the UAS
      driver causes problems and has been asked to be not built into any of
      the major distributions.  To prevent users from running into problems
      with it, and for distros that were not notified, just mark the whole
      thing as broken.
      Acked-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      092082a9