1. 14 Apr, 2015 23 commits
    • Petr Mladek's avatar
      drm/radeon: kernel panic in drm_calc_vbltimestamp_from_scanoutpos with 3.18.0-rc6 · 9cc1941e
      Petr Mladek authored
      commit f5475cc4 upstream.
      
      I was unable too boot 3.18.0-rc6 because of the following kernel
      panic in drm_calc_vbltimestamp_from_scanoutpos():
      
          [drm] Initialized drm 1.1.0 20060810
          [drm] radeon kernel modesetting enabled.
          [drm] initializing kernel modesetting (RV100 0x1002:0x515E 0x15D9:0x8080).
          [drm] register mmio base: 0xC8400000
          [drm] register mmio size: 65536
          radeon 0000:0b:01.0: VRAM: 128M 0x00000000D0000000 - 0x00000000D7FFFFFF (16M used)
          radeon 0000:0b:01.0: GTT: 512M 0x00000000B0000000 - 0x00000000CFFFFFFF
          [drm] Detected VRAM RAM=128M, BAR=128M
          [drm] RAM width 16bits DDR
          [TTM] Zone  kernel: Available graphics memory: 3829346 kiB
          [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
          [TTM] Initializing pool allocator
          [TTM] Initializing DMA pool allocator
          [drm] radeon: 16M of VRAM memory ready
          [drm] radeon: 512M of GTT memory ready.
          [drm] GART: num cpu pages 131072, num gpu pages 131072
          [drm] PCI GART of 512M enabled (table at 0x0000000037880000).
          radeon 0000:0b:01.0: WB disabled
          radeon 0000:0b:01.0: fence driver on ring 0 use gpu addr 0x00000000b0000000 and cpu addr 0xffff8800bbbfa000
          [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
          [drm] Driver supports precise vblank timestamp query.
          [drm] radeon: irq initialized.
          [drm] Loading R100 Microcode
          radeon 0000:0b:01.0: Direct firmware load for radeon/R100_cp.bin failed with error -2
          radeon_cp: Failed to load firmware "radeon/R100_cp.bin"
          [drm:r100_cp_init] *ERROR* Failed to load firmware!
          radeon 0000:0b:01.0: failed initializing CP (-2).
          radeon 0000:0b:01.0: Disabling GPU acceleration
          [drm] radeon: cp finalized
          BUG: unable to handle kernel NULL pointer dereference at 000000000000025c
          IP: [<ffffffff8150423b>] drm_calc_vbltimestamp_from_scanoutpos+0x4b/0x320
          PGD 0
          Oops: 0000 [#1] SMP
          Modules linked in:
          CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc6-4-default #2649
          Hardware name: Supermicro X7DB8/X7DB8, BIOS 6.00 07/26/2006
          task: ffff880234da2010 ti: ffff880234da4000 task.ti: ffff880234da4000
          RIP: 0010:[<ffffffff8150423b>]  [<ffffffff8150423b>] drm_calc_vbltimestamp_from_scanoutpos+0x4b/0x320
          RSP: 0000:ffff880234da7918  EFLAGS: 00010086
          RAX: ffffffff81557890 RBX: 0000000000000000 RCX: ffff880234da7a48
          RDX: ffff880234da79f4 RSI: 0000000000000000 RDI: ffff880232e15000
          RBP: ffff880234da79b8 R08: 0000000000000000 R09: 0000000000000000
          R10: 000000000000000a R11: 0000000000000001 R12: ffff880232dda1c0
          R13: ffff880232e1518c R14: 0000000000000292 R15: ffff880232e15000
          FS:  0000000000000000(0000) GS:ffff88023fc40000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
          CR2: 000000000000025c CR3: 0000000002014000 CR4: 00000000000007e0
          Stack:
           ffff880234da79d8 0000000000000286 ffff880232dcbc00 0000000000002480
           ffff880234da7958 0000000000000296 ffff880234da7998 ffffffff8151b51d
           ffff880234da7a48 0000000032dcbeb0 ffff880232dcbc00 ffff880232dcbc58
          Call Trace:
           [<ffffffff8151b51d>] ? drm_vma_offset_remove+0x1d/0x110
           [<ffffffff8152dc98>] radeon_get_vblank_timestamp_kms+0x38/0x60
           [<ffffffff8152076a>] ? ttm_bo_release_list+0xba/0x180
           [<ffffffff81503751>] drm_get_last_vbltimestamp+0x41/0x70
           [<ffffffff81503933>] vblank_disable_and_save+0x73/0x1d0
           [<ffffffff81106b2f>] ? try_to_del_timer_sync+0x4f/0x70
           [<ffffffff81505245>] drm_vblank_cleanup+0x65/0xa0
           [<ffffffff815604fa>] radeon_irq_kms_fini+0x1a/0x70
           [<ffffffff8156c07e>] r100_init+0x26e/0x410
           [<ffffffff8152ae3e>] radeon_device_init+0x7ae/0xb50
           [<ffffffff8152d57f>] radeon_driver_load_kms+0x8f/0x210
           [<ffffffff81506965>] drm_dev_register+0xb5/0x110
           [<ffffffff8150998f>] drm_get_pci_dev+0x8f/0x200
           [<ffffffff815291cd>] radeon_pci_probe+0xad/0xe0
           [<ffffffff8141a365>] local_pci_probe+0x45/0xa0
           [<ffffffff8141b741>] pci_device_probe+0xd1/0x130
           [<ffffffff81633dad>] driver_probe_device+0x12d/0x3e0
           [<ffffffff8163413b>] __driver_attach+0x9b/0xa0
           [<ffffffff816340a0>] ? __device_attach+0x40/0x40
           [<ffffffff81631cd3>] bus_for_each_dev+0x63/0xa0
           [<ffffffff8163378e>] driver_attach+0x1e/0x20
           [<ffffffff81633390>] bus_add_driver+0x180/0x240
           [<ffffffff81634914>] driver_register+0x64/0xf0
           [<ffffffff81419cac>] __pci_register_driver+0x4c/0x50
           [<ffffffff81509bf5>] drm_pci_init+0xf5/0x120
           [<ffffffff821dc871>] ? ttm_init+0x6a/0x6a
           [<ffffffff821dc908>] radeon_init+0x97/0xb5
           [<ffffffff810002fc>] do_one_initcall+0xbc/0x1f0
           [<ffffffff810e3278>] ? __wake_up+0x48/0x60
           [<ffffffff8218e256>] kernel_init_freeable+0x18a/0x215
           [<ffffffff8218d983>] ? initcall_blacklist+0xc0/0xc0
           [<ffffffff818a78f0>] ? rest_init+0x80/0x80
           [<ffffffff818a78fe>] kernel_init+0xe/0xf0
           [<ffffffff818c0c3c>] ret_from_fork+0x7c/0xb0
           [<ffffffff818a78f0>] ? rest_init+0x80/0x80
          Code: 45 ac 0f 88 a8 01 00 00 3b b7 d0 01 00 00 49 89 ff 0f 83 99 01 00 00 48 8b 47 20 48 8b 80 88 00 00 00 48 85 c0 0f 84 cd 01 00 00 <41> 8b b1 5c 02 00 00 41 8b 89 58 02 00 00 89 75 98 41 8b b1 60
          RIP  [<ffffffff8150423b>] drm_calc_vbltimestamp_from_scanoutpos+0x4b/0x320
           RSP <ffff880234da7918>
          CR2: 000000000000025c
          ---[ end trace ad2c0aadf48e2032 ]---
          Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009
      
      It has helped me to add a NULL pointer check that was suggested at
      http://lists.freedesktop.org/archives/dri-devel/2014-October/070663.html
      
      I am not familiar with the code. But the change looks sane
      and we need something fast at this stage of 3.18 development.
      Suggested-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.cz>
      Tested-by: default avatarPetr Mladek <pmladek@suse.cz>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      9cc1941e
    • Dmitry Torokhov's avatar
      sata_fsl: fix error handling of irq_of_parse_and_map · 00646dbf
      Dmitry Torokhov authored
      commit aad0b624 upstream.
      
      irq_of_parse_and_map() returns 0 on error (the result is unsigned int),
      so testing for negative result never works.
      Signed-off-by: default avatarDmitry Torokhov <dtor@chromium.org>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      00646dbf
    • Devin Ryles's avatar
      AHCI: Add DeviceIDs for Sunrise Point-LP SATA controller · 1c84f5cc
      Devin Ryles authored
      commit 249cd0a1 upstream.
      
      This patch adds DeviceIDs for Sunrise Point-LP.
      Signed-off-by: default avatarDevin Ryles <devin.ryles@intel.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      1c84f5cc
    • Daniel Vetter's avatar
      drm/i915: Unlock panel even when LVDS is disabled · 558ab6ce
      Daniel Vetter authored
      commit b0616c53 upstream.
      
      Otherwise we'll have backtraces in assert_panel_unlocked because the
      BIOS locks the register. In the reporter's case this regression was
      introduced in
      
      commit c31407a3
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Oct 18 21:07:01 2012 +0100
      
          drm/i915: Add no-lvds quirk for Supermicro X7SPA-H
      Reported-by: default avatarAlexey Orishko <alexey.orishko@gmail.com>
      Cc: Alexey Orishko <alexey.orishko@gmail.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Francois Tigeot <ftigeot@wolfpond.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Tested-by: default avatarAlexey Orishko <alexey.orishko@gmail.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      [lizf: Backported to 3.4: adjust context]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      558ab6ce
    • Laurent Dufour's avatar
      powerpc/pseries: Fix endiannes issue in RTAS call from xmon · 44523712
      Laurent Dufour authored
      commit 3b8a3c01 upstream.
      
      On pseries system (LPAR) xmon failed to enter when running in LE mode,
      system is hunging. Inititating xmon will lead to such an output on the
      console:
      
      SysRq : Entering xmon
      cpu 0x15: Vector: 0  at [c0000003f39ffb10]
          pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
          lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
          sp: c0000003f39ffc70
         msr: 8000000000009033
        current = 0xc0000003fafa7180
        paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
          pid   = 14617, comm = bash
      Bad kernel stack pointer fafb4b0 at eca7cc4
      cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
          pc: 000000000eca7cc4
          lr: 000000000eca7c44
          sp: fafb4b0
         msr: 8000000000001000
         dar: 10000000
       dsisr: 42000000
        current = 0xc0000003fafa7180
        paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
          pid   = 14617, comm = bash
      cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
      xmon: WARNING: bad recursive fault on cpu 0x15
      
      The root cause is that xmon is calling RTAS to turn off the surveillance
      when entering xmon, and RTAS is requiring big endian parameters.
      
      This patch is byte swapping the RTAS arguments when running in LE mode.
      Signed-off-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      44523712
    • Greg Kroah-Hartman's avatar
      Input: xpad - use proper endpoint type · 267817fd
      Greg Kroah-Hartman authored
      commit a1f9a407 upstream.
      
      The xpad wireless endpoint is not a bulk endpoint on my devices, but
      rather an interrupt one, so the USB core complains when it is submitted.
      I'm guessing that the author really did mean that this should be an
      interrupt urb, but as there are a zillion different xpad devices out
      there, let's cover out bases and handle both bulk and interrupt
      endpoints just as easily.
      Signed-off-by: default avatar"Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      267817fd
    • Hans de Goede's avatar
      usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000 · f225c526
      Hans de Goede authored
      commit 263e80b4 upstream.
      
      This wireless mouse receiver needs a reset-resume quirk to properly come
      out of reset.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1165206Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      f225c526
    • Aaro Koskinen's avatar
      MIPS: Loongson: Make platform serial setup always built-in. · 984541bd
      Aaro Koskinen authored
      commit 26927f76 upstream.
      
      If SERIAL_8250 is compiled as a module, the platform specific setup
      for Loongson will be a module too, and it will not work very well.
      At least on Loongson 3 it will trigger a build failure,
      since loongson_sysconf is not exported to modules.
      
      Fix by making the platform specific serial code always built-in.
      Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Reported-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Markos Chandras <Markos.Chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/8533/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      984541bd
    • Takashi Iwai's avatar
      ALSA: hda - Limit 40bit DMA for AMD HDMI controllers · e39abe89
      Takashi Iwai authored
      commit 413cbf46 upstream.
      
      AMD/ATI HDMI controller chip models, we already have a filter to lower
      to 32bit DMA, but the rest are supposed to be working with 64bit
      although the hardware doesn't really work with 63bit but only with 40
      or 48bit DMA.  In this patch, we take 40bit DMA for safety for the
      AMD/ATI controllers as the graphics drivers does.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [lizf: Backported to 3.4:
       - adjust context
       - s/AZX_GCAP_640K/ICH6_GCAP_64OK]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      e39abe89
    • Lu Baolu's avatar
      usb: xhci: rework root port wake bits if controller isn't allowed to wakeup · 8143ad28
      Lu Baolu authored
      commit a1377e53 upstream.
      
      When system is being suspended, if host device is not allowed to do wakeup,
      xhci_suspend() needs to clear all root port wake on bits. Otherwise, some
      platforms may generate spurious wakeup, even if PCI PME# is disabled.
      
      The initial commit ff8cbf25 ("xhci: clear root port wake on bits"),
      which also got into stable, turned out to not work correctly and had to
      be reverted, and is now rewritten.
      Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Suggested-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      [Mathias Nyman: reword commit message]
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      [lizf: Backported to 3.4:
       - adjust context
       - drop changes to xhci_plat_suspend()]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      8143ad28
    • Mathias Nyman's avatar
      USB: xhci: Reset a halted endpoint immediately when we encounter a stall. · 991182b9
      Mathias Nyman authored
      commit 8e71a322 upstream.
      
      If a device is halted and reuturns a STALL, then the halted endpoint
      needs to be cleared both on the host and device side. The host
      side halt is cleared by issueing a xhci reset endpoint command. The device side
      is cleared with a ClearFeature(ENDPOINT_HALT) request, which should
      be issued by the device driver if a URB reruen -EPIPE.
      
      Previously we cleared the host side halt after the device side was cleared.
      To make sure the host side halt is cleared in time we want to issue the
      reset endpoint command immedialtely when a STALL status is encountered.
      
      Otherwise we end up not following the specs and not returning -EPIPE
      several times in a row when trying to transfer data to a halted endpoint.
      
      Fixes: bcef3fd5 (USB: xhci: Handle errors that cause endpoint halts.)
      Tested-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      [lizf: Backported to 3.4: adjust context]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      991182b9
    • Mathias Nyman's avatar
      USB: xhci: don't start a halted endpoint before its new dequeue is set · a3d7be95
      Mathias Nyman authored
      commit c3492dbf upstream.
      
      A halted endpoint ring must first be reset, then move the ring
      dequeue pointer past the problematic TRB. If we start the ring too
      early after reset, but before moving the dequeue pointer we
      will end up executing the same problematic TRB again.
      
      As we always issue a set transfer dequeue command after a reset
      endpoint command we can skip starting endpoint rings at reset endpoint
      command completion.
      
      Without this fix we end up trying to handle the same faulty TD for
      contol endpoints. causing timeout, and failing testusb ctrl_out write
      tests.
      
      Fixes: e9df17eb (USB: xhci: Correct assumptions about number of rings per endpoint.)
      Tested-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      a3d7be95
    • Dmitry Eremin-Solenikov's avatar
      ARM: 8216/1: xscale: correct auxiliary register in suspend/resume · 185a0969
      Dmitry Eremin-Solenikov authored
      commit ef59a20b upstream.
      
      According to the manuals I have, XScale auxiliary register should be
      reached with opc_2 = 1 instead of crn = 1. cpu_xscale_proc_init
      correctly uses c1, c0, 1 arguments, but cpu_xscale_do_suspend and
      cpu_xscale_do_resume use c1, c1, 0. Correct suspend/resume functions to
      also use c1, c0, 1.
      
      The issue was primarily noticed thanks to qemu reporing "unsupported
      instruction" on the pxa suspend path. Confirmed in PXA210/250 and PXA255
      XScale Core manuals and in PXA270 and PXA320 Developers Guides.
      
      Harware tested by me on tosa (pxa255). Robert confirmed on pxa270 board.
      Tested-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      185a0969
    • Maurizio Lombardi's avatar
      bnx2fc: do not add shared skbs to the fcoe_rx_list · 5398d2a6
      Maurizio Lombardi authored
      commit 01a4cc4d upstream.
      
      In some cases, the fcoe_rx_list may contains multiple instances
      of the same skb (the so called "shared skbs").
      
      the bnx2fc_l2_rcv thread is a loop that extracts a skb from the list,
      modifies (and destroys) its content and then proceed to the next one.
      The problem is that if the skb is shared, the remaining instances will
      be corrupted.
      
      The solution is to use skb_share_check() before adding the skb to the
      fcoe_rx_list.
      
      [ 6286.808725] ------------[ cut here ]------------
      [ 6286.808729] WARNING: at include/scsi/fc_frame.h:173 bnx2fc_l2_rcv_thread+0x425/0x450 [bnx2fc]()
      [ 6286.808748] Modules linked in: bnx2x(-) mdio dm_service_time bnx2fc cnic uio fcoe libfcoe 8021q garp stp mrp libfc llc scsi_transport_fc scsi_tgt sg iTCO_wdt iTCO_vendor_support coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul crc32c_intel e1000e ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper ptp cryptd hpilo serio_raw hpwdt lpc_ich pps_core ipmi_si pcspkr mfd_core ipmi_msghandler shpchp pcc_cpufreq mperf nfsd auth_rpcgss nfs_acl lockd sunrpc dm_multipath xfs libcrc32c ata_generic pata_acpi sd_mod crc_t10dif crct10dif_common mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit ata_piix drm_kms_helper ttm drm libata i2c_core hpsa dm_mirror dm_region_hash dm_log dm_mod [last unloaded: mdio]
      [ 6286.808750] CPU: 3 PID: 1304 Comm: bnx2fc_l2_threa Not tainted 3.10.0-121.el7.x86_64 #1
      [ 6286.808750] Hardware name: HP ProLiant DL120 G7, BIOS J01 07/01/2013
      [ 6286.808752]  0000000000000000 000000000b36e715 ffff8800deba1e00 ffffffff815ec0ba
      [ 6286.808753]  ffff8800deba1e38 ffffffff8105dee1 ffffffffa05618c0 ffff8801e4c81888
      [ 6286.808754]  ffffe8ffff663868 ffff8801f402b180 ffff8801f56bc000 ffff8800deba1e48
      [ 6286.808754] Call Trace:
      [ 6286.808759]  [<ffffffff815ec0ba>] dump_stack+0x19/0x1b
      [ 6286.808762]  [<ffffffff8105dee1>] warn_slowpath_common+0x61/0x80
      [ 6286.808763]  [<ffffffff8105e00a>] warn_slowpath_null+0x1a/0x20
      [ 6286.808765]  [<ffffffffa054f415>] bnx2fc_l2_rcv_thread+0x425/0x450 [bnx2fc]
      [ 6286.808767]  [<ffffffffa054eff0>] ? bnx2fc_disable+0x90/0x90 [bnx2fc]
      [ 6286.808769]  [<ffffffff81085aef>] kthread+0xcf/0xe0
      [ 6286.808770]  [<ffffffff81085a20>] ? kthread_create_on_node+0x140/0x140
      [ 6286.808772]  [<ffffffff815fc76c>] ret_from_fork+0x7c/0xb0
      [ 6286.808773]  [<ffffffff81085a20>] ? kthread_create_on_node+0x140/0x140
      [ 6286.808774] ---[ end trace c6cdb939184ccb4e ]---
      Signed-off-by: default avatarMaurizio Lombardi <mlombard@redhat.com>
      Acked-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      5398d2a6
    • Trond Myklebust's avatar
      nfsd: Fix slot wake up race in the nfsv4.1 callback code · b198b711
      Trond Myklebust authored
      commit c6c15e1e upstream.
      
      The currect code for nfsd41_cb_get_slot() and nfsd4_cb_done() has no
      locking in order to guarantee atomicity, and so allows for races of
      the form.
      
      Task 1                                  Task 2
      ======                                  ======
      if (test_and_set_bit(0) != 0) {
                                              clear_bit(0)
                                              rpc_wake_up_next(queue)
              rpc_sleep_on(queue)
              return false;
      }
      
      This patch breaks the race condition by adding a retest of the bit
      after the call to rpc_sleep_on().
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      b198b711
    • Trond Myklebust's avatar
      SUNRPC: Fix locking around callback channel reply receive · 63ed3573
      Trond Myklebust authored
      commit 093a1468 upstream.
      
      Both xprt_lookup_rqst() and xprt_complete_rqst() require that you
      take the transport lock in order to avoid races with xprt_transmit().
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      Reviewed-by: default avatarJeff Layton <jlayton@primarydata.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      [lizf: Backported to 3.4: adjust context]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      63ed3573
    • Johan Hovold's avatar
      USB: ssu100: fix overrun-error reporting · 7167d336
      Johan Hovold authored
      commit 75bcbf29 upstream.
      
      Fix reporting of overrun errors, which should only be reported once
      using the inserted null character.
      
      Fixes: 6b8f1ca5 ("USB: ssu100: set tty_flags in ssu100_process_packet")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      [lizf: Backported to 3.4:
       - adjust context
       - lookup tty using tty_port_tty_get()]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      7167d336
    • Johan Hovold's avatar
      USB: keyspan: fix overrun-error reporting · 1fb787ce
      Johan Hovold authored
      commit 855515a6 upstream.
      
      Fix reporting of overrun errors, which are not associated with a
      character. Instead insert a null character and report only once.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      [lizf: Backported to 3.4:
       - s/&port->port/tty
       - adjust context
       - adjust indentation]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      1fb787ce
    • Johan Hovold's avatar
      USB: keyspan: fix tty line-status reporting · 3b8a7019
      Johan Hovold authored
      commit 5d1678a3 upstream.
      
      Fix handling of TTY error flags, which are not bitmasks and must
      specifically not be ORed together as this prevents the line discipline
      from recognising them.
      
      Also insert null characters when reporting overrun errors as these are
      not associated with the received character.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      [lizf: Backported to 3.4:
       - s/&port->port/tty/
       - adjust context
       - adjust indentation]
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      3b8a7019
    • Troy Clark's avatar
      usb: serial: ftdi_sio: add PIDs for Matrix Orbital products · 0ff23ffd
      Troy Clark authored
      commit 204ec6e0 upstream.
      
      Add PIDs for new Matrix Orbital GTT series products.
      Signed-off-by: default avatarTroy Clark <tclark@matrixorbital.ca>
      [johan: shorten commit message ]
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      0ff23ffd
    • Cristina Ciocan's avatar
      iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask · e1962953
      Cristina Ciocan authored
      commit ccf54555 upstream.
      
      The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask
      in order to retrieve it, that is 0x7F, not 0xCF as it is now.
      
      Fixes: ade7ef7b (staging:iio: Differential channel handling)
      Signed-off-by: default avatarCristina Ciocan <cristina.ciocan@intel.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      e1962953
    • Preston Fick's avatar
      USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick · f3234664
      Preston Fick authored
      commit ffcfe30e upstream.
      Signed-off-by: default avatarPreston Fick <pffick@gmail.com>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      f3234664
    • Thor Thayer's avatar
      spi: dw: Fix dynamic speed change. · c5298dc5
      Thor Thayer authored
      commit 0a8727e6 upstream.
      
      An IOCTL call that calls spi_setup() and then dw_spi_setup() will
      overwrite the persisted last transfer speed. On each transfer, the
      SPI speed is compared to the last transfer speed to determine if the
      clock divider registers need to be updated (did the speed change?).
      This bug was observed with the spidev driver using spi-config to
      update the max transfer speed.
      
      This fix: Don't overwrite the persisted last transaction clock speed
      when updating the SPI parameters in dw_spi_setup(). On the next
      transaction, the new speed won't match the persisted last speed
      and the hardware registers will be updated.
      On initialization, the persisted last transaction clock
      speed will be 0 but will be updated after the first SPI
      transaction.
      
      Move zeroed clock divider check into clock change test because
      chip->clk_div is zero on startup and would cause a divide-by-zero
      error. The calculation was wrong as well (can't support odd #).
      Reported-by: default avatarVlastimil Setka <setka@vsis.cz>
      Signed-off-by: default avatarVlastimil Setka <setka@vsis.cz>
      Signed-off-by: default avatarThor Thayer <tthayer@opensource.altera.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
      c5298dc5
  2. 02 Feb, 2015 17 commits