1. 03 4月, 2018 1 次提交
  2. 31 3月, 2018 1 次提交
  3. 08 3月, 2018 1 次提交
    • A
      Revert "Input: synaptics - Lenovo Thinkpad T460p devices should use RMI" · 5444a992
      Arkadiusz Hiler 提交于
      This reverts commit 48282969 which
      caused the following issues:
      
      1. On T460p with BIOS version 2.22 touchpad and trackpoint stop working
      after suspend-resume cycle. Due to strange state of the device another
      suspend is impossible.
      
      The following dmesg errors can be observed:
      thinkpad_acpi: EC reports that Thermal Table has changed
      rmi4_smbus 7-002c: failed to get SMBus version number!
      rmi4_physical rmi4-00: rmi_driver_reset_handler: Failed to read current IRQ mask.
      rmi4_f01 rmi4-00.fn01: Failed to restore normal operation: -16.
      rmi4_f01 rmi4-00.fn01: Resume failed with code -16.
      rmi4_physical rmi4-00: Failed to suspend functions: -16
      rmi4_smbus 7-002c: Failed to resume device: -16
      PM: resume devices took 0.640 seconds
      rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-16).
      rmi4_physical rmi4-00: rmi_driver_clear_irq_bits: Failed to change enabled interrupts!
      rmi4_physical rmi4-00: rmi_driver_set_irq_bits: Failed to change enabled interrupts!
      psmouse: probe of serio3 failed with error -1
      
      2. On another T460p with BIOS version 2.15 two finger scrolling gesture
      on the touchpad stops working after suspend-resume cycle (about 75%
      reproducibility, when it still works, the scrolling gesture becomes
      laggy). Nothing suspicious appears in the dmesg.
      
      Analysis form Richard Schütz:
      
      "RMI is unreliable on the ThinkPad T460p because the device is affected
      by the firmware behavior addressed in a7ae8195 ("i2c: i801: Allow
      ACPI SystemIO OpRegion to conflict with PCI BAR")."
      
      The affected devices often show:
      
      i801_smbus 0000:00:1f.4: BIOS is accessing SMBus registers
      i801_smbus 0000:00:1f.4: Driver SMBus register access inhibited
      Reported-by: NRichard Schütz <rschuetz@uni-koblenz.de>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Tested-by: NMartin Peres <martin.peres@linux.intel.com>
      Tested-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      5444a992
  4. 05 3月, 2018 12 次提交
  5. 03 3月, 2018 2 次提交
    • D
      libnvdimm: re-enable deep flush for pmem devices via fsync() · 5fdf8e5b
      Dave Jiang 提交于
      Re-enable deep flush so that users always have a way to be sure that a
      write makes it all the way out to media. Writes from the PMEM driver
      always arrive at the NVDIMM since movnt is used to bypass the cache, and
      the driver relies on the ADR (Asynchronous DRAM Refresh) mechanism to
      flush write buffers on power failure. The Deep Flush mechanism is there
      to explicitly write buffers to protect against (rare) ADR failure.  This
      change prevents a regression in deep flush behavior so that applications
      can continue to depend on fsync() as a mechanism to trigger deep flush
      in the filesystem-DAX case.
      
      Fixes: 06e8ccda ("acpi: nfit: Add support for detect platform CPU cache...")
      Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NDave Jiang <dave.jiang@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      5fdf8e5b
    • D
      vfio: disable filesystem-dax page pinning · 94db151d
      Dan Williams 提交于
      Filesystem-DAX is incompatible with 'longterm' page pinning. Without
      page cache indirection a DAX mapping maps filesystem blocks directly.
      This means that the filesystem must not modify a file's block map while
      any page in a mapping is pinned. In order to prevent the situation of
      userspace holding of filesystem operations indefinitely, disallow
      'longterm' Filesystem-DAX mappings.
      
      RDMA has the same conflict and the plan there is to add a 'with lease'
      mechanism to allow the kernel to notify userspace that the mapping is
      being torn down for block-map maintenance. Perhaps something similar can
      be put in place for vfio.
      
      Note that xfs and ext4 still report:
      
         "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"
      
      ...at mount time, and resolving the dax-dma-vs-truncate problem is one
      of the last hurdles to remove that designation.
      Acked-by: NAlex Williamson <alex.williamson@redhat.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: kvm@vger.kernel.org
      Cc: <stable@vger.kernel.org>
      Reported-by: NHaozhong Zhang <haozhong.zhang@intel.com>
      Tested-by: NHaozhong Zhang <haozhong.zhang@intel.com>
      Fixes: d475c634 ("dax,ext2: replace XIP read and write with DAX I/O")
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      94db151d
  6. 02 3月, 2018 11 次提交
    • J
      i2c: octeon: Prevent error message on bus error · 7c424679
      Jan Glauber 提交于
      The error message:
      
      [Fri Feb 16 13:42:13 2018] i2c-thunderx 0000:01:09.4: unhandled state: 0
      
      is mis-leading as state 0 (bus error) is not an unknown state.
      
      Return -EIO as before but avoid printing the message. Also rename
      STAT_ERROR to STATE_BUS_ERROR.
      Signed-off-by: NJan Glauber <jglauber@cavium.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      7c424679
    • M
      scsi: qedi: Fix kernel crash during port toggle · 967823d6
      Manish Rangankar 提交于
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000100
      
      [  985.596918] IP: _raw_spin_lock_bh+0x17/0x30
      [  985.601581] PGD 0 P4D 0
      [  985.604405] Oops: 0002 [#1] SMP
      :
      [  985.704533] CPU: 16 PID: 1156 Comm: qedi_thread/16 Not tainted 4.16.0-rc2 #1
      [  985.712397] Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 2.4.3 01/17/2017
      [  985.720747] RIP: 0010:_raw_spin_lock_bh+0x17/0x30
      [  985.725996] RSP: 0018:ffffa4b1c43d3e10 EFLAGS: 00010246
      [  985.731823] RAX: 0000000000000000 RBX: ffff94a31bd03000 RCX: 0000000000000000
      [  985.739783] RDX: 0000000000000001 RSI: ffff94a32fa16938 RDI: 0000000000000100
      [  985.747744] RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000a33
      [  985.755703] R10: 0000000000000000 R11: ffffa4b1c43d3af0 R12: 0000000000000000
      [  985.763662] R13: ffff94a301f40818 R14: 0000000000000000 R15: 000000000000000c
      [  985.771622] FS:  0000000000000000(0000) GS:ffff94a32fa00000(0000) knlGS:0000000000000000
      [  985.780649] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  985.787057] CR2: 0000000000000100 CR3: 000000067a009006 CR4: 00000000001606e0
      [  985.795017] Call Trace:
      [  985.797747]  qedi_fp_process_cqes+0x258/0x980 [qedi]
      [  985.803294]  qedi_percpu_io_thread+0x10f/0x1b0 [qedi]
      [  985.808931]  kthread+0xf5/0x130
      [  985.812434]  ? qedi_free_uio+0xd0/0xd0 [qedi]
      [  985.817298]  ? kthread_bind+0x10/0x10
      [  985.821372]  ? do_syscall_64+0x6e/0x1a0
      Signed-off-by: NManish Rangankar <manish.rangankar@cavium.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      967823d6
    • D
      scsi: qla2xxx: Fix FC-NVMe LUN discovery · 2b5b9647
      Darren Trapp 提交于
      commit a4239945 ("scsi: qla2xxx: Add switch command to simplify
      fabric discovery") introduced regression when it did not consider
      FC-NVMe code path which broke NVMe LUN discovery.
      
      Fixes: a4239945 ("scsi: qla2xxx: Add switch command to simplify fabric discovery")
      Signed-off-by: NDarren Trapp <darren.trapp@cavium.com>
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      2b5b9647
    • H
      scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte() · e39a9735
      Hannes Reinecke 提交于
      When converting __scsi_error_from_host_byte() to BLK_STS error codes the
      case DID_OK was forgotten, resulting in it always returning an error.
      
      Fixes: 2a842aca ("block: introduce new block status code type")
      Cc: Doug Gilbert <dgilbert@interlog.com>
      Signed-off-by: NHannes Reinecke <hare@suse.com>
      Reviewed-by: NDouglas Gilbert <dgilbert@interlog.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      e39a9735
    • B
      scsi: core: Avoid that ATA error handling can trigger a kernel hang or oops · 3be8828f
      Bart Van Assche 提交于
      Avoid that the recently introduced call_rcu() call in the SCSI core
      triggers a double call_rcu() call.
      Reported-by: NNatanael Copa <ncopa@alpinelinux.org>
      Reported-by: NDamien Le Moal <damien.lemoal@wdc.com>
      References: https://bugzilla.kernel.org/show_bug.cgi?id=198861
      Fixes: 3bd6f43f ("scsi: core: Ensure that the SCSI error handler gets woken up")
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Reviewed-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Tested-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Cc: Natanael Copa <ncopa@alpinelinux.org>
      Cc: Damien Le Moal <damien.lemoal@wdc.com>
      Cc: Alexandre Oliva <oliva@gnu.org>
      Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      3be8828f
    • H
      scsi: qla2xxx: ensure async flags are reset correctly · fa83e658
      Hannes Reinecke 提交于
      The fcport flags FCF_ASYNC_ACTIVE and FCF_ASYNC_SENT are used to
      throttle the state machine, so we need to ensure to always set and unset
      them correctly. Not doing so will lead to the state machine getting
      confused and no login attempt into remote ports.
      
      Cc: Quinn Tran <quinn.tran@cavium.com>
      Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
      Fixes: 3dbec59b ("scsi: qla2xxx: Prevent multiple active discovery commands per session")
      Signed-off-by: NHannes Reinecke <hare@suse.com>
      Acked-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      fa83e658
    • H
      scsi: qla2xxx: do not check login_state if no loop id is assigned · 07ea4b60
      Hannes Reinecke 提交于
      When no loop id is assigned in qla24xx_fcport_handle_login() the login
      state needs to be ignored; it will get set later on in
      qla_chk_n2n_b4_login().
      
      Cc: Quinn Tran <quinn.tran@cavium.com>
      Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
      Fixes: 040036bb ("scsi: qla2xxx: Delay loop id allocation at login")
      Signed-off-by: NHannes Reinecke <hare@suse.com>
      Acked-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      07ea4b60
    • H
      scsi: qla2xxx: Fixup locking for session deletion · 1c6cacf4
      Hannes Reinecke 提交于
      Commit d8630bb9 ('Serialize session deletion by using work_lock')
      tries to fixup a deadlock when deleting sessions, but fails to take into
      account the locking rules. This patch resolves the situation by
      introducing a separate lock for processing the GNLIST response, and
      ensures that sess_lock is released before calling
      qlt_schedule_sess_delete().
      
      Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
      Cc: Quinn Tran <quinn.tran@cavium.com>
      Fixes: d8630bb9 ("scsi: qla2xxx: Serialize session deletion by using work_lock")
      Signed-off-by: NHannes Reinecke <hare@suse.com>
      Acked-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      1c6cacf4
    • H
      scsi: qla2xxx: Fix NULL pointer crash due to active timer for ABTS · 1514839b
      himanshu.madhani@cavium.com 提交于
      This patch fixes NULL pointer crash due to active timer running for abort
      IOCB.
      
      From crash dump analysis it was discoverd that get_next_timer_interrupt()
      encountered a corrupted entry on the timer list.
      
       #9 [ffff95e1f6f0fd40] page_fault at ffffffff914fe8f8
          [exception RIP: get_next_timer_interrupt+440]
          RIP: ffffffff90ea3088  RSP: ffff95e1f6f0fdf0  RFLAGS: 00010013
          RAX: ffff95e1f6451028  RBX: 000218e2389e5f40  RCX: 00000001232ad600
          RDX: 0000000000000001  RSI: ffff95e1f6f0fdf0  RDI: 0000000001232ad6
          RBP: ffff95e1f6f0fe40   R8: ffff95e1f6451188   R9: 0000000000000001
          R10: 0000000000000016  R11: 0000000000000016  R12: 00000001232ad5f6
          R13: ffff95e1f6450000  R14: ffff95e1f6f0fdf8  R15: ffff95e1f6f0fe10
          ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
      
      Looking at the assembly of get_next_timer_interrupt(), address came
      from %r8 (ffff95e1f6451188) which is pointing to list_head with single
      entry at ffff95e5ff621178.
      
       0xffffffff90ea307a <get_next_timer_interrupt+426>:      mov    (%r8),%rdx
       0xffffffff90ea307d <get_next_timer_interrupt+429>:      cmp    %r8,%rdx
       0xffffffff90ea3080 <get_next_timer_interrupt+432>:      je     0xffffffff90ea30a7 <get_next_timer_interrupt+471>
       0xffffffff90ea3082 <get_next_timer_interrupt+434>:      nopw   0x0(%rax,%rax,1)
       0xffffffff90ea3088 <get_next_timer_interrupt+440>:      testb  $0x1,0x18(%rdx)
      
       crash> rd ffff95e1f6451188 10
       ffff95e1f6451188:  ffff95e5ff621178 ffff95e5ff621178   x.b.....x.b.....
       ffff95e1f6451198:  ffff95e1f6451198 ffff95e1f6451198   ..E.......E.....
       ffff95e1f64511a8:  ffff95e1f64511a8 ffff95e1f64511a8   ..E.......E.....
       ffff95e1f64511b8:  ffff95e77cf509a0 ffff95e77cf509a0   ...|.......|....
       ffff95e1f64511c8:  ffff95e1f64511c8 ffff95e1f64511c8   ..E.......E.....
      
       crash> rd ffff95e5ff621178 10
       ffff95e5ff621178:  0000000000000001 ffff95e15936aa00   ..........6Y....
       ffff95e5ff621188:  0000000000000000 00000000ffffffff   ................
       ffff95e5ff621198:  00000000000000a0 0000000000000010   ................
       ffff95e5ff6211a8:  ffff95e5ff621198 000000000000000c   ..b.............
       ffff95e5ff6211b8:  00000f5800000000 ffff95e751f8d720   ....X... ..Q....
      
       ffff95e5ff621178 belongs to freed mempool object at ffff95e5ff621080.
      
       CACHE            NAME                 OBJSIZE  ALLOCATED     TOTAL  SLABS  SSIZE
       ffff95dc7fd74d00 mnt_cache                384      19785     24948    594    16k
         SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
         ffffdc5dabfd8800  ffff95e5ff620000     1     42         29    13
         FREE / [ALLOCATED]
          ffff95e5ff621080  (cpu 6 cache)
      
      Examining the contents of that memory reveals a pointer to a constant string
      in the driver, "abort\0", which is set by qla24xx_async_abort_cmd().
      
       crash> rd ffffffffc059277c 20
       ffffffffc059277c:  6e490074726f6261 0074707572726574   abort.Interrupt.
       ffffffffc059278c:  00676e696c6c6f50 6920726576697244   Polling.Driver i
       ffffffffc059279c:  646f6d207325206e 6974736554000a65   n %s mode..Testi
       ffffffffc05927ac:  636976656420676e 786c252074612065   ng device at %lx
       ffffffffc05927bc:  6b63656843000a2e 646f727020676e69   ...Checking prod
       ffffffffc05927cc:  6f20444920746375 0a2e706968632066   uct ID of chip..
       ffffffffc05927dc:  5120646e756f4600 204130303232414c   .Found QLA2200A
       ffffffffc05927ec:  43000a2e70696843 20676e696b636568   Chip...Checking
       ffffffffc05927fc:  65786f626c69616d 6c636e69000a2e73   mailboxes...incl
       ffffffffc059280c:  756e696c2f656475 616d2d616d642f78   ude/linux/dma-ma
      
       crash> struct -ox srb_iocb
       struct srb_iocb {
                 union {
                     struct {...} logio;
                     struct {...} els_logo;
                     struct {...} tmf;
                     struct {...} fxiocb;
                     struct {...} abt;
                     struct ct_arg ctarg;
                     struct {...} mbx;
                     struct {...} nack;
          [0x0 ] } u;
          [0xb8] struct timer_list timer;
          [0x108] void (*timeout)(void *);
       }
       SIZE: 0x110
      
       crash> ! bc
       ibase=16
       obase=10
       B8+40
       F8
      
      The object is a srb_t, and at offset 0xf8 within that structure
      (i.e. ffff95e5ff621080 + f8 -> ffff95e5ff621178) is a struct timer_list.
      
      Cc: <stable@vger.kernel.org> #4.4+
      Fixes: 4440e46d ("[SCSI] qla2xxx: Add IOCB Abort command asynchronous handling.")
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      1514839b
    • J
      platform/x86: wmi: Fix misuse of vsprintf extension %pULL · 1cedc638
      Joe Perches 提交于
      %pULL doesn't officially exist but %pUL does.
      
      Miscellanea:
      
      o Add missing newlines to a couple logging messages
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      1cedc638
    • T
      virtio_ring: fix num_free handling in error case · e82df670
      Tiwei Bie 提交于
      The vq->vq.num_free hasn't been changed when error happens,
      so it shouldn't be changed when handling the error.
      
      Fixes: 780bc790 ("virtio_ring: Support DMA APIs")
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NTiwei Bie <tiwei.bie@intel.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      e82df670
  7. 01 3月, 2018 12 次提交