1. 07 Jan, 2020 1 commit
    • Shiraz Saleem's avatar
      i40iw: Remove setting of VMA private data and use rdma_user_mmap_io · 9554de39
      Shiraz Saleem authored
      vm_ops is now initialized in ib_uverbs_mmap() with the recent rdma mmap
      API changes. Earlier it was done in rdma_umap_priv_init() which would not
      be called unless a driver called rdma_user_mmap_io() in its mmap.
      
      i40iw does not use the rdma_user_mmap_io API but sets the vma's
      vm_private_data to a driver object. This now conflicts with the vm_op
      rdma_umap_close as priv pointer points to the i40iw driver object instead
      of the private data setup by core when rdma_user_mmap_io is called.  This
      leads to a crash in rdma_umap_close with a mmap put being called when it
      should not have.
      
      Remove the redundant setting of the vma private_data in i40iw as it is not
      used. Also move i40iw over to use the rdma_user_mmap_io API. This gives
      the extra protection of having the mappings zapped when the context is
      detsroyed.
      
        BUG: unable to handle page fault for address: 0000000100000001
        #PF: supervisor write access in kernel mode
        #PF: error_code(0x0002) - not-present page
        PGD 0 P4D 0
        Oops: 0002 [#1] SMP PTI
        CPU: 6 PID: 9528 Comm: rping Kdump: loaded Not tainted 5.5.0-rc4+ #117
        Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./Q87M-D2H, BIOS F7 01/17/2014
        RIP: 0010:rdma_user_mmap_entry_put+0xa/0x30 [ib_core]
        RSP: 0018:ffffb340c04c7c38 EFLAGS: 00010202
        RAX: 00000000ffffffff RBX: ffff9308e7be2a00 RCX: 000000000000cec0
        RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000100000001
        RBP: ffff9308dc7641f0 R08: 0000000000000001 R09: 0000000000000000
        R10: 0000000000000001 R11: ffffffff8d4414d8 R12: ffff93075182c780
        R13: 0000000000000001 R14: ffff93075182d2a8 R15: ffff9308e2ddc840
        FS:  0000000000000000(0000) GS:ffff9308fdc00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000100000001 CR3: 00000002e0412004 CR4: 00000000001606e0
        Call Trace:
         rdma_umap_close+0x40/0x90 [ib_uverbs]
         remove_vma+0x43/0x80
         exit_mmap+0xfd/0x1b0
         mmput+0x6e/0x130
         do_exit+0x290/0xcc0
         ? get_signal+0x152/0xc40
         do_group_exit+0x46/0xc0
         get_signal+0x1bd/0xc40
         ? prepare_to_wait_event+0x97/0x190
         do_signal+0x36/0x630
         ? remove_wait_queue+0x60/0x60
         ? __audit_syscall_exit+0x1d9/0x290
         ? rcu_read_lock_sched_held+0x52/0x90
         ? kfree+0x21c/0x2e0
         exit_to_usermode_loop+0x4f/0xc3
         do_syscall_64+0x1ed/0x270
         entry_SYSCALL_64_after_hwframe+0x49/0xbe
        RIP: 0033:0x7fae715a81fd
        Code: Bad RIP value.
        RSP: 002b:00007fae6e163cb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
        RAX: fffffffffffffe00 RBX: 00007fae6e163d30 RCX: 00007fae715a81fd
        RDX: 0000000000000010 RSI: 00007fae6e163cf0 RDI: 0000000000000003
        RBP: 00000000013413a0 R08: 00007fae68000000 R09: 0000000000000017
        R10: 0000000000000001 R11: 0000000000000293 R12: 00007fae680008c0
        R13: 00007fae6e163cf0 R14: 00007fae717c9804 R15: 00007fae6e163ed0
        CR2: 0000000100000001
        ---[ end trace b33d58d3a06782cb ]---
        RIP: 0010:rdma_user_mmap_entry_put+0xa/0x30 [ib_core]
      
      Fixes: b86deba9 ("RDMA/core: Move core content from ib_uverbs to ib_core")
      Link: https://lore.kernel.org/r/20200107162223.1745-1-shiraz.saleem@intel.comSigned-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      9554de39
  2. 03 Jan, 2020 4 commits
    • Kaike Wan's avatar
      IB/hfi1: Adjust flow PSN with the correct resync_psn · b2ff0d51
      Kaike Wan authored
      When a TID RDMA ACK to RESYNC request is received, the flow PSNs for
      pending TID RDMA WRITE segments will be adjusted with the next flow
      generation number, based on the resync_psn value extracted from the flow
      PSN of the TID RDMA ACK packet. The resync_psn value indicates the last
      flow PSN for which a TID RDMA WRITE DATA packet has been received by the
      responder and the requester should resend TID RDMA WRITE DATA packets,
      starting from the next flow PSN.
      
      However, if resync_psn points to the last flow PSN for a segment and the
      next segment flow PSN starts with a new generation number, use of the old
      resync_psn to adjust the flow PSN for the next segment will lead to
      miscalculation, resulting in WARN_ON and sge rewinding errors:
      
        WARNING: CPU: 4 PID: 146961 at /nfs/site/home/phcvs2/gitrepo/ifs-all/components/Drivers/tmp/rpmbuild/BUILD/ifs-kernel-updates-3.10.0_957.el7.x86_64/hfi1/tid_rdma.c:4764 hfi1_rc_rcv_tid_rdma_ack+0x8f6/0xa90 [hfi1]
        Modules linked in: ib_ipoib(OE) hfi1(OE) rdmavt(OE) rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfsv3 nfs_acl nfs lockd grace fscache iTCO_wdt iTCO_vendor_support skx_edac intel_powerclamp coretemp intel_rapl iosf_mbi kvm irqbypass crc32_pclmul ghash_clmulni_intel ib_isert iscsi_target_mod target_core_mod aesni_intel lrw gf128mul glue_helper ablk_helper cryptd rpcrdma sunrpc opa_vnic ast ttm ib_iser libiscsi drm_kms_helper scsi_transport_iscsi ipmi_ssif syscopyarea sysfillrect sysimgblt fb_sys_fops drm joydev ipmi_si pcspkr sg drm_panel_orientation_quirks ipmi_devintf lpc_ich i2c_i801 ipmi_msghandler wmi rdma_ucm ib_ucm ib_uverbs acpi_cpufreq acpi_power_meter ib_umad rdma_cm ib_cm iw_cm ip_tables ext4 mbcache jbd2 sd_mod crc_t10dif crct10dif_generic crct10dif_pclmul i2c_algo_bit crct10dif_common
         crc32c_intel e1000e ib_core ahci libahci ptp libata pps_core nfit libnvdimm [last unloaded: rdmavt]
        CPU: 4 PID: 146961 Comm: kworker/4:0H Kdump: loaded Tainted: G        W  OE  ------------   3.10.0-957.el7.x86_64 #1
        Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.0X.02.0117.040420182310 04/04/2018
        Workqueue: hfi0_0 _hfi1_do_tid_send [hfi1]
        Call Trace:
         <IRQ>  [<ffffffff9e361dc1>] dump_stack+0x19/0x1b
         [<ffffffff9dc97648>] __warn+0xd8/0x100
         [<ffffffff9dc9778d>] warn_slowpath_null+0x1d/0x20
         [<ffffffffc05d28c6>] hfi1_rc_rcv_tid_rdma_ack+0x8f6/0xa90 [hfi1]
         [<ffffffffc05c21cc>] hfi1_kdeth_eager_rcv+0x1dc/0x210 [hfi1]
         [<ffffffffc05c23ef>] ? hfi1_kdeth_expected_rcv+0x1ef/0x210 [hfi1]
         [<ffffffffc0574f15>] kdeth_process_eager+0x35/0x90 [hfi1]
         [<ffffffffc0575b5a>] handle_receive_interrupt_nodma_rtail+0x17a/0x2b0 [hfi1]
         [<ffffffffc056a623>] receive_context_interrupt+0x23/0x40 [hfi1]
         [<ffffffff9dd4a294>] __handle_irq_event_percpu+0x44/0x1c0
         [<ffffffff9dd4a442>] handle_irq_event_percpu+0x32/0x80
         [<ffffffff9dd4a4cc>] handle_irq_event+0x3c/0x60
         [<ffffffff9dd4d27f>] handle_edge_irq+0x7f/0x150
         [<ffffffff9dc2e554>] handle_irq+0xe4/0x1a0
         [<ffffffff9e3795dd>] do_IRQ+0x4d/0xf0
         [<ffffffff9e36b362>] common_interrupt+0x162/0x162
         <EOI>  [<ffffffff9dfa0f79>] ? swiotlb_map_page+0x49/0x150
         [<ffffffffc05c2ed1>] hfi1_verbs_send_dma+0x291/0xb70 [hfi1]
         [<ffffffffc05c2c40>] ? hfi1_wait_kmem+0xf0/0xf0 [hfi1]
         [<ffffffffc05c3f26>] hfi1_verbs_send+0x126/0x2b0 [hfi1]
         [<ffffffffc05ce683>] _hfi1_do_tid_send+0x1d3/0x320 [hfi1]
         [<ffffffff9dcb9d4f>] process_one_work+0x17f/0x440
         [<ffffffff9dcbade6>] worker_thread+0x126/0x3c0
         [<ffffffff9dcbacc0>] ? manage_workers.isra.25+0x2a0/0x2a0
         [<ffffffff9dcc1c31>] kthread+0xd1/0xe0
         [<ffffffff9dcc1b60>] ? insert_kthread_work+0x40/0x40
         [<ffffffff9e374c1d>] ret_from_fork_nospec_begin+0x7/0x21
         [<ffffffff9dcc1b60>] ? insert_kthread_work+0x40/0x40
      
      This patch fixes the issue by adjusting the resync_psn first if the flow
      generation has been advanced for a pending segment.
      
      Fixes: 9e93e967 ("IB/hfi1: Add a function to receive TID RDMA ACK packet")
      Link: https://lore.kernel.org/r/20191219231920.51069.37147.stgit@awfm-01.aw.intel.com
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarKaike Wan <kaike.wan@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      b2ff0d51
    • Kaike Wan's avatar
      IB/hfi1: Don't cancel unused work item · ca9033ba
      Kaike Wan authored
      In the iowait structure, two iowait_work entries were included to queue a
      given object: one for normal IB operations, and the other for TID RDMA
      operations. For non-TID RDMA operations, the iowait_work structure for TID
      RDMA is initialized to contain a NULL function (not used). When the QP is
      reset, the function iowait_cancel_work will be called to cancel any
      pending work. The problem is that this function will call
      cancel_work_sync() for both iowait_work entries, even though the one for
      TID RDMA is not used at all. Eventually, the call cascades to
      __flush_work(), wherein a WARN_ON will be triggered due to the fact that
      work->func is NULL.
      
      The WARN_ON was introduced in commit 4d43d395 ("workqueue: Try to
      catch flush_work() without INIT_WORK().")
      
      This patch fixes the issue by making sure that a work function is present
      for TID RDMA before calling cancel_work_sync in iowait_cancel_work.
      
      Fixes: 4d43d395 ("workqueue: Try to catch flush_work() without INIT_WORK().")
      Fixes: 5da0fc9d ("IB/hfi1: Prepare resource waits for dual leg")
      Link: https://lore.kernel.org/r/20191219211941.58387.39883.stgit@awfm-01.aw.intel.comReviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarKaike Wan <kaike.wan@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      ca9033ba
    • Selvin Xavier's avatar
      RDMA/bnxt_re: Fix Send Work Entry state check while polling completions · c5275723
      Selvin Xavier authored
      Some adapters need a fence Work Entry to handle retransmission.  Currently
      the driver checks for this condition, only if the Send queue entry is
      signalled. Implement the condition check, irrespective of the signalled
      state of the Work queue entries
      
      Failure to add the fence can result in access to memory that is already
      marked as completed, triggering data corruption, transmission failure,
      IOMMU failures, etc.
      
      Fixes: 9152e0b7 ("RDMA/bnxt_re: HW workarounds for handling specific conditions")
      Link: https://lore.kernel.org/r/1574671174-5064-3-git-send-email-selvin.xavier@broadcom.comSigned-off-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      c5275723
    • Selvin Xavier's avatar
      RDMA/bnxt_re: Avoid freeing MR resources if dereg fails · 9a4467a6
      Selvin Xavier authored
      The driver returns an error code for MR dereg, but frees the MR structure.
      When the MR dereg is retried due to previous error, the system crashes as
      the structure is already freed.
      
        BUG: unable to handle kernel NULL pointer dereference at 00000000000001b8
        PGD 0 P4D 0
        Oops: 0000 [#1] SMP PTI
        CPU: 7 PID: 12178 Comm: ib_send_bw Kdump: loaded Not tainted 4.18.0-124.el8.x86_64 #1
        Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.1.10 03/10/2015
        RIP: 0010:__dev_printk+0x2a/0x70
        Code: 0f 1f 44 00 00 49 89 d1 48 85 f6 0f 84 f6 2b 00 00 4c 8b 46 70 4d 85 c0 75 04 4c 8b
      46 10 48 8b 86 a8 00 00 00 48 85 c0 74 16 <48> 8b 08 0f be 7f 01 48 c7 c2 13 ac ac 83 83 ef 30 e9 10 fe ff ff
        RSP: 0018:ffffaf7c04607a60 EFLAGS: 00010006
        RAX: 00000000000001b8 RBX: ffffa0010c91c488 RCX: 0000000000000246
        RDX: ffffaf7c04607a68 RSI: ffffa0010c91caa8 RDI: ffffffff83a788eb
        RBP: ffffaf7c04607ac8 R08: 0000000000000000 R09: ffffaf7c04607a68
        R10: 0000000000000000 R11: 0000000000000001 R12: ffffaf7c04607b90
        R13: 000000000000000e R14: 0000000000000000 R15: 00000000ffffa001
        FS:  0000146fa1f1cdc0(0000) GS:ffffa0012fac0000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 00000000000001b8 CR3: 000000007680a003 CR4: 00000000001606e0
        Call Trace:
         dev_err+0x6c/0x90
         ? dev_printk_emit+0x4e/0x70
         bnxt_qplib_rcfw_send_message+0x594/0x660 [bnxt_re]
         ? dev_err+0x6c/0x90
         bnxt_qplib_free_mrw+0x80/0xe0 [bnxt_re]
         bnxt_re_dereg_mr+0x2e/0xd0 [bnxt_re]
         ib_dereg_mr+0x2f/0x50 [ib_core]
         destroy_hw_idr_uobject+0x20/0x70 [ib_uverbs]
         uverbs_destroy_uobject+0x2e/0x170 [ib_uverbs]
         __uverbs_cleanup_ufile+0x6e/0x90 [ib_uverbs]
         uverbs_destroy_ufile_hw+0x61/0x130 [ib_uverbs]
         ib_uverbs_close+0x1f/0x80 [ib_uverbs]
         __fput+0xb7/0x230
         task_work_run+0x8a/0xb0
         do_exit+0x2da/0xb40
      ...
        RIP: 0033:0x146fa113a387
        Code: Bad RIP value.
        RSP: 002b:00007fff945d1478 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff02
        RAX: 0000000000000000 RBX: 000055a248908d70 RCX: 0000000000000000
        RDX: 0000146fa1f2b000 RSI: 0000000000000001 RDI: 000055a248906488
        RBP: 000055a248909630 R08: 0000000000010000 R09: 0000000000000000
        R10: 0000000000000000 R11: 0000000000000000 R12: 000055a248906488
        R13: 0000000000000001 R14: 0000000000000000 R15: 000055a2489095f0
      
      Do not free the MR structures, when driver returns error to the stack.
      
      Fixes: 872f3578 ("RDMA/bnxt_re: Add support for MRs with Huge pages")
      Link: https://lore.kernel.org/r/1574671174-5064-2-git-send-email-selvin.xavier@broadcom.comSigned-off-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      9a4467a6
  3. 29 Dec, 2019 5 commits
  4. 28 Dec, 2019 4 commits
  5. 27 Dec, 2019 8 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm · 48a8dd17
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Post-xmas food coma recovery fixes. Only three fixes for i915 since I
        expect most people are holidaying.
      
        i915:
         - power management rc6 fix
         - framebuffer tracking fix
         - display power management ratelimit fix"
      
      * tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm:
        drm/i915: Hold reference to intel_frontbuffer as we track activity
        drm/i915/gt: Ratelimit display power w/a
        drm/i915/pmu: Ensure monotonic rc6
      48a8dd17
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-5.5-rc4' of... · f4b39746
      Linus Torvalds authored
      Merge tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
      
       - rseq build failures fixes related to glibc 2.30 compatibility from
         Mathieu Desnoyers
      
       - Kunit fixes and cleanups from SeongJae Park
      
       - Fixes to filesystems/epoll, firmware, and livepatch build failures
         and skip handling.
      
      * tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        rseq/selftests: Clarify rseq_prepare_unload() helper requirements
        rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30
        rseq/selftests: Turn off timeout setting
        kunit/kunit_tool_test: Test '--build_dir' option run
        kunit: Rename 'kunitconfig' to '.kunitconfig'
        kunit: Place 'test.log' under the 'build_dir'
        kunit: Create default config in '--build_dir'
        kunit: Remove duplicated defconfig creation
        docs/kunit/start: Use in-tree 'kunit_defconfig'
        selftests: livepatch: Fix it to do root uid check and skip
        selftests: firmware: Fix it to do root uid check and skip
        selftests: filesystems/epoll: fix build error
      f4b39746
    • Linus Torvalds's avatar
      Merge tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1413c361
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Fix compile test of the Tegra devfreq driver (Arnd Bergmann) and
        remove redundant Kconfig dependencies from multiple devfreq drivers
        (Leonard Crestez)"
      
      * tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / devfreq: tegra: Add COMMON_CLK dependency
        PM / devfreq: Drop explicit selection of PM_OPP
      1413c361
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block · 534121d2
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Removal of now unused busy wqe list (Hillf)
      
       - Add cond_resched() to io-wq work processing (Hillf)
      
       - And then the series that I hinted at from last week, which removes
         the sqe from the io_kiocb and keeps all sqe handling on the prep
         side. This guarantees that an opcode can't do the wrong thing and
         read the sqe more than once. This is unchanged from last week, no
         issues have been observed with this in testing. Hence I really think
         we should fold this into 5.5.
      
      * tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block:
        io-wq: add cond_resched() to worker thread
        io-wq: remove unused busy list from io_sqe
        io_uring: pass in 'sqe' to the prep handlers
        io_uring: standardize the prep methods
        io_uring: read 'count' for IORING_OP_TIMEOUT in prep handler
        io_uring: move all prep state for IORING_OP_{SEND,RECV}_MGS to prep handler
        io_uring: move all prep state for IORING_OP_CONNECT to prep handler
        io_uring: add and use struct io_rw for read/writes
        io_uring: use u64_to_user_ptr() consistently
      534121d2
    • Linus Torvalds's avatar
      Merge tag 'libata-5.5-20191226' of git://git.kernel.dk/linux-block · 0f710a55
      Linus Torvalds authored
      Pull libata fixes from Jens Axboe:
       "Two things in here:
      
         - First half of a series that fixes ahci_brcm, also marked for
           stable. The other part of the series is going into 5.6 (Florian)
      
         - sata_nv regression fix that is also marked for stable (Sascha)"
      
      * tag 'libata-5.5-20191226' of git://git.kernel.dk/linux-block:
        ata: ahci_brcm: Add missing clock management during recovery
        ata: ahci_brcm: BCM7425 AHCI requires AHCI_HFLAG_DELAY_ENGINE
        ata: ahci_brcm: Fix AHCI resources management
        ata: libahci_platform: Export again ahci_platform_<en/dis>able_phys()
        libata: Fix retrieving of active qcs
      0f710a55
    • Linus Torvalds's avatar
      Merge tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block · 8ae40a69
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Only thing here are the changes from Arnd from last week, which now
        have the appropriate header include to ensure they actually compile if
        COMPAT is enabled"
      
      * tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block:
        compat_ioctl: block: handle Persistent Reservations
        compat_ioctl: block: handle add zone open, close and finish ioctl
        compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES
        compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE
        pktcdvd: fix regression on 64-bit architectures
      8ae40a69
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · a305bd7c
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "A set of fixes for the v5.5 series:
      
         - Fix the build for the Xtensa driver.
      
         - Make sure to set up the parent device for mpc8xxx.
      
         - Clarify the look-up error message.
      
         - Fix the usage of the line direction in the mockup device.
      
         - Fix a type warning on the Aspeed driver.
      
         - Remove the pointless __exit annotation on the xgs-iproc which is
           causing a compilation problem.
      
         - Fix up emultation of open drain outputs .get_direction()
      
         - Fix the IRQ callbacks on the PCA953xx to use bitops and work
           properly.
      
         - Fix the Kconfig on the Tegra driver"
      
      * tag 'gpio-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: tegra186: Allow building on Tegra194-only configurations
        gpio: pca953x: Switch to bitops in IRQ callbacks
        gpiolib: fix up emulated open drain outputs
        MAINTAINERS: Append missed file to the database
        gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
        gpio: aspeed: avoid return type warning
        gpio: mockup: Fix usage of new GPIO_LINE_DIRECTION
        gpio: Fix error message on out-of-range GPIO in lookup table
        gpio: mpc8xxx: Add platform device to gpiochip->parent
        gpio: xtensa: fix driver build
      a305bd7c
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2019-12-23' of... · e31d941c
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2019-12-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      i915 power and frontbuffer tracking fixes
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87r20vdlrs.fsf@intel.com
      e31d941c
  6. 26 Dec, 2019 5 commits
    • Florian Fainelli's avatar
      ata: ahci_brcm: Add missing clock management during recovery · bf0e5013
      Florian Fainelli authored
      The downstream implementation of ahci_brcm.c did contain clock
      management recovery, but until recently, did that outside of the
      libahci_platform helpers and this was unintentionally stripped out while
      forward porting the patch upstream.
      
      Add the missing clock management during recovery and sleep for 10
      milliseconds per the design team recommendations to ensure the SATA PHY
      controller and AFE have been fully quiesced.
      
      Fixes: eb73390a ("ata: ahci_brcm: Recover from failures to identify devices")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      bf0e5013
    • Florian Fainelli's avatar
      ata: ahci_brcm: BCM7425 AHCI requires AHCI_HFLAG_DELAY_ENGINE · 1a3d78cb
      Florian Fainelli authored
      Set AHCI_HFLAG_DELAY_ENGINE for the BCM7425 AHCI controller thus making
      it conforming to the 'strict' AHCI implementation which this controller
      is based on.
      
      This solves long link establishment with specific hard drives (e.g.:
      Seagate ST1000VM002-9ZL1 SC12) that would otherwise have to complete the
      error recovery handling before finally establishing a succesful SATA
      link at the desired speed.
      
      We re-order the hpriv->flags assignment to also remove the NONCQ quirk
      since we can set the flag directly.
      
      Fixes: 9586114cf1e9 ("ata: ahci_brcmstb: add support MIPS-based platforms")
      Fixes: 423be77daabe ("ata: ahci_brcmstb: add quirk for broken ncq")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      1a3d78cb
    • Florian Fainelli's avatar
      ata: ahci_brcm: Fix AHCI resources management · c0cdf2ac
      Florian Fainelli authored
      The AHCI resources management within ahci_brcm.c is a little
      convoluted, largely because it historically had a dedicated clock that
      was managed within this file in the downstream tree. Once brough
      upstream though, the clock was left to be managed by libahci_platform.c
      which is entirely appropriate.
      
      This patch series ensures that the AHCI resources are fetched and
      enabled before any register access is done, thus avoiding bus errors on
      platforms which clock gate the controller by default.
      
      As a result we need to re-arrange the suspend() and resume() functions
      in order to avoid accessing registers after the clocks have been turned
      off respectively before the clocks have been turned on. Finally, we can
      refactor brcm_ahci_get_portmask() in order to fetch the number of ports
      from hpriv->mmio which is now accessible without jumping through hoops
      like we used to do.
      
      The commit pointed in the Fixes tag is both old and new enough not to
      require major headaches for backporting of this patch.
      
      Fixes: eba68f82 ("ata: ahci_brcmstb: rename to support across Broadcom SoC's")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      c0cdf2ac
    • Florian Fainelli's avatar
      ata: libahci_platform: Export again ahci_platform_<en/dis>able_phys() · 84b032db
      Florian Fainelli authored
      This reverts commit 6bb86fef
      ("libahci_platform: Staticize ahci_platform_<en/dis>able_phys()") we are
      going to need ahci_platform_{enable,disable}_phys() in a subsequent
      commit for ahci_brcm.c in order to properly control the PHY
      initialization order.
      
      Also make sure the function prototypes are declared in
      include/linux/ahci_platform.h as a result.
      
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      84b032db
    • Sascha Hauer's avatar
      libata: Fix retrieving of active qcs · 8385d756
      Sascha Hauer authored
      ata_qc_complete_multiple() is called with a mask of the still active
      tags.
      
      mv_sata doesn't have this information directly and instead calculates
      the still active tags from the started tags (ap->qc_active) and the
      finished tags as (ap->qc_active ^ done_mask)
      
      Since 28361c40 the hw_tag and tag are no longer the same and the
      equation is no longer valid. In ata_exec_internal_sg() ap->qc_active is
      initialized as 1ULL << ATA_TAG_INTERNAL, but in hardware tag 0 is
      started and this will be in done_mask on completion. ap->qc_active ^
      done_mask becomes 0x100000000 ^ 0x1 = 0x100000001 and thus tag 0 used as
      the internal tag will never be reported as completed.
      
      This is fixed by introducing ata_qc_get_active() which returns the
      active hardware tags and calling it where appropriate.
      
      This is tested on mv_sata, but sata_fsl and sata_nv suffer from the same
      problem. There is another case in sata_nv that most likely needs fixing
      as well, but this looks a little different, so I wasn't confident enough
      to change that.
      
      Fixes: 28361c40 ("libata: add extra internal command")
      Cc: stable@vger.kernel.org
      Tested-by: default avatarPali Rohár <pali.rohar@gmail.com>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      
      Add missing export of ata_qc_get_active(), as per Pali.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8385d756
  7. 25 Dec, 2019 1 commit
  8. 24 Dec, 2019 1 commit
  9. 23 Dec, 2019 11 commits