Merge 5.17-rc6 into usb-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Feb 2022 20:42:36 +0000 (21:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Feb 2022 20:42:36 +0000 (21:42 +0100)
We need the USB fixes in here, and it resolves a merge conflict in:
drivers/usb/dwc3/dwc3-pci.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1  2 
MAINTAINERS
drivers/usb/dwc3/dwc3-pci.c
drivers/usb/host/xhci.c

diff --combined MAINTAINERS
@@@ -3139,11 -3139,9 +3139,9 @@@ W:     https://wireless.wiki.kernel.org/en/
  F:    drivers/net/wireless/ath/ath5k/
  
  ATHEROS ATH6KL WIRELESS DRIVER
- M:    Kalle Valo <kvalo@kernel.org>
  L:    linux-wireless@vger.kernel.org
- S:    Supported
+ S:    Orphan
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
- T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
  F:    drivers/net/wireless/ath/ath6kl/
  
  ATI_REMOTE2 DRIVER
@@@ -4549,6 -4547,7 +4547,7 @@@ F:      drivers/platform/chrome
  
  CHROMEOS EC CODEC DRIVER
  M:    Cheng-Yi Chiang <cychiang@chromium.org>
+ M:    Tzung-Bi Shih <tzungbi@google.com>
  R:    Guenter Roeck <groeck@chromium.org>
  S:    Maintained
  F:    Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
@@@ -4914,7 -4913,8 +4913,8 @@@ F:      kernel/cgroup/cpuset.
  CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
  M:    Johannes Weiner <hannes@cmpxchg.org>
  M:    Michal Hocko <mhocko@kernel.org>
- M:    Vladimir Davydov <vdavydov.dev@gmail.com>
+ M:    Roman Gushchin <roman.gushchin@linux.dev>
+ M:    Shakeel Butt <shakeelb@google.com>
  L:    cgroups@vger.kernel.org
  L:    linux-mm@kvack.org
  S:    Maintained
@@@ -7012,12 -7012,6 +7012,6 @@@ L:     linux-edac@vger.kernel.or
  S:    Maintained
  F:    drivers/edac/sb_edac.c
  
- EDAC-SIFIVE
- M:    Yash Shah <yash.shah@sifive.com>
- L:    linux-edac@vger.kernel.org
- S:    Supported
- F:    drivers/edac/sifive_edac.c
  EDAC-SKYLAKE
  M:    Tony Luck <tony.luck@intel.com>
  L:    linux-edac@vger.kernel.org
@@@ -7188,7 -7182,7 +7182,7 @@@ F:      drivers/net/can/usb/etas_es58x
  
  ETHERNET BRIDGE
  M:    Roopa Prabhu <roopa@nvidia.com>
- M:    Nikolay Aleksandrov <nikolay@nvidia.com>
+ M:    Nikolay Aleksandrov <razor@blackwall.org>
  L:    bridge@lists.linux-foundation.org (moderated for non-subscribers)
  L:    netdev@vger.kernel.org
  S:    Maintained
@@@ -9264,6 -9258,15 +9258,15 @@@ S:    Maintaine
  W:    https://github.com/o2genum/ideapad-slidebar
  F:    drivers/input/misc/ideapad_slidebar.c
  
+ IDMAPPED MOUNTS
+ M:    Christian Brauner <brauner@kernel.org>
+ L:    linux-fsdevel@vger.kernel.org
+ S:    Maintained
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
+ F:    Documentation/filesystems/idmappings.rst
+ F:    tools/testing/selftests/mount_setattr/
+ F:    include/linux/mnt_idmapping.h
  IDT VersaClock 5 CLOCK DRIVER
  M:    Luca Ceresoli <luca@lucaceresoli.net>
  S:    Maintained
@@@ -15147,7 -15150,7 +15150,7 @@@ M:   Ingo Molnar <mingo@redhat.com
  M:    Arnaldo Carvalho de Melo <acme@kernel.org>
  R:    Mark Rutland <mark.rutland@arm.com>
  R:    Alexander Shishkin <alexander.shishkin@linux.intel.com>
- R:    Jiri Olsa <jolsa@redhat.com>
+ R:    Jiri Olsa <jolsa@kernel.org>
  R:    Namhyung Kim <namhyung@kernel.org>
  L:    linux-perf-users@vger.kernel.org
  L:    linux-kernel@vger.kernel.org
@@@ -15565,6 -15568,7 +15568,7 @@@ M:   Iurii Zaikin <yzaikin@google.com
  L:    linux-kernel@vger.kernel.org
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-next
  F:    fs/proc/proc_sysctl.c
  F:    include/linux/sysctl.h
  F:    kernel/sysctl-test.c
@@@ -15766,14 -15770,6 +15770,14 @@@ F: sound/soc/codecs/wcd-clsh-v2.
  F:    sound/soc/codecs/wsa881x.c
  F:    sound/soc/qcom/
  
 +QCOM EMBEDDED USB DEBUGGER (EUD)
 +M:    Souradeep Chowdhury <quic_schowdhu@quicinc.com>
 +L:    linux-arm-msm@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-driver-eud
 +F:    Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
 +F:    drivers/usb/misc/qcom_eud.c
 +
  QCOM IPA DRIVER
  M:    Alex Elder <elder@kernel.org>
  L:    netdev@vger.kernel.org
@@@ -15920,6 -15916,7 +15924,7 @@@ S:   Supporte
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
  F:    drivers/net/wireless/ath/ath10k/
+ F:    Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
  
  QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
  M:    Kalle Valo <kvalo@kernel.org>
@@@ -15927,11 -15924,12 +15932,12 @@@ L:        ath11k@lists.infradead.or
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
  F:    drivers/net/wireless/ath/ath11k/
+ F:    Documentation/devicetree/bindings/net/wireless/qcom,ath11k.txt
  
  QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
- M:    ath9k-devel@qca.qualcomm.com
+ M:    Toke Høiland-Jørgensen <toke@toke.dk>
  L:    linux-wireless@vger.kernel.org
- S:    Supported
+ S:    Maintained
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
  F:    Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
  F:    drivers/net/wireless/ath/ath9k/
@@@ -16006,14 -16004,6 +16012,6 @@@ F:  Documentation/devicetree/bindings/mi
  F:    drivers/misc/fastrpc.c
  F:    include/uapi/misc/fastrpc.h
  
- QUALCOMM GENERIC INTERFACE I2C DRIVER
- M:    Akash Asthana <akashast@codeaurora.org>
- M:    Mukesh Savaliya <msavaliy@codeaurora.org>
- L:    linux-i2c@vger.kernel.org
- L:    linux-arm-msm@vger.kernel.org
- S:    Supported
- F:    drivers/i2c/busses/i2c-qcom-geni.c
  QUALCOMM HEXAGON ARCHITECTURE
  M:    Brian Cain <bcain@codeaurora.org>
  L:    linux-hexagon@vger.kernel.org
@@@ -16085,8 -16075,8 +16083,8 @@@ F:   Documentation/devicetree/bindings/mt
  F:    drivers/mtd/nand/raw/qcom_nandc.c
  
  QUALCOMM RMNET DRIVER
- M:    Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
- M:    Sean Tranchetti <stranche@codeaurora.org>
+ M:    Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
+ M:    Sean Tranchetti <quic_stranche@quicinc.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
@@@ -16112,11 -16102,10 +16110,10 @@@ F:        Documentation/devicetree/bindings/me
  F:    drivers/media/platform/qcom/venus/
  
  QUALCOMM WCN36XX WIRELESS DRIVER
- M:    Kalle Valo <kvalo@kernel.org>
+ M:    Loic Poulain <loic.poulain@linaro.org>
  L:    wcn36xx@lists.infradead.org
  S:    Supported
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
- T:    git git://github.com/KrasnikovEugene/wcn36xx.git
  F:    drivers/net/wireless/ath/wcn36xx/
  
  QUANTENNA QTNFMAC WIRELESS DRIVER
@@@ -16379,6 -16368,7 +16376,7 @@@ F:   drivers/watchdog/realtek_otto_wdt.
  
  REALTEK RTL83xx SMI DSA ROUTER CHIPS
  M:    Linus Walleij <linus.walleij@linaro.org>
+ M:    Alvin Šipraga <alsi@bang-olufsen.dk>
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
  F:    drivers/net/dsa/realtek-smi*
@@@ -17772,8 -17762,10 +17770,10 @@@ M: David Rientjes <rientjes@google.com
  M:    Joonsoo Kim <iamjoonsoo.kim@lge.com>
  M:    Andrew Morton <akpm@linux-foundation.org>
  M:    Vlastimil Babka <vbabka@suse.cz>
+ R:    Roman Gushchin <roman.gushchin@linux.dev>
  L:    linux-mm@kvack.org
  S:    Maintained
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git
  F:    include/linux/sl?b*.h
  F:    mm/sl?b*
  
@@@ -43,6 -43,7 +43,7 @@@
  #define PCI_DEVICE_ID_INTEL_ADLP              0x51ee
  #define PCI_DEVICE_ID_INTEL_ADLM              0x54ee
  #define PCI_DEVICE_ID_INTEL_ADLS              0x7ae1
+ #define PCI_DEVICE_ID_INTEL_RPLS              0x7a61
  #define PCI_DEVICE_ID_INTEL_TGL                       0x9a15
  #define PCI_DEVICE_ID_AMD_MR                  0x163a
  
@@@ -85,8 -86,8 +86,8 @@@ static const struct acpi_gpio_mapping a
  static struct gpiod_lookup_table platform_bytcr_gpios = {
        .dev_id         = "0000:00:16.0",
        .table          = {
-               GPIO_LOOKUP("INT33FC:00", 54, "reset", GPIO_ACTIVE_HIGH),
-               GPIO_LOOKUP("INT33FC:02", 14, "cs", GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP("INT33FC:00", 54, "cs", GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP("INT33FC:02", 14, "reset", GPIO_ACTIVE_HIGH),
                {}
        },
  };
@@@ -119,10 -120,9 +120,16 @@@ static const struct property_entry dwc3
        {}
  };
  
 +static const struct property_entry dwc3_pci_intel_phy_charger_detect_properties[] = {
 +      PROPERTY_ENTRY_STRING("dr_mode", "peripheral"),
 +      PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"),
 +      PROPERTY_ENTRY_BOOL("linux,phy_charger_detect"),
++      {}
++};
++
+ static const struct property_entry dwc3_pci_intel_byt_properties[] = {
+       PROPERTY_ENTRY_STRING("dr_mode", "peripheral"),
+       PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"),
        PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
        {}
  };
@@@ -169,10 -169,10 +176,14 @@@ static const struct software_node dwc3_
        .properties = dwc3_pci_intel_properties,
  };
  
 +static const struct software_node dwc3_pci_intel_phy_charger_detect_swnode = {
 +      .properties = dwc3_pci_intel_phy_charger_detect_properties,
 +};
 +
+ static const struct software_node dwc3_pci_intel_byt_swnode = {
+       .properties = dwc3_pci_intel_byt_properties,
+ };
  static const struct software_node dwc3_pci_intel_mrfld_swnode = {
        .properties = dwc3_pci_mrfld_properties,
  };
@@@ -185,8 -185,7 +196,8 @@@ static const struct software_node dwc3_
        .properties = dwc3_pci_mr_properties,
  };
  
 -static int dwc3_pci_quirks(struct dwc3_pci *dwc)
 +static int dwc3_pci_quirks(struct dwc3_pci *dwc,
 +                         const struct software_node *swnode)
  {
        struct pci_dev                  *pdev = dwc->pci;
  
                                gpiod_put(gpio);
                                usleep_range(10000, 11000);
                        }
 +
 +                      /*
 +                       * Make the pdev name predictable (only 1 DWC3 on BYT)
 +                       * and patch the phy dev-name into the lookup table so
 +                       * that the phy-driver can get the GPIOs.
 +                       */
 +                      dwc->dwc3->id = PLATFORM_DEVID_NONE;
 +                      platform_bytcr_gpios.dev_id = "dwc3.ulpi";
 +
 +                      /*
 +                       * Some Android tablets with a Crystal Cove PMIC
 +                       * (INT33FD), rely on the TUSB1211 phy for charger
 +                       * detection. These can be identified by them _not_
 +                       * using the standard ACPI battery and ac drivers.
 +                       */
 +                      if (acpi_dev_present("INT33FD", "1", 2) &&
 +                          acpi_quirk_skip_acpi_ac_and_battery()) {
 +                              dev_info(&pdev->dev, "Using TUSB1211 phy for charger detection\n");
 +                              swnode = &dwc3_pci_intel_phy_charger_detect_swnode;
 +                      }
                }
        }
  
 -      return 0;
 +      return device_add_software_node(&dwc->dwc3->dev, swnode);
  }
  
  #ifdef CONFIG_PM
@@@ -328,7 -307,11 +339,7 @@@ static int dwc3_pci_probe(struct pci_de
        dwc->dwc3->dev.parent = dev;
        ACPI_COMPANION_SET(&dwc->dwc3->dev, ACPI_COMPANION(dev));
  
 -      ret = device_add_software_node(&dwc->dwc3->dev, (void *)id->driver_data);
 -      if (ret < 0)
 -              goto err;
 -
 -      ret = dwc3_pci_quirks(dwc);
 +      ret = dwc3_pci_quirks(dwc, (void *)id->driver_data);
        if (ret)
                goto err;
  
@@@ -373,7 -356,7 +384,7 @@@ static const struct pci_device_id dwc3_
          (kernel_ulong_t) &dwc3_pci_intel_swnode, },
  
        { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_BYT),
-         (kernel_ulong_t) &dwc3_pci_intel_swnode, },
+         (kernel_ulong_t) &dwc3_pci_intel_byt_swnode, },
  
        { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MRFLD),
          (kernel_ulong_t) &dwc3_pci_intel_mrfld_swnode, },
        { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ADLS),
          (kernel_ulong_t) &dwc3_pci_intel_swnode, },
  
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPLS),
+         (kernel_ulong_t) &dwc3_pci_intel_swnode, },
        { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL),
          (kernel_ulong_t) &dwc3_pci_intel_swnode, },
  
diff --combined drivers/usb/host/xhci.c
@@@ -695,7 -695,7 +695,7 @@@ int xhci_run(struct usb_hcd *hcd
        xhci_dbg_trace(xhci, trace_xhci_dbg_init,
                        "Finished xhci_run for USB2 roothub");
  
 -      xhci_dbc_init(xhci);
 +      xhci_create_dbc_dev(xhci);
  
        xhci_debugfs_init(xhci);
  
@@@ -725,7 -725,7 +725,7 @@@ static void xhci_stop(struct usb_hcd *h
                return;
        }
  
 -      xhci_dbc_exit(xhci);
 +      xhci_remove_dbc_dev(xhci);
  
        spin_lock_irq(&xhci->lock);
        xhci->xhc_state |= XHCI_STATE_HALTED;
@@@ -1091,6 -1091,7 +1091,7 @@@ int xhci_resume(struct xhci_hcd *xhci, 
        int                     retval = 0;
        bool                    comp_timer_running = false;
        bool                    pending_portevent = false;
+       bool                    reinit_xhc = false;
  
        if (!hcd->state)
                return 0;
        set_bit(HCD_FLAG_HW_ACCESSIBLE, &xhci->shared_hcd->flags);
  
        spin_lock_irq(&xhci->lock);
-       if ((xhci->quirks & XHCI_RESET_ON_RESUME) || xhci->broken_suspend)
-               hibernated = true;
  
-       if (!hibernated) {
+       if (hibernated || xhci->quirks & XHCI_RESET_ON_RESUME || xhci->broken_suspend)
+               reinit_xhc = true;
+       if (!reinit_xhc) {
                /*
                 * Some controllers might lose power during suspend, so wait
                 * for controller not ready bit to clear, just as in xHC init.
                        spin_unlock_irq(&xhci->lock);
                        return -ETIMEDOUT;
                }
-               temp = readl(&xhci->op_regs->status);
        }
  
-       /* If restore operation fails, re-initialize the HC during resume */
-       if ((temp & STS_SRE) || hibernated) {
+       temp = readl(&xhci->op_regs->status);
  
+       /* re-initialize the HC on Restore Error, or Host Controller Error */
+       if (temp & (STS_SRE | STS_HCE)) {
+               reinit_xhc = true;
+               xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x, Reinit\n", temp);
+       }
+       if (reinit_xhc) {
                if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) &&
                                !(xhci_all_ports_seen_u0(xhci))) {
                        del_timer_sync(&xhci->comp_mode_recovery_timer);
@@@ -1604,9 -1611,12 +1611,12 @@@ static int xhci_urb_enqueue(struct usb_
        struct urb_priv *urb_priv;
        int num_tds;
  
-       if (!urb || xhci_check_args(hcd, urb->dev, urb->ep,
-                                       true, true, __func__) <= 0)
+       if (!urb)
                return -EINVAL;
+       ret = xhci_check_args(hcd, urb->dev, urb->ep,
+                                       true, true, __func__);
+       if (ret <= 0)
+               return ret ? ret : -EINVAL;
  
        slot_id = urb->dev->slot_id;
        ep_index = xhci_get_endpoint_index(&urb->ep->desc);
@@@ -3150,6 -3160,8 +3160,6 @@@ rescan
  
        ep_index = xhci_get_endpoint_index(&host_ep->desc);
        ep = &vdev->eps[ep_index];
 -      if (!ep)
 -              goto done;
  
        /* wait for hub_tt_work to finish clearing hub TT */
        if (ep->ep_state & EP_CLEARING_TT) {
@@@ -3207,6 -3219,8 +3217,6 @@@ static void xhci_endpoint_reset(struct 
                return;
        ep_index = xhci_get_endpoint_index(&host_ep->desc);
        ep = &vdev->eps[ep_index];
 -      if (!ep)
 -              return;
  
        /* Bail out if toggle is already being cleared by a endpoint reset */
        spin_lock_irqsave(&xhci->lock, flags);
@@@ -3319,7 -3333,7 +3329,7 @@@ static int xhci_check_streams_endpoint(
                return -EINVAL;
        ret = xhci_check_args(xhci_to_hcd(xhci), udev, ep, 1, true, __func__);
        if (ret <= 0)
-               return -EINVAL;
+               return ret ? ret : -EINVAL;
        if (usb_ss_max_streams(&ep->ss_ep_comp) == 0) {
                xhci_warn(xhci, "WARN: SuperSpeed Endpoint Companion"
                                " descriptor for ep 0x%x does not support streams\n",
@@@ -4340,10 -4354,6 +4350,10 @@@ static int __maybe_unused xhci_change_m
        unsigned long flags;
        int ret;
  
 +      command = xhci_alloc_command_with_ctx(xhci, true, GFP_KERNEL);
 +      if (!command)
 +              return -ENOMEM;
 +
        spin_lock_irqsave(&xhci->lock, flags);
  
        virt_dev = xhci->devs[udev->slot_id];
        }
  
        /* Attempt to issue an Evaluate Context command to change the MEL. */
 -      command = xhci->lpm_command;
        ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx);
        if (!ctrl_ctx) {
                spin_unlock_irqrestore(&xhci->lock, flags);
 +              xhci_free_command(xhci, command);
                xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
                                __func__);
                return -ENOMEM;
                virt_dev->current_mel = max_exit_latency;
                spin_unlock_irqrestore(&xhci->lock, flags);
        }
 +
 +      xhci_free_command(xhci, command);
 +
        return ret;
  }
  
@@@ -4513,8 -4520,18 +4523,8 @@@ static int xhci_set_usb2_hardware_lpm(s
                        exit_latency = xhci_besl_encoding[hird];
                        spin_unlock_irqrestore(&xhci->lock, flags);
  
 -                      /* USB 3.0 code dedicate one xhci->lpm_command->in_ctx
 -                       * input context for link powermanagement evaluate
 -                       * context commands. It is protected by hcd->bandwidth
 -                       * mutex and is shared by all devices. We need to set
 -                       * the max ext latency in USB 2 BESL LPM as well, so
 -                       * use the same mutex and xhci_change_max_exit_latency()
 -                       */
 -                      mutex_lock(hcd->bandwidth_mutex);
                        ret = xhci_change_max_exit_latency(xhci, udev,
                                                           exit_latency);
 -                      mutex_unlock(hcd->bandwidth_mutex);
 -
                        if (ret < 0)
                                return ret;
                        spin_lock_irqsave(&xhci->lock, flags);
                readl(pm_addr);
                if (udev->usb2_hw_lpm_besl_capable) {
                        spin_unlock_irqrestore(&xhci->lock, flags);
 -                      mutex_lock(hcd->bandwidth_mutex);
                        xhci_change_max_exit_latency(xhci, udev, 0);
 -                      mutex_unlock(hcd->bandwidth_mutex);
                        readl_poll_timeout(ports[port_num]->addr, pm_val,
                                           (pm_val & PORT_PLS_MASK) == XDEV_U0,
                                           100, 10000);
@@@ -5486,7 -5505,6 +5496,7 @@@ static int __init xhci_hcd_init(void
                return -ENODEV;
  
        xhci_debugfs_create_root();
 +      xhci_dbc_init();
  
        return 0;
  }
  static void __exit xhci_hcd_fini(void)
  {
        xhci_debugfs_remove_root();
 +      xhci_dbc_exit();
  }
  
  module_init(xhci_hcd_init);