1. 22 11月, 2012 5 次提交
  2. 17 11月, 2012 1 次提交
    • K
      ACPI / battery: Correct battery capacity values on Thinkpads · 4000e626
      Kamil Iskra 提交于
      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: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4000e626
  3. 16 11月, 2012 8 次提交
  4. 15 11月, 2012 19 次提交
  5. 11 11月, 2012 3 次提交
    • L
      Linux 3.7-rc5 · 77b67063
      Linus Torvalds 提交于
      77b67063
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · b251f0f3
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "Bug fixes galore, mostly in drivers as is often the case:
      
        1) USB gadget and cdc_eem drivers need adjustments to their frame size
           lengths in order to handle VLANs correctly.  From Ian Coolidge.
      
        2) TIPC and several network drivers erroneously call tasklet_disable
           before tasklet_kill, fix from Xiaotian Feng.
      
        3) r8169 driver needs to apply the WOL suspend quirk to more chipsets,
           fix from Cyril Brulebois.
      
        4) Fix multicast filters on RTL_GIGA_MAC_VER_35 r8169 chips, from
           Nathan Walp.
      
        5) FDB netlink dumps should use RTM_NEWNEIGH as the message type, not
           zero.  From John Fastabend.
      
        6) Fix smsc95xx tx checksum offload on big-endian, from Steve
           Glendinning.
      
        7) __inet_diag_dump() needs to repsect and report the error value
           returned from inet_diag_lock_handler() rather than ignore it.
           Otherwise if an inet diag handler is not available for a particular
           protocol, we essentially report success instead of giving an error
           indication.  Fix from Cyrill Gorcunov.
      
        8) When the QFQ packet scheduler sees TSO/GSO packets it does not
           handle things properly, and in fact ends up corrupting it's
           datastructures as well as mis-schedule packets.  Fix from Paolo
           Valente.
      
        9) Fix oopser in skb_loop_sk(), from Eric Leblond.
      
        10) CXGB4 passes partially uninitialized datastructures in to FW
            commands, fix from Vipul Pandya.
      
        11) When we send unsolicited ipv6 neighbour advertisements, we should
            send them to the link-local allnodes multicast address, as per
            RFC4861.  Fix from Hannes Frederic Sowa.
      
        12) There is some kind of bug in the usbnet's kevent deferral
            mechanism, but more immediately when it triggers an uncontrolled
            stream of kernel messages spam the log.  Rate limit the error log
            message triggered when this problem occurs, as sending thousands
            of error messages into the kernel log doesn't help matters at all,
            and in fact makes further diagnosis more difficult.
      
            From Steve Glendinning.
      
        13) Fix gianfar restore from hibernation, from Wang Dongsheng.
      
        14) The netlink message attribute sizes are wrong in the ipv6 GRE
            driver, it was using the size of ipv4 addresses instead of ipv6
            ones :-) Fix from Nicolas Dichtel."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        gre6: fix rtnl dump messages
        gianfar: ethernet vanishes after restoring from hibernation
        usbnet: ratelimit kevent may have been dropped warnings
        ipv6: send unsolicited neighbour advertisements to all-nodes
        net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
        usb: gadget: g_ether: fix frame size check for 802.1Q
        cxgb4: Fix initialization of SGE_CONTROL register
        isdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES
        cxgb4: Initialize data structures before using.
        af-packet: fix oops when socket is not present
        pkt_sched: enable QFQ to support TSO/GSO
        net: inet_diag -- Return error code if protocol handler is missed
        net: bnx2x: Fix typo in bnx2x driver
        smsc95xx: fix tx checksum offload for big endian
        rtnetlink: Use nlmsg type RTM_NEWNEIGH from dflt fdb dump
        ptp: update adjfreq callback description
        r8169: allow multicast packets on sub-8168f chipset.
        r8169: Fix WoL on RTL8168d/8111d.
        drivers/net: use tasklet_kill in device remove/close process
        tipc: do not use tasklet_disable before tasklet_kill
      b251f0f3
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 2b1768f3
      Linus Torvalds 提交于
      Pull sparc fixes from David Miller:
       "Several build/bug fixes for sparc, including:
      
        1) Configuring a mix of static vs.  modular sparc64 crypto modules
           didn't work, remove an ill-conceived attempt to only have to build
           the device match table for these drivers once to fix the problem.
      
           Reported by Meelis Roos.
      
        2) Make the montgomery multiple/square and mpmul instructions actually
           usable in 32-bit tasks.  Essentially this involves providing 32-bit
           userspace with a way to use a 64-bit stack when it needs to.
      
        3) Our sparc64 atomic backoffs don't yield cpu strands properly on
           Niagara chips.  Use pause instruction when available to achieve
           this, otherwise use a benign instruction we know blocks the strand
           for some time.
      
        4) Wire up kcmp
      
        5) Fix the build of various drivers by removing the unnecessary
           blocking of OF_GPIO when SPARC.
      
        6) Fix unintended regression wherein of_address_to_resource stopped
           being provided.  Fix from Andreas Larsson.
      
        7) Fix NULL dereference in leon_handle_ext_irq(), also from Andreas
           Larsson."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix build with mix of modular vs. non-modular crypto drivers.
        sparc: Support atomic64_dec_if_positive properly.
        of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again
        sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq
        sparc: Add sparc support for platform_get_irq()
        sparc: Allow OF_GPIO on sparc.
        qlogicpti: Fix build warning.
        sparc: Wire up sys_kcmp.
        sparc64: Improvde documentation and readability of atomic backoff code.
        sparc64: Use pause instruction when available.
        sparc64: Fix cpu strand yielding.
        sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads.
      2b1768f3
  6. 10 11月, 2012 4 次提交
    • L
      Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6 · affd9a8d
      Linus Torvalds 提交于
      Pull cifs fixes from Jeff Layton.
      
      * 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Do not lookup hashed negative dentry in cifs_atomic_open
        cifs: fix potential buffer overrun in cifs.idmap handling code
      affd9a8d
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · 487bda54
      Linus Torvalds 提交于
      Pull arm64 fixes from Catalin Marinas:
       - correct argument type (pgprot_t) when calling __ioremap()
       - PCI_IOBASE virtual address change
       - use architected event for CPU cycle counter
       - fix ELF core dumping
       - select CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION
       - missing completion for secondary CPU boot
       - booting on systems with all memory beyond 4GB
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        arm64: mm: fix booting on systems with no memory below 4GB
        arm64: smp: add missing completion for secondary boot
        arm64: compat: select CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION
        arm64: elf: fix core dumping definitions for GP and FP registers
        arm64: perf: use architected event for CPU cycle counter
        arm64: Move PCI_IOBASE closer to MODULES_VADDR
        arm64: Use pgprot_t as the last argument when invoking __ioremap()
      487bda54
    • L
      Merge tag 'stable/for-linus-3.7-rc5-tag' of... · 0020dd0b
      Linus Torvalds 提交于
      Merge tag 'stable/for-linus-3.7-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull Xen fixes from Konrad Rzeszutek Wilk:
       "There are three ARM compile fixes (we forgot to export certain
        functions and if the drivers are built as an module - we go belly-up).
      
        There is also an mismatch of irq_enter() / exit_idle() calls sequence
        which were fixed some time ago in other piece of codes, but failed to
        appear in the Xen code.
      
        Lastly a fix for to help in the field with troubleshooting in case we
        cannot get the appropriate parameter and also fallback code when
        working with very old hypervisors."
      
      Bug-fixes:
       - Fix compile issues on ARM.
       - Fix hypercall fallback code for old hypervisors.
       - Print out which HVM parameter failed if it fails.
       - Fix idle notifier call after irq_enter.
      
      * tag 'stable/for-linus-3.7-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/arm: Fix compile errors when drivers are compiled as modules (export more).
        xen/arm: Fix compile errors when drivers are compiled as modules.
        xen/generic: Disable fallback build on ARM.
        xen/events: fix RCU warning, or Call idle notifier after irq_enter()
        xen/hvm: If we fail to fetch an HVM parameter print out which flag it is.
        xen/hypercall: fix hypercall fallback code for very old hypervisors
      0020dd0b
    • D
      sparc64: Fix build with mix of modular vs. non-modular crypto drivers. · 226f7cea
      David S. Miller 提交于
      We tried linking in a single built object to hold the device table,
      but only works if all of the sparc64 crypto modules get built the same
      way (modular vs. non-modular).
      
      Just include the device ID stub into each driver source file so that
      the table gets compiled into the correct result in all cases.
      Reported-by: NMeelis Roos <mroos@linux.ee>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      226f7cea