kernel: bump to 4.4.36
[openwrt/staging/dedeckeh.git] / target / linux / generic / patches-4.4 / 738-net-phy-at803x-only-the-AT8030-needs-a-hardware-rese.patch
index c49d53ee1c48c3d144716a8f4b5d42a32d349dc6..4e6baac0c3644d279a8d62b25e65162411f15a56 100644 (file)
@@ -25,31 +25,35 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
 -              if (phydev->state == PHY_NOLINK) {
 -                      if (priv->gpiod_reset && !priv->phy_reset) {
 -                              struct at803x_context context;
-+      if (phydev->state == PHY_NOLINK) {
-+              if (priv->gpiod_reset && !priv->phy_reset) {
-+                      struct at803x_context context;
+-
 -                              at803x_context_save(phydev, &context);
-+                      at803x_context_save(phydev, &context);
+-
 -                              gpiod_set_value(priv->gpiod_reset, 1);
 -                              msleep(1);
 -                              gpiod_set_value(priv->gpiod_reset, 0);
 -                              msleep(1);
-+                      gpiod_set_value(priv->gpiod_reset, 1);
-+                      msleep(1);
-+                      gpiod_set_value(priv->gpiod_reset, 0);
-+                      msleep(1);
+-
 -                              at803x_context_restore(phydev, &context);
-+                      at803x_context_restore(phydev, &context);
+-
 -                              dev_dbg(&phydev->dev, "%s(): phy was reset\n",
 -                                      __func__);
 -                              priv->phy_reset = true;
 -                      }
 -              } else {
 -                      priv->phy_reset = false;
++      if (phydev->state == PHY_NOLINK) {
++              if (priv->gpiod_reset && !priv->phy_reset) {
++                      struct at803x_context context;
++
++                      at803x_context_save(phydev, &context);
++
++                      gpiod_set_value(priv->gpiod_reset, 1);
++                      msleep(1);
++                      gpiod_set_value(priv->gpiod_reset, 0);
++                      msleep(1);
++
++                      at803x_context_restore(phydev, &context);
++
 +                      dev_dbg(&phydev->dev, "%s(): phy was reset\n",
 +                              __func__);
 +                      priv->phy_reset = true;