1. 03 Jul, 2019 15 commits
  2. 01 Jul, 2019 3 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'phy-for-5.3' of... · aa9083fa
      Greg Kroah-Hartman authored
      Merge tag 'phy-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
      
      phy: for 5.3
      
        *) Add a new PHY driver for Qualcomm PCIe2 PHY
        *) Add a new PHY driver for Mixel DPHY present in i.MX8
        *) Fix Qualcomm QMP UFS PHY driver from incorrectly reporting that
           PHY enable failed
        *) Fix _BUG_ on Amlogic G12A USB3 + PCIE Combo PHY Driver due to
           calling a sleeping function from invalid context
        *) Fix WARN_ON dump on rcar-gen3-usb2 PHY driver caused due to
           imbalance powered flag
        *) Fix .cocci and sparse warnings
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      
      * tag 'phy-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy:
        phy: qcom-qmp: Raise qcom_qmp_phy_enable() polling delay
        phy: meson-g12a-usb3-pcie: disable locking for cr_regmap
        phy: Add driver for mixel mipi dphy found on NXP's i.MX8 SoCs
        dt-bindings: phy: Add documentation for mixel dphy
        dt-bindings: phy-pxa-usb: add bindings
        phy: renesas: rcar-gen3-usb2: fix imbalance powered flag
        phy: qcom-qmp: Drop useless msm8998_pciephy_cfg setting
        phy: qcom-qmp: Correct READY_STATUS poll break condition
        phy: ti: am654-serdes: Make serdes_am654_xlate() static
        phy: usb: phy-brcm-usb: Fix platform_no_drv_owner.cocci warnings
        phy: samsung: Use struct_size() in devm_kzalloc()
        phy: qcom: Add Qualcomm PCIe2 PHY driver
        dt-bindings: phy: Add binding for Qualcomm PCIe2 PHY
      aa9083fa
    • Greg Kroah-Hartman's avatar
      Merge tag 'phy-for-5.2-rc_v2' of... · 90fca074
      Greg Kroah-Hartman authored
      Merge tag 'phy-for-5.2-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
      
      Kishon writes:
      
      phy: for 5.2-rc
      
        *) Move Tegra124 PLL power supplies to be enabled by xusb-tegra124
        *) Move Tegra210 PLL power supplies to be enabled by xusb-tegra210
        *) Minor fixes: fix memory leaks at error path and addresses coverity.
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      
      * tag 'phy-for-5.2-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy:
        phy: tegra: xusb: Add Tegra210 PLL power supplies
        phy: tegra: xusb: Add Tegra124 PLL power supplies
        dt-bindings: phy: tegra-xusb: List PLL power supplies
        phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal
        phy: renesas: rcar-gen2: Fix memory leak at error paths
        phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable
      90fca074
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · f254e65a
      Greg Kroah-Hartman authored
      Felipe writes:
      
      usb: changes for v5.3 merge window
      
      The biggest part here is a set of patches removing unnecesary variables
      from several drivers.
      
      Meson-g12a's dwc3 glue implemented IRQ-based OTG/DRD role swap.
      
      Qcom's dwc3 glue added support for ACPI, mainly for the AArch64-based
      SoCs.
      
      DWC3 also got support for Intel Elkhart Lake platforms.
      
      * tag 'usb-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (30 commits)
        usb: dwc3: remove unused @lock member of dwc3_ep struct
        usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices
        usb: Replace snprintf with scnprintf in gether_get_ifname
        usb: gadget: ether: Fix race between gether_disconnect and rx_submit
        usb: gadget: storage: Remove warning message
        usb: dwc3: gadget: Add support for disabling U1 and U2 entries
        usb: gadget: send usb_gadget as an argument in get_config_params
        doc: dt: bindings: usb: dwc3: Update entries for disabling U1 and U2
        usb: dwc3: qcom: Use of_clk_get_parent_count()
        usb: dwc3: Fix core validation in probe, move after clocks are enabled
        usb: dwc3: qcom: Improve error handling
        usb: dwc3: qcom: Start USB in 'host mode' on the SDM845
        usb: dwc3: qcom: Add support for booting with ACPI
        soc: qcom: geni: Add support for ACPI
        Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"
        usb: gadget: net2272: remove redundant assignments to pointer 's'
        usb: gadget: Zero ffs_io_data
        USB: omap_udc: Remove unneeded variable
        fotg210-udc: Remove unneeded variable
        usb: gadget: at91_udc: Remove unneeded variable
        ...
      f254e65a
  3. 28 Jun, 2019 1 commit
  4. 26 Jun, 2019 15 commits
  5. 25 Jun, 2019 2 commits
    • Marc Gonzalez's avatar
      phy: qcom-qmp: Raise qcom_qmp_phy_enable() polling delay · 52060264
      Marc Gonzalez authored
      readl_poll_timeout() calls usleep_range() to sleep between reads.
      usleep_range() doesn't work efficiently for tiny values.
      
      Raise the polling delay in qcom_qmp_phy_enable() to bring it in line
      with the delay in qcom_qmp_phy_com_init().
      Signed-off-by: default avatarMarc Gonzalez <marc.w.gonzalez@free.fr>
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      52060264
    • Neil Armstrong's avatar
      phy: meson-g12a-usb3-pcie: disable locking for cr_regmap · 5fc2aa3e
      Neil Armstrong authored
      Locking is not needed for the phy_g12a_usb3_pcie_cr_bus_read/write() and
      currently it causes the following BUG because of the usage of the
      regmap_read_poll_timeout() running in spinlock_irq, configured by regmap fast_io.
      
      Simply disable locking in the cr_regmap config since it's only used from the
      PHY init callback function.
      
      BUG: sleeping function called from invalid context at drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c:85
      in_atomic(): 1, irqs_disabled(): 128, pid: 60, name: kworker/3:1
      [snip]
      Workqueue: events deferred_probe_work_func
      Call trace:
       dump_backtrace+0x0/0x190
       show_stack+0x14/0x20
       dump_stack+0x90/0xb4
       ___might_sleep+0xec/0x110
       __might_sleep+0x50/0x88
       phy_g12a_usb3_pcie_cr_bus_addr.isra.0+0x80/0x1a8
       phy_g12a_usb3_pcie_cr_bus_read+0x34/0x1d8
       _regmap_read+0x60/0xe0
       _regmap_update_bits+0xc4/0x110
       regmap_update_bits_base+0x60/0x90
       phy_g12a_usb3_pcie_init+0xdc/0x210
       phy_init+0x74/0xd0
       dwc3_meson_g12a_probe+0x2cc/0x4d0
       platform_drv_probe+0x50/0xa0
       really_probe+0x20c/0x3b8
       driver_probe_device+0x68/0x150
       __device_attach_driver+0xa8/0x170
       bus_for_each_drv+0x64/0xc8
       __device_attach+0xd8/0x158
       device_initial_probe+0x10/0x18
       bus_probe_device+0x90/0x98
       deferred_probe_work_func+0x94/0xe8
       process_one_work+0x1e0/0x338
       worker_thread+0x230/0x458
       kthread+0x134/0x138
       ret_from_fork+0x10/0x1c
      
      Fixes: 36077e16 ("phy: amlogic: Add Amlogic G12A USB3 + PCIE Combo PHY Driver")
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Tested-by: default avatarKevin Hilman <khilman@baylibre.com>
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      5fc2aa3e
  6. 23 Jun, 2019 1 commit
  7. 22 Jun, 2019 3 commits
    • Linus Torvalds's avatar
      Linux 5.2-rc6 · 4b972a01
      Linus Torvalds authored
      4b972a01
    • Linus Torvalds's avatar
      Merge tag 'iommu-fix-v5.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 6698a71a
      Linus Torvalds authored
      Pull iommu fix from Joerg Roedel:
       "Revert a commit from the previous pile of fixes which causes new
        lockdep splats. It is better to revert it for now and work on a better
        and more well tested fix"
      
      * tag 'iommu-fix-v5.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        Revert "iommu/vt-d: Fix lock inversion between iommu->lock and device_domain_lock"
      6698a71a
    • Peter Xu's avatar
      Revert "iommu/vt-d: Fix lock inversion between iommu->lock and device_domain_lock" · 0aafc8ae
      Peter Xu authored
      This reverts commit 7560cc3c.
      
      With 5.2.0-rc5 I can easily trigger this with lockdep and iommu=pt:
      
          ======================================================
          WARNING: possible circular locking dependency detected
          5.2.0-rc5 #78 Not tainted
          ------------------------------------------------------
          swapper/0/1 is trying to acquire lock:
          00000000ea2b3beb (&(&iommu->lock)->rlock){+.+.}, at: domain_context_mapping_one+0xa5/0x4e0
          but task is already holding lock:
          00000000a681907b (device_domain_lock){....}, at: domain_context_mapping_one+0x8d/0x4e0
          which lock already depends on the new lock.
          the existing dependency chain (in reverse order) is:
          -> #1 (device_domain_lock){....}:
                 _raw_spin_lock_irqsave+0x3c/0x50
                 dmar_insert_one_dev_info+0xbb/0x510
                 domain_add_dev_info+0x50/0x90
                 dev_prepare_static_identity_mapping+0x30/0x68
                 intel_iommu_init+0xddd/0x1422
                 pci_iommu_init+0x16/0x3f
                 do_one_initcall+0x5d/0x2b4
                 kernel_init_freeable+0x218/0x2c1
                 kernel_init+0xa/0x100
                 ret_from_fork+0x3a/0x50
          -> #0 (&(&iommu->lock)->rlock){+.+.}:
                 lock_acquire+0x9e/0x170
                 _raw_spin_lock+0x25/0x30
                 domain_context_mapping_one+0xa5/0x4e0
                 pci_for_each_dma_alias+0x30/0x140
                 dmar_insert_one_dev_info+0x3b2/0x510
                 domain_add_dev_info+0x50/0x90
                 dev_prepare_static_identity_mapping+0x30/0x68
                 intel_iommu_init+0xddd/0x1422
                 pci_iommu_init+0x16/0x3f
                 do_one_initcall+0x5d/0x2b4
                 kernel_init_freeable+0x218/0x2c1
                 kernel_init+0xa/0x100
                 ret_from_fork+0x3a/0x50
      
          other info that might help us debug this:
           Possible unsafe locking scenario:
                 CPU0                    CPU1
                 ----                    ----
            lock(device_domain_lock);
                                         lock(&(&iommu->lock)->rlock);
                                         lock(device_domain_lock);
            lock(&(&iommu->lock)->rlock);
      
           *** DEADLOCK ***
          2 locks held by swapper/0/1:
           #0: 00000000033eb13d (dmar_global_lock){++++}, at: intel_iommu_init+0x1e0/0x1422
           #1: 00000000a681907b (device_domain_lock){....}, at: domain_context_mapping_one+0x8d/0x4e0
      
          stack backtrace:
          CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc5 #78
          Hardware name: LENOVO 20KGS35G01/20KGS35G01, BIOS N23ET50W (1.25 ) 06/25/2018
          Call Trace:
           dump_stack+0x85/0xc0
           print_circular_bug.cold.57+0x15c/0x195
           __lock_acquire+0x152a/0x1710
           lock_acquire+0x9e/0x170
           ? domain_context_mapping_one+0xa5/0x4e0
           _raw_spin_lock+0x25/0x30
           ? domain_context_mapping_one+0xa5/0x4e0
           domain_context_mapping_one+0xa5/0x4e0
           ? domain_context_mapping_one+0x4e0/0x4e0
           pci_for_each_dma_alias+0x30/0x140
           dmar_insert_one_dev_info+0x3b2/0x510
           domain_add_dev_info+0x50/0x90
           dev_prepare_static_identity_mapping+0x30/0x68
           intel_iommu_init+0xddd/0x1422
           ? printk+0x58/0x6f
           ? lockdep_hardirqs_on+0xf0/0x180
           ? do_early_param+0x8e/0x8e
           ? e820__memblock_setup+0x63/0x63
           pci_iommu_init+0x16/0x3f
           do_one_initcall+0x5d/0x2b4
           ? do_early_param+0x8e/0x8e
           ? rcu_read_lock_sched_held+0x55/0x60
           ? do_early_param+0x8e/0x8e
           kernel_init_freeable+0x218/0x2c1
           ? rest_init+0x230/0x230
           kernel_init+0xa/0x100
           ret_from_fork+0x3a/0x50
      
      domain_context_mapping_one() is taking device_domain_lock first then
      iommu lock, while dmar_insert_one_dev_info() is doing the reverse.
      
      That should be introduced by commit:
      
      7560cc3c ("iommu/vt-d: Fix lock inversion between iommu->lock and
                    device_domain_lock", 2019-05-27)
      
      So far I still cannot figure out how the previous deadlock was
      triggered (I cannot find iommu lock taken before calling of
      iommu_flush_dev_iotlb()), however I'm pretty sure that that change
      should be incomplete at least because it does not fix all the places
      so we're still taking the locks in different orders, while reverting
      that commit is very clean to me so far that we should always take
      device_domain_lock first then the iommu lock.
      
      We can continue to try to find the real culprit mentioned in
      7560cc3c, but for now I think we should revert it to fix current
      breakage.
      
      CC: Joerg Roedel <joro@8bytes.org>
      CC: Lu Baolu <baolu.lu@linux.intel.com>
      CC: dave.jiang@intel.com
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Tested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      0aafc8ae