1. 11 Mar, 2013 2 commits
  2. 09 Mar, 2013 1 commit
    • Linus Torvalds's avatar
      Atmel MXT touchscreen: increase reset timeouts · 8343bce1
      Linus Torvalds authored
      There is a more complete atmel patch-series out by Nick Dyer that fixes
      this and other things, but in the meantime this is the minimal thing to
      get the touchscreen going on (at least my) Pixel Chromebook.
      Not that I want my dirty fingers near that beautiful screen, but it
      seems that a non-initialized touchscreen will also end up being a
      constant wakeup source, so you have to disable it to go to sleep.  And
      it's easier to just fix the initialization sequence.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  3. 08 Mar, 2013 3 commits
  4. 07 Mar, 2013 9 commits
  5. 06 Mar, 2013 8 commits
  6. 05 Mar, 2013 3 commits
    • Paulo Zanoni's avatar
      drm/i915: also disable south interrupts when handling them · 44498aea
      Paulo Zanoni authored
      From the docs:
        "IIR can queue up to two interrupt events. When the IIR is cleared,
        it will set itself again after one clock if a second event was
        "Only the rising edge of the PCH Display interrupt will cause the
        North Display IIR (DEIIR) PCH Display Interrupt even bit to be set,
        so all PCH Display Interrupts, including back to back interrupts,
        must be cleared before a new PCH Display interrupt can cause DEIIR
        to be set".
      The current code works fine because we don't get many interrupts, but
      if we enable the PCH FIFO underrun interrupts we'll start getting so
      many interrupts that at some point new PCH interrupts won't cause
      DEIIR to be set.
      The initial implementation I tried was to turn the code that checks
      SDEIIR into a loop, but we can still get interrupts even after the
      loop is done (and before the irq handler finishes), so we have to
      either disable the interrupts or mask them. In the end I concluded
      that just disabling the PCH interrupts is enough, you don't even need
      the loop, so this is what this patch implements. I've tested it and it
      passes the 2 "PCH FIFO underrun interrupt storms" I can reproduce:
      the "ironlake_crtc_disable" case and the "wrong watermarks" case.
      In other words, here's how to reproduce the problem fixed by this
        1 - Enable PCH FIFO underrun interrupts (SERR_INT on SNB+)
        2 - Boot the machine
        3 - While booting we'll get tons of PCH FIFO underrun interrupts
        4 - Plug a new monitor
        5 - Run xrandr, notice it won't detect the new monitor
        6 - Read SDEIIR and notice it's not 0 while DEIIR is 0
      Q: Can't we just clear DEIIR before SDEIIR?
      A: It doesn't work. SDEIIR has to be completely cleared (including the
      interrupts stored on its back queue) before it can flip DEIIR's bit to
      1 again, and even while you're clearing it you'll be getting more and
      more interrupts.
      Q: Why does it work by just disabling+enabling the south interrupts?
      A: Because when we re-enable them, if there's something on the SDEIIR
      register (maybe an interrupt stored on the queue), the re-enabling
      will make DEIIR's bit flip to 1, and since we'll already have
      interrupts enabled we'll get another interrupt, then run our irq
      handler again to process the "back" interrupts.
      v2: Even bigger commit message, added code comments.
      Note that this fixes missed dp aux irqs which have been reported for
      3.9-rc1. This regression has been introduced by switching to
      irq-driven dp aux transactions with
      commit 9ee32fea
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Dec 1 13:53:48 2012 +0100
          drm/i915: irq-drive the dp aux communication
      References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg18588.html
      References: https://lkml.org/lkml/2013/2/26/769
      Tested-by: default avatarImre Deak <imre.deak@intel.com>
      Reported-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Pimp commit message with references for the dp aux irq
      timeout regression this fixes.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    • Daniel Vetter's avatar
      drm/i915: enable irqs earlier when resuming · 15239099
      Daniel Vetter authored
      We need it to restore the ilk rc6 context, since the gpu wait no
      requires interrupts. But in general having interrupts around should
      help in code sanity, since more and more stuff is interrupt driven.
      This regression has been introduced in
      commit 3e960501
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Nov 27 16:22:54 2012 +0000
          drm/i915: Rearrange code to only have a single method for waiting upon the ring
      Like in the driver load code we need to make sure that hotplug
      interrupts don't cause havoc with our modeset state, hence block them
      with the existing infrastructure. Again we ignore races where we might
      loose hotplug interrupts ...
      Note that the driver load part of the regression has already been
      fixed in
      commit 52d7eced
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Dec 1 21:03:22 2012 +0100
          drm/i915: reorder setup sequence to have irqs for output setup
      v2: Add a note to the commit message about which patch fixed the
      driver load part of the regression. Stable kernels need to backport
      both patches.
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=54691
      Cc: stable@vger.kernel.org (for 3.8 only, plese backport
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reported-and-Tested-by: default avatarIlya Tumaykin <itumaykin@gmail.com>
      Reviewed-by: Chris wilson <chris@chris-wilson.co.uk> (v1)
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    • Stéphane Marchesin's avatar
      drm/i915: Increase the RC6p threshold. · 0920a487
      Stéphane Marchesin authored
      This increases GEN6_RC6p_THRESHOLD from 100000 to 150000. For some
      reason this avoids the gen6_gt_check_fifodbg.isra warnings and
      associated GPU lockups, which makes my ivy bridge machine stable.
      Signed-off-by: default avatarStéphane Marchesin <marcheu@chromium.org>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
  7. 04 Mar, 2013 14 commits
    • Chen Gang's avatar
      drivers/tty/hvc: Use strlcpy instead of strncpy · 9276dfd2
      Chen Gang authored
      when strlen pi->location_code is larger than HVCS_CLC_LENGTH + 1,
          original implementation can not let hvcsd->p_location_code NUL terminated.
        so need fix it (also can simplify the code)
      Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Rusty Russell's avatar
      hw_random: make buffer usable in scatterlist. · f7f154f1
      Rusty Russell authored
      virtio_rng feeds the randomness buffer handed by the core directly
      into the scatterlist, since commit bb347d98
      However, if CONFIG_HW_RANDOM=m, the static buffer isn't a linear address
      (at least on most archs).  We could fix this in virtio_rng, but it's actually
      far easier to just do it in the core as virtio_rng would have to allocate
      a buffer every time (it doesn't know how much the core will want to read).
      Reported-by: default avatarAurelien Jarno <aurelien@aurel32.net>
      Tested-by: default avatarAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: stable@kernel.org
    • Frank Li's avatar
      net: fec: fix build error in no MXC platform · acac8406
      Frank Li authored
      build error cause by
      Commit ff43da86
      ("NET: FEC: dynamtic check DMA desc buff type")
      drivers/net/ethernet/freescale/fec.c: In function ‘fec_enet_get_nextdesc’:
      drivers/net/ethernet/freescale/fec.c:215:18: error: invalid use of undefined type ‘struct bufdesc_ex’
      drivers/net/ethernet/freescale/fec.c: In function ‘fec_enet_get_prevdesc’:
      drivers/net/ethernet/freescale/fec.c:224:18: error: invalid use of undefined type ‘struct bufdesc_ex’
      drivers/net/ethernet/freescale/fec.c: In function ‘fec_enet_start_xmit’:
      drivers/net/ethernet/freescale/fec.c:286:37: error: arithmetic on pointer to an incomplete type
      drivers/net/ethernet/freescale/fec.c:287:13: error: arithmetic on pointer to an incomplete type
      drivers/net/ethernet/freescale/fec.c:324:7: error: dereferencing pointer to incomplete type etc....
      Signed-off-by: default avatarFrank Li <Frank.Li@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Frank Li's avatar
      net: fec: put tx to napi poll function to fix dead lock · de5fb0a0
      Frank Li authored
      up stack ndo_start_xmit already hold lock.
      fec_enet_start_xmit needn't spin lock.
      stat_xmit just update fep->cur_tx
      fec_enet_tx just update fep->dirty_tx
      Reserve a empty bdb to check full or empty
      cur_tx == dirty_tx    means full
      cur_tx == dirty_tx +1 means empty
      So needn't is_full variable.
      Fix spin lock deadlock
      [ INFO: inconsistent lock state ]
      3.8.0-rc5+ #107 Not tainted
      inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
      ptp4l/615 [HC1[1]:SC0[0]:HE0:SE1] takes:
       (&(&list->lock)->rlock#3){?.-...}, at: [<8042c3c4>] skb_queue_tail+0x20/0x50
       {HARDIRQ-ON-W} state was registered at:
       [<80067250>] mark_lock+0x154/0x4e8
       [<800676f4>] mark_irqflags+0x110/0x1a4
       [<80069208>] __lock_acquire+0x494/0x9c0
       [<80069ce8>] lock_acquire+0x90/0xa4
       [<80527ad0>] _raw_spin_lock_bh+0x44/0x54
       [<804877e0>] first_packet_length+0x38/0x1f0
       [<804879e4>] udp_poll+0x4c/0x5c
       [<804231f8>] sock_poll+0x24/0x28
       [<800d27f0>] do_poll.isra.10+0x120/0x254
       [<800d36e4>] do_sys_poll+0x15c/0x1e8
       [<800d3828>] sys_poll+0x60/0xc8
       [<8000e780>] ret_fast_syscall+0x0/0x3c
       *** DEADLOCK ***
       1 lock held by ptp4l/615:
        #0:  (&(&fep->hw_lock)->rlock){-.-...}, at: [<80355f9c>] fec_enet_tx+0x24/0x268
        stack backtrace:
        [<800121e0>] (dump_backtrace+0x0/0x10c) from [<80516210>] (dump_stack+0x18/0x1c)
        r6:8063b1fc r5:bf38b2f8 r4:bf38b000 r3:bf38b000
        [<805161f8>] (dump_stack+0x0/0x1c) from [<805189d0>] (print_usage_bug.part.34+0x164/0x1a4)
        [<8051886c>] (print_usage_bug.part.34+0x0/0x1a4) from [<80518a88>] (print_usage_bug+0x78/0x88)
        r8:80065664 r7:bf38b2f8 r6:00000002 r5:00000000 r4:bf38b000
        [<80518a10>] (print_usage_bug+0x0/0x88) from [<80518b58>] (mark_lock_irq+0xc0/0x270)
        r7:bf38b000 r6:00000002 r5:bf38b2f8 r4:00000000
        [<80518a98>] (mark_lock_irq+0x0/0x270) from [<80067270>] (mark_lock+0x174/0x4e8)
        [<800670fc>] (mark_lock+0x0/0x4e8) from [<80067744>] (mark_irqflags+0x160/0x1a4)
        [<800675e4>] (mark_irqflags+0x0/0x1a4) from [<80069208>] (__lock_acquire+0x494/0x9c0)
        r5:00000002 r4:bf38b2f8
        [<80068d74>] (__lock_acquire+0x0/0x9c0) from [<80069ce8>] (lock_acquire+0x90/0xa4)
        [<80069c58>] (lock_acquire+0x0/0xa4) from [<805278d8>] (_raw_spin_lock_irqsave+0x4c/0x60)
        [<8052788c>] (_raw_spin_lock_irqsave+0x0/0x60) from [<8042c3c4>] (skb_queue_tail+0x20/0x50)
        r6:bfbb2180 r5:bf1d0190 r4:bf1d0184
        [<8042c3a4>] (skb_queue_tail+0x0/0x50) from [<8042c4cc>] (sock_queue_err_skb+0xd8/0x188)
        r6:00000056 r5:bfbb2180 r4:bf1d0000 r3:00000000
        [<8042c3f4>] (sock_queue_err_skb+0x0/0x188) from [<8042d15c>] (skb_tstamp_tx+0x70/0xa0)
        r6:bf0dddb0 r5:bf1d0000 r4:bfbb2180 r3:00000004
        [<8042d0ec>] (skb_tstamp_tx+0x0/0xa0) from [<803561d0>] (fec_enet_tx+0x258/0x268)
        r6:c089d260 r5:00001c00 r4:bfbd0000
        [<80355f78>] (fec_enet_tx+0x0/0x268) from [<803562cc>] (fec_enet_interrupt+0xec/0xf8)
        [<803561e0>] (fec_enet_interrupt+0x0/0xf8) from [<8007d5b0>] (handle_irq_event_percpu+0x54/0x1a0)
        [<8007d55c>] (handle_irq_event_percpu+0x0/0x1a0) from [<8007d740>] (handle_irq_event+0x44/0x64)
        [<8007d6fc>] (handle_irq_event+0x0/0x64) from [<80080690>] (handle_fasteoi_irq+0xc4/0x15c)
        r6:bf0dc000 r5:bf811290 r4:bf811240 r3:00000000
        [<800805cc>] (handle_fasteoi_irq+0x0/0x15c) from [<8007ceec>] (generic_handle_irq+0x28/0x38)
        r5:807130c8 r4:00000096
        [<8007cec4>] (generic_handle_irq+0x0/0x38) from [<8000f16c>] (handle_IRQ+0x54/0xb4)
        r4:8071d280 r3:00000180
        [<8000f118>] (handle_IRQ+0x0/0xb4) from [<80008544>] (gic_handle_irq+0x30/0x64)
        r8:8000e924 r7:f4000100 r6:bf0ddef8 r5:8071c974 r4:f400010c
        [<80008514>] (gic_handle_irq+0x0/0x64) from [<8000e2e4>] (__irq_svc+0x44/0x5c)
        Exception stack(0xbf0ddef8 to 0xbf0ddf40)
      Signed-off-by: default avatarFrank Li <Frank.Li@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Theodore Ts'o's avatar
      random: fix locking dependency with the tasklist_lock · b9809552
      Theodore Ts'o authored
      Commit 61337054
       introduced a circular lock dependency because
      posix_cpu_timers_exit() is called by release_task(), which is holding
      a writer lock on tasklist_lock, and this can cause a deadlock since
      kill_fasync() gets called with nonblocking_pool.lock taken.
      There's no reason why kill_fasync() needs to be taken while the random
      pool is locked, so move it out to fix this locking dependency.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Reported-by: default avatarRuss Dill <Russ.Dill@gmail.com>
      Cc: stable@kernel.org
    • Egbert Eich's avatar
      DRM/i915: On G45 enable cursor plane briefly after enabling the display plane. · 61bc95c1
      Egbert Eich authored
      On G45 some low res modes (800x600 and 1024x768) produce a blank
      screen when the display plane is enabled with with cursor plane
      Experiments showed that this issue occurred when the following
      conditions were met:
      a. a previous mode had the cursor plane enabled (Xserver).
      b. this mode or the previous one was using self refresh. (Thus
         the problem was only seen with low res modes).
      The screens lit up as soon as the cursor plane got enabled.
      Therefore the blank screen occurred only in console mode, not
      when running an Xserver.
      It also seemed to be necessary to disable self refresh while briefly
      enabling the cursor plane.
      Signed-off-by: default avatarEgbert Eich <eich@suse.com>
      Bugzilla: https://bugs.freedesktop.org/attachment.cgi?bugid=61457
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [danvet: drop spurious whitespace change.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    • Rafael J. Wysocki's avatar
      ACPI / glue: Drop .find_bridge() callback from struct acpi_bus_type · 92414481
      Rafael J. Wysocki authored
      After PCI and USB have stopped using the .find_bridge() callback in
      struct acpi_bus_type, the only remaining user of it is SATA, but SATA
      only pretends to be a user, because it points that callback to a stub
      always returning -ENODEV.
      For this reason, drop the SATA's dummy .find_bridge() callback and
      remove .find_bridge(), which is not used any more, from struct
      acpi_bus_type entirely.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
      Acked-by: default avatarJeff Garzik <jgarzik@pobox.com>
    • Rafael J. Wysocki's avatar
      ACPI / glue: Add .match() callback to struct acpi_bus_type · 53540098
      Rafael J. Wysocki authored
      USB uses the .find_bridge() callback from struct acpi_bus_type
      incorrectly, because as a result of the way it is used by USB every
      device in the system that doesn't have a bus type or parent is
      passed to usb_acpi_find_device() for inspection.
      What USB actually needs, though, is to call usb_acpi_find_device()
      for USB ports that don't have a bus type defined, but have
      usb_port_device_type as their device type, as well as for USB
      To fix that replace the struct bus_type pointer in struct
      acpi_bus_type used for matching devices to specific subsystems
      with a .match() callback to be used for this purpose and update
      the users of struct acpi_bus_type, including USB, accordingly.
      Define the .match() callback routine for USB, usb_acpi_bus_match(),
      in such a way that it will cover both USB devices and USB ports
      and remove the now redundant .find_bridge() callback pointer from
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
      Acked-by: default avatarJeff Garzik <jgarzik@pobox.com>
    • Chen Gang's avatar
      ACPI / porocessor: Beautify code, pr->id is u32 which is never < 0 · 9b27516f
      Chen Gang authored
      pr->id is u32 which never < 0, so remove the redundant pr->id < 0
      check from acpi_processor_add().
      [rjw: Changelog]
      Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    • Syam Sidhardhan's avatar
      ACPI / processor: Remove redundant NULL check before kfree · 5273a258
      Syam Sidhardhan authored
      kfree() on a NULL pointer is a no-op, so remove a redundant NULL
      pointer check in map_mat_entry().
      [rjw: Changelog]
      Signed-off-by: default avatarSyam Sidhardhan <s.syam@samsung.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    • Joe Perches's avatar
      ACPI / Sleep: Avoid interleaved message on errors · ed4cf5b2
      Joe Perches authored
      Got this dmesg log on an Acer Aspire 725.
      [    0.256351] ACPI: (supports S0ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20130117/hwxface-568)
      [    0.256373] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)
      [    0.256391]  S3 S4 S5)
      Avoid this interleaving error messages.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    • Rafael J. Wysocki's avatar
      PM / QoS: Remove device PM QoS sysfs attributes at the right place · 37530f2b
      Rafael J. Wysocki authored
      Device PM QoS sysfs attributes, if present during device removal,
      are removed from within device_pm_remove(), which is too late,
      since dpm_sysfs_remove() has already removed the whole attribute
      group they belonged to.  However, moving the removal of those
      attributes to dpm_sysfs_remove() alone is not sufficient, because
      in theory they still can be re-added right after being removed by it
      (the device's driver is still bound to it at that point).
      For this reason, move the entire desctruction of device PM QoS
      constraints to dpm_sysfs_remove() and make it prevent any new
      constraints from being added after it has run.  Also, move the
      initialization of the power.qos field in struct device to
      device_pm_init_common() and drop the no longer needed
      Reported-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    • Rafael J. Wysocki's avatar
      PM / QoS: Fix concurrency issues and memory leaks in device PM QoS · b81ea1b5
      Rafael J. Wysocki authored
      The current device PM QoS code assumes that certain functions will
      never be called in parallel with each other (for example, it is
      assumed that dev_pm_qos_expose_flags() won't be called in parallel
      with dev_pm_qos_hide_flags() for the same device and analogously
      for the latency limit), which may be overly optimistic.  Moreover,
      dev_pm_qos_expose_flags() and dev_pm_qos_expose_latency_limit()
      leak memory in error code paths (req needs to be freed on errors)
      and __dev_pm_qos_drop_user_request() forgets to free the request.
      To fix the above issues put more things under the device PM QoS
      mutex to make them mutually exclusive and add the missing freeing
      of memory.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    • Emilio López's avatar
      cpufreq: highbank: do not initialize array with a loop · f5f43dcf
      Emilio López authored
      As uninitialized array members will be initialized to zero, we can
      avoid using a for loop by setting a value to it.
      Signed-off-by: default avatarEmilio López <emilio@elopez.com.ar>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Acked-By: default avatarMark Langsdorf <mark.langsdorf@calxeda.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>