1. 16 Jan, 2015 7 commits
    • Felipe Balbi's avatar
      net: ethernet: cpsw: fix hangs with interrupts · 10152169
      Felipe Balbi authored
      commit 7ce67a38 upstream.
      
      The CPSW IP implements pulse-signaled interrupts. Due to
      that we must write a correct, pre-defined value to the
      CPDMA_MACEOIVECTOR register so the controller generates
      a pulse on the correct IRQ line to signal the End Of
      Interrupt.
      
      The way the driver is written today, all four IRQ lines
      are requested using the same IRQ handler and, because of
      that, we could fall into situations where a TX IRQ fires
      but we tell the controller that we ended an RX IRQ (or
      vice-versa). This situation triggers an IRQ storm on the
      reserved IRQ 127 of INTC which will in turn call ack_bad_irq()
      which will, then, print a ton of:
      
      	unexpected IRQ trap at vector 00
      
      In order to fix the problem, we are moving all calls to
      cpdma_ctlr_eoi() inside the IRQ handler and making sure
      we *always* write the correct value to the CPDMA_MACEOIVECTOR
      register. Note that the algorithm assumes that IRQ numbers and
      value-to-be-written-to-EOI are proportional, meaning that a
      write of value 0 would trigger an EOI pulse for the RX_THRESHOLD
      Interrupt and that's the IRQ number sitting in the 0-th index
      of our irqs_table array.
      
      This, however, is safe at least for current implementations of
      CPSW so we will refrain from making the check smarter (and, as
      a side-effect, slower) until we actually have a platform where
      IRQ lines are swapped.
      
      This patch has been tested for several days with AM335x- and
      AM437x-based platforms. AM57x was left out because there are
      still pending patches to enable ethernet in mainline for that
      platform. A read of the TRM confirms the statement on previous
      paragraph.
      Reported-by: default avatarYegor Yefremov <yegorslists@googlemail.com>
      Fixes: 510a1e7 (drivers: net: davinci_cpdma: acknowledge interrupt properly)
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      10152169
    • Chris Mason's avatar
      Btrfs: don't delay inode ref updates during log replay · 4b3b6c9b
      Chris Mason authored
      commit 6f896054 upstream.
      
      Commit 1d52c78a (Btrfs: try not to ENOSPC on log replay) added a
      check to skip delayed inode updates during log replay because it
      confuses the enospc code.  But the delayed processing will end up
      ignoring delayed refs from log replay because the inode itself wasn't
      put through the delayed code.
      
      This can end up triggering a warning at commit time:
      
      WARNING: CPU: 2 PID: 778 at fs/btrfs/delayed-inode.c:1410 btrfs_assert_delayed_root_empty+0x32/0x34()
      
      Which is repeated for each commit because we never process the delayed
      inode ref update.
      
      The fix used here is to change btrfs_delayed_delete_inode_ref to return
      an error if we're currently in log replay.  The caller will do the ref
      deletion immediately and everything will work properly.
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      4b3b6c9b
    • Alan Stern's avatar
      SCSI: fix regression in scsi_send_eh_cmnd() · aa445be1
      Alan Stern authored
      commit 511833ac upstream.
      
      Commit ac61d195 (scsi: set correct completion code in
      scsi_send_eh_cmnd()) introduced a bug.  It changed the stored return
      value from a queuecommand call, but it didn't take into account that
      the return value was used again later on.  This patch fixes the bug by
      changing the later usage.
      
      There is a big comment in the middle of scsi_send_eh_cmnd() which
      does a good job of explaining how the routine works.  But it mentions
      a "rtn = FAILURE" value that doesn't exist in the code.  This patch
      adjusts the code to match the comment (I assume the comment is right
      and the code is wrong).
      
      This fixes Bugzilla #88341.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-by: default avatarАндрей Аладьев <aladjev.andrew@gmail.com>
      Tested-by: default avatarАндрей Аладьев <aladjev.andrew@gmail.com>
      Fixes: ac61d195Acked-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      aa445be1
    • Steev Klimaszewski's avatar
      Add USB_EHCI_EXYNOS to multi_v7_defconfig · 1b2212b6
      Steev Klimaszewski authored
      commit 007487f1 upstream.
      
      Currently we enable Exynos devices in the multi v7 defconfig, however, when
      testing on my ODROID-U3, I noticed that USB was not working.  Enabling this
      option causes USB to work, which enables networking support as well since the
      ODROID-U3 has networking on the USB bus.
      
      [arnd] Support for odroid-u3 was added in 3.10, so it would be nice to
      backport this fix at least that far.
      Signed-off-by: default avatarSteev Klimaszewski <steev@gentoo.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      1b2212b6
    • Tomi Valkeinen's avatar
      video/fbdev: fix defio's fsync · fced94d0
      Tomi Valkeinen authored
      commit 30ea9c52 upstream.
      
      fb_deferred_io_fsync() returns the value of schedule_delayed_work() as
      an error code, but schedule_delayed_work() does not return an error. It
      returns true/false depending on whether the work was already queued.
      
      Fix this by ignoring the return value of schedule_delayed_work().
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      fced94d0
    • Tomi Valkeinen's avatar
      video/logo: prevent use of logos after they have been freed · 90dbca4f
      Tomi Valkeinen authored
      commit 92b004d1 upstream.
      
      If the probe of an fb driver has been deferred due to missing
      dependencies, and the probe is later ran when a module is loaded, the
      fbdev framework will try to find a logo to use.
      
      However, the logos are __initdata, and have already been freed. This
      causes sometimes page faults, if the logo memory is not mapped,
      sometimes other random crashes as the logo data is invalid, and
      sometimes nothing, if the fbdev decides to reject the logo (e.g. the
      random value depicting the logo's height is too big).
      
      This patch adds a late_initcall function to mark the logos as freed. In
      reality the logos are freed later, and fbdev probe may be ran between
      this late_initcall and the freeing of the logos. In that case we will
      miss drawing the logo, even if it would be possible.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      90dbca4f
    • Andy Lutomirski's avatar
      x86, vdso: Use asm volatile in __getcpu · d1d9e22b
      Andy Lutomirski authored
      commit 1ddf0b1b upstream.
      
      In Linux 3.18 and below, GCC hoists the lsl instructions in the
      pvclock code all the way to the beginning of __vdso_clock_gettime,
      slowing the non-paravirt case significantly.  For unknown reasons,
      presumably related to the removal of a branch, the performance issue
      is gone as of
      
      e76b027e x86,vdso: Use LSL unconditionally for vgetcpu
      
      but I don't trust GCC enough to expect the problem to stay fixed.
      
      There should be no correctness issue, because the __getcpu calls in
      __vdso_vlock_gettime were never necessary in the first place.
      
      Note to stable maintainers: In 3.18 and below, depending on
      configuration, gcc 4.9.2 generates code like this:
      
           9c3:       44 0f 03 e8             lsl    %ax,%r13d
           9c7:       45 89 eb                mov    %r13d,%r11d
           9ca:       0f 03 d8                lsl    %ax,%ebx
      
      This patch won't apply as is to any released kernel, but I'll send a
      trivial backported version if needed.
      
      [
       Backported by Andy Lutomirski.  Should apply to all affected
       versions.  This fixes a functionality bug as well as a performance
       bug: buggy kernels can infinite loop in __vdso_clock_gettime on
       affected compilers.  See, for exammple:
      
       https://bugzilla.redhat.com/show_bug.cgi?id=1178975
      ]
      
      Fixes: 51c19b4f x86: vdso: pvclock gettime support
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      [ luis: backported to 3.16: used Andy's backport for stable kernels ]
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      d1d9e22b
  2. 15 Jan, 2015 33 commits