1. 16 3月, 2013 1 次提交
  2. 13 3月, 2013 1 次提交
  3. 10 3月, 2013 1 次提交
    • L
      Atmel MXT touchscreen: increase reset timeouts · 8343bce1
      Linus Torvalds 提交于
      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: NLinus Torvalds <torvalds@linux-foundation.org>
      8343bce1
  4. 09 3月, 2013 3 次提交
  5. 08 3月, 2013 8 次提交
  6. 07 3月, 2013 4 次提交
  7. 06 3月, 2013 6 次提交
    • M
      efivarfs: return accurate error code in efivarfs_fill_super() · feff5dc4
      Matt Fleming 提交于
      Joseph was hitting a failure case when mounting efivarfs which
      resulted in an incorrect error message,
      
        $ sudo mount -v /sys/firmware/efi/efivars mount: Cannot allocate memory
      
      triggered when efivarfs_valid_name() returned -EINVAL.
      
      Make sure we pass accurate return values up the stack if
      efivarfs_fill_super() fails to build inodes for EFI variables.
      Reported-by: NJoseph Yasi <joe.yasi@gmail.com>
      Reported-by: NLingzhu Xiang <lxiang@redhat.com>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: Jeremy Kerr <jk@ozlabs.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: <stable@vger.kernel.org> # v3.8
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      feff5dc4
    • M
      efivars: efivarfs_valid_name() should handle pstore syntax · 123abd76
      Matt Fleming 提交于
      Stricter validation was introduced with commit da27a243
      ("efivarfs: guid part of filenames are case-insensitive") and commit
      47f531e8 ("efivarfs: Validate filenames much more aggressively"),
      which is necessary for the guid portion of efivarfs filenames, but we
      don't need to be so strict with the first part, the variable name. The
      UEFI specification doesn't impose any constraints on variable names
      other than they be a NULL-terminated string.
      
      The above commits caused a regression that resulted in users seeing
      the following message,
      
        $ sudo mount -v /sys/firmware/efi/efivars mount: Cannot allocate memory
      
      whenever pstore EFI variables were present in the variable store,
      since their variable names failed to pass the following check,
      
          /* GUID should be right after the first '-' */
          if (s - 1 != strchr(str, '-'))
      
      as a typical pstore filename is of the form, dump-type0-10-1-<guid>.
      The fix is trivial since the guid portion of the filename is GUID_LEN
      bytes, we can use (len - GUID_LEN) to ensure the '-' character is
      where we expect it to be.
      
      (The bogus ENOMEM error value will be fixed in a separate patch.)
      Reported-by: NJoseph Yasi <joe.yasi@gmail.com>
      Tested-by: NJoseph Yasi <joe.yasi@gmail.com>
      Reported-by: NLingzhu Xiang <lxiang@redhat.com>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: Jeremy Kerr <jk@ozlabs.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: <stable@vger.kernel.org> # v3.8
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      123abd76
    • M
      efi: be more paranoid about available space when creating variables · 68d92986
      Matthew Garrett 提交于
      UEFI variables are typically stored in flash. For various reasons, avaiable
      space is typically not reclaimed immediately upon the deletion of a
      variable - instead, the system will garbage collect during initialisation
      after a reboot.
      
      Some systems appear to handle this garbage collection extremely poorly,
      failing if more than 50% of the system flash is in use. This can result in
      the machine refusing to boot. The safest thing to do for the moment is to
      forbid writes if they'd end up using more than half of the storage space.
      We can make this more finegrained later if we come up with a method for
      identifying the broken machines.
      Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      68d92986
    • P
      drm/i915: Fix incorrect definition of ADPA HSYNC and VSYNC bits · 60222c0c
      Patrik Jakobsson 提交于
      Disable bits for ADPA HSYNC and VSYNC where mixed up resulting in suspend
      becoming standby and vice versa. Fixed by swapping their bit position.
      Reported-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      60222c0c
    • L
      iommu, x86: Add DMA remap fault reason · 4ecccd9e
      Li, Zhen-Hua 提交于
      The number of DMA fault reasons in intel's document are from 1
      to 0xD, but in dmar.c fault reason 0xD is not printed out.
      
      In this document:
      
       "Intel Virtualization Technology for Directed I/O Architecture Specification"
       http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdf
      
      Chapter 4. Support For Device-IOTLBs
      
      Table 6. Unsuccessful Translated Requests
      
      There is fault reason for 0xD not listed in kernel:
      
          Present context-entry used to process translation request
          specifies blocking of Translation Requests (Translation Type (T)
          field value not equal to 01b).
      
      This patch adds reason 0xD as well.
      Signed-off-by: NLi, Zhen-Hua <zhen-hual@hp.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Donald Dutile <ddutile@redhat.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Link: http://lkml.kernel.org/r/1362537797-6034-1-git-send-email-zhen-hual@hp.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      4ecccd9e
    • P
      drm/i915: also disable south interrupts when handling them · 44498aea
      Paulo Zanoni 提交于
      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
        stored."
      
        "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
      patch:
        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/769Tested-by: NImre Deak <imre.deak@intel.com>
      Reported-by: NSedat Dilek <sedat.dilek@gmail.com>
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Pimp commit message with references for the dp aux irq
      timeout regression this fixes.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      44498aea
  8. 05 3月, 2013 8 次提交
    • D
      drm/i915: enable irqs earlier when resuming · 15239099
      Daniel Vetter 提交于
      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
      			    52d7eced first)
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reported-and-Tested-by: NIlya Tumaykin <itumaykin@gmail.com>
      Reviewed-by: Chris wilson <chris@chris-wilson.co.uk> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      15239099
    • S
      drm/i915: Increase the RC6p threshold. · 0920a487
      Stéphane Marchesin 提交于
      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: NStéphane Marchesin <marcheu@chromium.org>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0920a487
    • C
      drivers/tty/hvc: Use strlcpy instead of strncpy · 9276dfd2
      Chen Gang 提交于
      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: NChen Gang <gang.chen@asianux.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9276dfd2
    • R
      hw_random: make buffer usable in scatterlist. · f7f154f1
      Rusty Russell 提交于
      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: NAurelien Jarno <aurelien@aurel32.net>
      Tested-by: NAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: stable@kernel.org
      f7f154f1
    • F
      net: fec: fix build error in no MXC platform · acac8406
      Frank Li 提交于
      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: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acac8406
    • F
      net: fec: put tx to napi poll function to fix dead lock · de5fb0a0
      Frank Li 提交于
      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:
        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
        r3:00000000
        [<80008514>] (gic_handle_irq+0x0/0x64) from [<8000e2e4>] (__irq_svc+0x44/0x5c)
        Exception stack(0xbf0ddef8 to 0xbf0ddf40)
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de5fb0a0
    • T
      random: fix locking dependency with the tasklist_lock · b9809552
      Theodore Ts'o 提交于
      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: N"Theodore Ts'o" <tytso@mit.edu>
      Reported-by: NRuss Dill <Russ.Dill@gmail.com>
      Cc: stable@kernel.org
      b9809552
    • E
      DRM/i915: On G45 enable cursor plane briefly after enabling the display plane. · 61bc95c1
      Egbert Eich 提交于
      On G45 some low res modes (800x600 and 1024x768) produce a blank
      screen when the display plane is enabled with with cursor plane
      off.
      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: NEgbert Eich <eich@suse.com>
      Bugzilla: https://bugs.freedesktop.org/attachment.cgi?bugid=61457Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: drop spurious whitespace change.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      61bc95c1
  9. 04 3月, 2013 8 次提交