09 Mar, 2012

5 commits


08 Mar, 2012

16 commits

  • As per datasheet, the voltage output is defined as
    from SEL[6:0] = 3 to 64 (dec)
    Vout= (SEL[6:0] × 12.5 mV + 562.5 mV)

    The list_voltage returns the vout as
    600mV + selector * 12.5mV

    and so equivalent VSEL is selector + 3.
    Adding 3 on selector when configuring VSEL register for
    VDDCTRL output.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Mark Brown

    Laxman Dewangan
     
  • Fix dm-raid flush support.

    Both md and dm have support for flush, but the dm-raid target
    forgot to set the flag to indicate that flushes should be
    passed on. (Important for data integrity e.g. with writeback cache
    enabled.)

    Signed-off-by: Jonathan Brassow
    Acked-by: Mike Snitzer
    Cc: stable@kernel.org
    Signed-off-by: Alasdair G Kergon

    Jonathan E Brassow
     
  • The 'rebuild' parameter is used to rebuild individual devices in an
    array (e.g. resynchronize a RAID1 device or recalculate a parity device
    in higher RAID). The MD_CHANGE_DEVS flag must be set when this
    parameter is given in order to write out the superblocks and make the
    change take immediate effect. The code that handles new devices in
    super_load already sets MD_CHANGE_DEVS and 'FirstUse'. (The 'FirstUse'
    flag was being set as a special case for rebuilds in
    super_init_validation.)

    Add a condition for rebuilds in super_load to take care of both flags
    without the special case in 'super_init_validation'.

    Signed-off-by: Jonathan Brassow
    Cc: stable@kernel.org
    Signed-off-by: Alasdair G Kergon

    Jonathan E Brassow
     
  • Correct the number of mapped sectors shown on a thin device's
    status line by decrementing td->mapped_blocks in __remove() each time
    a block is removed.

    Signed-off-by: Joe Thornber
    Acked-by: Mike Snitzer
    Cc: stable@kernel.org
    Signed-off-by: Alasdair G Kergon

    Joe Thornber
     
  • If dm_sm_disk_create() fails the superblock must be unlocked.

    Signed-off-by: Joe Thornber
    Acked-by: Mike Snitzer
    Cc: stable@kernel.org
    Signed-off-by: Alasdair G Kergon

    Joe Thornber
     
  • The __open_device() error paths in __create_thin() and __create_snap()
    incorrectly call __close_device() even if td was not initialized by
    __open_device(). Remove this.

    Also document __open_device() return values, remove a redundant
    td->changed = 1 in __create_thin(), and insert an additional
    safeguard against creating an already-existing device.

    Signed-off-by: Mike Snitzer
    Cc: stable@kernel.org
    Signed-off-by: Alasdair G Kergon

    Mike Snitzer
     
  • The following BUG is hit on the first read that is submitted to a dm
    flakey test device while the device is "down" if the corrupt_bio_byte
    feature wasn't requested when the device's table was loaded.

    Example DM table that will hit this BUG:
    0 2097152 flakey 8:0 2048 0 30

    This bug was introduced by commit a3998799fb4df0b0af8271a7d50c4269032397aa
    (dm flakey: add corrupt_bio_byte feature) in v3.1-rc1.

    BUG: unable to handle kernel paging request at ffff8801cfce3fff
    IP: [] corrupt_bio_data+0x6e/0xae [dm_flakey]
    PGD 1606063 PUD 0
    Oops: 0002 [#1] SMP
    ...
    Call Trace:

    [] flakey_end_io+0x42/0x48 [dm_flakey]
    [] clone_endio+0x54/0xb6 [dm_mod]
    [] bio_endio+0x2d/0x2f
    [] req_bio_endio+0x96/0x9f
    [] blk_update_request+0x1dc/0x3a9
    [] ? rcu_read_unlock+0x21/0x23
    [] blk_update_bidi_request+0x20/0x6e
    [] blk_end_bidi_request+0x1f/0x5d
    [] blk_end_request+0x10/0x12
    [] scsi_io_completion+0x1e5/0x4b1
    [] scsi_finish_command+0xec/0xf5
    [] scsi_softirq_done+0xff/0x108
    [] blk_done_softirq+0x84/0x98
    [] __do_softirq+0xe3/0x1d5
    [] ? _raw_spin_lock+0x62/0x69
    [] ? handle_irq_event+0x4c/0x61
    [] call_softirq+0x1c/0x30
    [] do_softirq+0x4b/0xa3
    [] irq_exit+0x53/0xca
    [] do_IRQ+0x9d/0xb4
    [] common_interrupt+0x73/0x73
    ...

    Signed-off-by: Mike Snitzer
    Cc: stable@vger.kernel.org # 3.1+
    Signed-off-by: Alasdair G Kergon

    Mike Snitzer
     
  • This patch fixes a crash by recognising discards in dm_io.

    Currently dm_mirror can send REQ_DISCARD bios if running over a
    discard-enabled device and without support in dm_io the system
    crashes badly.

    BUG: unable to handle kernel paging request at 00800000
    IP: __bio_add_page.part.17+0xf5/0x1e0
    ...
    bio_add_page+0x56/0x70
    dispatch_io+0x1cf/0x240 [dm_mod]
    ? km_get_page+0x50/0x50 [dm_mod]
    ? vm_next_page+0x20/0x20 [dm_mod]
    ? mirror_flush+0x130/0x130 [dm_mirror]
    dm_io+0xdc/0x2b0 [dm_mod]
    ...

    Introduced in 2.6.38-rc1 by commit 5fc2ffeabb9ee0fc0e71ff16b49f34f0ed3d05b4
    (dm raid1: support discard).

    Signed-off-by: Milan Broz
    Cc: stable@kernel.org
    Acked-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • If 'argc' is zero we jump to the 'out:' label, but this leaks the
    (unused) memory that 'dm_split_args()' allocated for 'argv' if the
    string being split consisted entirely of whitespace. Jump to the
    'out_argv:' label instead to free up that memory.

    Signed-off-by: Jesper Juhl
    Cc: stable@kernel.org
    Signed-off-by: Alasdair G Kergon

    Jesper Juhl
     
  • Also update IDT datasheet locations.

    Signed-off-by: Guenter Roeck
    Cc: stable@vger.kernel.org # 3.0+
    Acked-by: Jean Delvare

    Guenter Roeck
     
  • A global delay parameter has the side effect of being overwritten with 0 if a
    single ZL2004 or ZL6105 is instantiated. If other chips supported by the same
    driver are in the system, this will result in access errors for those chips.

    To solve the problem, keep a per-instance copy of the delay parameter, and do
    not change the original parameter.

    Signed-off-by: Guenter Roeck
    Cc: stable@vger.kernel.org # 3.1+
    Acked-by: Jean Delvare

    Guenter Roeck
     
  • There are up to three POUT alarm attributes, not two, since cap_alarm was added.

    Reported-by: Michele Petracca
    Cc: stable@vger.kernel.org # 3.0+ [3.0 will need backport]
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • These are fully compatible with Jedec JC 42.4 as far as I can see.

    Signed-off-by: Jean Delvare
    Cc: Guenter Roeck
    Cc: stable@vger.kernel.org # 3.0+
    Signed-off-by: Guenter Roeck

    Jean Delvare
     
  • Pull ARM updates from Russell King.

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7358/1: perf: add PMU hotplug notifier
    ARM: 7357/1: perf: fix overflow handling for xscale2 PMUs
    ARM: 7356/1: perf: check that we have an event in the PMU IRQ handlers
    ARM: 7355/1: perf: clear overflow flag when disabling counter on ARMv7 PMU
    ARM: 7354/1: perf: limit sample_period to half max_period in non-sampling mode
    ARM: ecard: ensure fake vma vm_flags is setup
    ARM: 7346/1: errata: fix PL310 erratum #753970 workaround selection
    ARM: 7345/1: errata: update workaround for A9 erratum #743622
    ARM: 7348/1: arm/spear600: fix one-shot timer
    ARM: 7339/1: amba/serial.h: Include types.h for resolving dependency of type bool

    Linus Torvalds
     
  • Pull input updates from Dmitry Torokhov: "Just a few driver fixups,
    nothing exciting."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in use
    Input: twl4030-vibra - use proper guard for PM methods
    Input: evdev - fix variable initialisation
    Input: wacom - add missing LEDS_CLASS to Kconfig
    Input: ALPS - fix touchpad detection when buttons are pressed

    Linus Torvalds
     
  • This reverts commit 8f2f748b0656257153bcf0941df8d6060acc5ca6.

    It causes some odd regression that we have not figured out, and it's too
    late in the -rc series to try to figure it out now.

    As reported by Konstantin Khlebnikov, it causes consistent hangs on his
    laptop (Thinkpad x220: 2x cores + HT). They can be avoided by adding
    calls to "rebuild_sched_domains();" in cpuset_cpu_[in]active() for the
    CPU_{ONLINE/DOWN_FAILED/DOWN_PREPARE}_FROZEN cases, but it's not at all
    clear why, and it makes no sense.

    Konstantin's config doesn't even have CONFIG_CPUSETS enabled, just to
    make things even more interesting. So it's not the cpusets, it's just
    the scheduling domains.

    So until this is understood, revert.

    Bisected-reported-and-tested-by: Konstantin Khlebnikov
    Acked-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Acked-by: Srivatsa S. Bhat
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

07 Mar, 2012

19 commits

  • When a CPU is taken out of reset, either cold booted or hotplugged in,
    some of its PMU registers can contain UNKNOWN values.

    This patch adds a hotplug notifier to ARM core perf code so that upon
    CPU restart the PMU unit is reset and becomes ready to use again.

    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Lorenzo Pieralisi
     
  • xscale2 PMUs indicate overflow not via the PMU control register, but by
    a separate overflow FLAG register instead.

    This patch fixes the xscale2 PMU code to use this register to detect
    to overflow and ensures that we clear any pending overflow when
    disabling a counter.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • The PMU IRQ handlers in perf assume that if a counter has overflowed
    then perf must be responsible. In the paranoid world of crazy hardware,
    this could be false, so check that we do have a valid event before
    attempting to dereference NULL in the interrupt path.

    Cc:
    Signed-off-by: Ming Lei
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • When disabling a counter on an ARMv7 PMU, we should also clear the
    overflow flag in case an overflow occurred whilst stopping the counter.
    This prevents a spurious overflow being picked up later and leading to
    either false accounting or a NULL dereference.

    Cc:
    Reported-by: Ming Lei
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • On ARM, the PMU does not stop counting after an overflow and therefore
    IRQ latency affects the new counter value read by the kernel. This is
    significant for non-sampling runs where it is possible for the new value
    to overtake the previous one, causing the delta to be out by up to
    max_period events.

    Commit a737823d ("ARM: 6835/1: perf: ensure overflows aren't missed due
    to IRQ latency") attempted to fix this problem by allowing interrupt
    handlers to pass an overflow flag to the event update function, causing
    the overflow calculation to assume that the counter passed through zero
    when going from prev to new. Unfortunately, this doesn't work when
    overflow occurs on the perf_task_tick path because we have the flag
    cleared and end up computing a large negative delta.

    This patch removes the overflow flag from armpmu_event_update and
    instead limits the sample_period to half of the max_period for
    non-sampling profiling runs.

    Cc:
    Signed-off-by: Ming Lei
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • The message count field uses three bits of storage, not two.

    Signed-off-by: Jason Gerecke
    Acked-by: Chris Bagwell
    Signed-off-by: Dmitry Torokhov

    Jason Gerecke
     
  • Pull networking fixes from David Miller:

    1) TCP can chop up SACK'd SKBs below below the unacked send sequence and
    that breaks lots of stuff. Fix from Neal Cardwell.

    2) There is code in ipv6 to properly join and leave the all-routers
    multicast code when the forwarding setting is changed, but once
    forwarding is turned on, we don't do the join for newly registered
    devices. Fix from Li Wei.

    3) Netfilter's NAT module autoload in ctnetlink drops a spinlock around
    a sleeping call, problem is this code path doesn't actually hold that
    lock. Fix from Pablo Neira Ayuso.

    4) TG3 uses the wrong interfaces to hook into the new byte queue limit
    support. It uses the device level interfaces, which is fine for
    single queue devices, but on more recent chips this driver supports
    multiqueue so we have to use the multiqueue BQL APIs. Fix from Tom
    Herbert.

    5) r8169 resume fix from Francois Romieu.

    6) Add some cxgb4 device IDs, from Vipul Pandya.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    IPv6: Fix not join all-router mcast group when forwarding set.
    caif-hsi: Set default MTU to 4096
    cxgb4vf: Add support for Chelsio's T480-CR and T440-LP-CR adapters
    cxgb4: Add support for Chelsio's T480-CR and T440-LP-CR adapters
    mlx4_core: remove buggy sched_queue masking
    netfilter: nf_conntrack: fix early_drop with reliable event delivery
    bridge: netfilter: don't call iptables on vlan packets if sysctl is off
    netfilter: bridge: fix wrong pointer dereference
    netfilter: ctnetlink: remove incorrect spin_[un]lock_bh on NAT module autoload
    netfilter: ebtables: fix wrong name length while copying to user-space
    r8169: runtime resume before shutdown.
    tcp: fix tcp_shift_skb_data() to not shift SACKed data below snd_una
    tg3: Fix to use multi queue BQL interfaces

    Linus Torvalds
     
  • It turns out that test-compiling this file on x86-64 doesn't really
    help, because much of it is x86-32-specific. And so I hadn't noticed
    the slightly over-eager removal of the 'r' from 'addr' variable despite
    thinking I had tested it.

    Signed-off-by: Linus "oopsie" Torvalds

    Linus Torvalds
     
  • Several users of "find_vma_prev()" were not in fact interested in the
    previous vma if there was no primary vma to be found either. And in
    those cases, we're much better off just using the regular "find_vma()",
    and then "prev" can be looked up by just checking vma->vm_prev.

    The find_vma_prev() semantics are fairly subtle (see Mikulas' recent
    commit 83cd904d271b: "mm: fix find_vma_prev"), and the whole "return
    prev by reference" means that it generates worse code too.

    Thus this "let's avoid using this inconvenient and clearly too subtle
    interface when we don't really have to" patch.

    Cc: Mikulas Patocka
    Cc: KOSAKI Motohiro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull CIFS fixes from Steve French

    * git://git.samba.org/sfrench/cifs-2.6:
    cifs: fix dentry refcount leak when opening a FIFO on lookup
    CIFS: Fix mkdir/rmdir bug for the non-POSIX case

    Linus Torvalds
     
  • Commit 6bd4837de96e ("mm: simplify find_vma_prev()") broke memory
    management on PA-RISC.

    After application of the patch, programs that allocate big arrays on the
    stack crash with segfault, for example, this will crash if compiled
    without optimization:

    int main()
    {
    char array[200000];
    array[199999] = 0;
    return 0;
    }

    The reason is that PA-RISC has up-growing stack and the stack is usually
    the last memory area. In the above example, a page fault happens above
    the stack.

    Previously, if we passed too high address to find_vma_prev, it returned
    NULL and stored the last VMA in *pprev. After "simplify find_vma_prev"
    change, it stores NULL in *pprev. Consequently, the stack area is not
    found and it is not expanded, as it used to be before the change.

    This patch restores the old behavior and makes it return the last VMA in
    *pprev if the requested address is higher than address of any other VMA.

    Signed-off-by: Mikulas Patocka
    Acked-by: KOSAKI Motohiro
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     
  • Xommit ac5637611(genirq: Unmask oneshot irqs when thread was not woken)
    fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
    handle_level_irq.

    This happens because thread_mask is or'ed unconditionally in
    irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared. So
    the check for !desc->thread_active fails and keeps the interrupt
    disabled.

    Keep the thread_mask zero for !IRQ_ONESHOT interrupts.

    Document the thread_mask magic while at it.

    Reported-and-tested-by: Sven Joachim
    Reported-and-tested-by: Stefan Lippers-Hollmann
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • When forwarding was set and a new net device is register,
    we need add this device to the all-router mcast group.

    Signed-off-by: Li Wei
    Signed-off-by: David S. Miller

    Li Wei
     
  • Currently error is -ENOMEM when rejecting VM_GROWSDOWN|VM_GROWSUP
    from shared anonymous: hoist the file case's -EINVAL up for both.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Default MTU for CAIF HSI was wrongly set to 15 * 4092 bytes.
    The patch sets default MTU size to 4096.

    Signed-off-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Sjur Brændeland
     
  • This patch adds PCI device ids for Chelsio's T480-CR and T440-LP-CR
    adapters.

    Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • This patch adds PCI device ids for Chelsio's T480-CR and T440-LP-CR
    adapters.

    Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • Fixes a bug introduced by commit fe9a2603c, where the priority bits
    in the schedule queue field were masked out.

    Signed-off-by: Amir Vadai
    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: David S. Miller

    Yevgeny Petrilin
     
  • If reliable event delivery is enabled and ctnetlink fails to deliver
    the destroy event in early_drop, the conntrack subsystem cannot
    drop any the candidate flow that was planned to be evicted.

    Reported-by: Kerin Millar
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso