Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y
authorDom Cobley <popcornmix@gmail.com>
Wed, 8 Sep 2021 13:09:39 +0000 (14:09 +0100)
committerDom Cobley <popcornmix@gmail.com>
Wed, 8 Sep 2021 13:09:39 +0000 (14:09 +0100)
1  2 
Makefile
drivers/gpu/drm/nouveau/dispnv50/disp.c
drivers/gpu/drm/nouveau/dispnv50/head.c
drivers/mmc/host/sdhci-iproc.c
drivers/net/usb/lan78xx.c
drivers/net/usb/r8152.c
drivers/usb/core/message.c

diff --cc Makefile
Simple merge
@@@ -173,17 -173,23 +173,34 @@@ static unsigned int sdhci_iproc_get_max
                return pltfm_host->clock;
  }
  
 +static void sdhci_iproc_set_power(struct sdhci_host *host, unsigned char mode,
 +                                unsigned short vdd)
 +{
 +      if (!IS_ERR(host->mmc->supply.vmmc)) {
 +              struct mmc_host *mmc = host->mmc;
 +
 +              mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
 +      }
 +      sdhci_set_power_noreg(host, mode, vdd);
 +}
 +
+ /*
+  * There is a known bug on BCM2711's SDHCI core integration where the
+  * controller will hang when the difference between the core clock and the bus
+  * clock is too great. Specifically this can be reproduced under the following
+  * conditions:
+  *
+  *  - No SD card plugged in, polling thread is running, probing cards at
+  *    100 kHz.
+  *  - BCM2711's core clock configured at 500MHz or more
+  *
+  * So we set 200kHz as the minimum clock frequency available for that SoC.
+  */
+ static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host)
+ {
+       return 200000;
+ }
  static const struct sdhci_ops sdhci_iproc_ops = {
        .set_clock = sdhci_set_clock,
        .get_max_clock = sdhci_iproc_get_max_clock,
@@@ -1181,12 -1167,12 +1181,15 @@@ static int lan78xx_link_reset(struct la
        if (unlikely(ret < 0))
                return -EIO;
  
 +      /* Acknowledge any pending PHY interrupt, lest it be the last */
 +      phy_read(phydev, LAN88XX_INT_STS);
 +
+       mutex_lock(&phydev->lock);
        phy_read_status(phydev);
+       link = phydev->link;
+       mutex_unlock(&phydev->lock);
  
-       if (!phydev->link && dev->link_on) {
+       if (!link && dev->link_on) {
                dev->link_on = false;
  
                /* reset MAC */
@@@ -3946,15 -3430,9 +3946,15 @@@ static void rtl_clear_bp(struct r8152 *
                break;
        case RTL_VER_08:
        case RTL_VER_09:
 +      case RTL_VER_10:
 +      case RTL_VER_11:
 +      case RTL_VER_12:
 +      case RTL_VER_13:
 +      case RTL_VER_14:
 +      case RTL_VER_15:
        default:
                if (type == MCU_TYPE_USB) {
-                       ocp_write_byte(tp, MCU_TYPE_USB, USB_BP2_EN, 0);
+                       ocp_write_word(tp, MCU_TYPE_USB, USB_BP2_EN, 0);
  
                        ocp_write_word(tp, MCU_TYPE_USB, USB_BP_8, 0);
                        ocp_write_word(tp, MCU_TYPE_USB, USB_BP_9, 0);
Simple merge