--- a/arch/mips/Kbuild.platforms
+++ b/arch/mips/Kbuild.platforms
-@@ -27,6 +27,7 @@ platforms += pistachio
- platforms += pmcs-msp71xx
- platforms += pnx833x
- platforms += ralink
-+platforms += rtl838x
- platforms += rb532
- platforms += sgi-ip22
- platforms += sgi-ip27
+@@ -23,6 +23,7 @@ platform-$(CONFIG_PIC32MZDA) += pic32/
+ platform-$(CONFIG_MACH_PISTACHIO) += pistachio/
+ platform-$(CONFIG_RALINK) += ralink/
+ platform-$(CONFIG_MIKROTIK_RB532) += rb532/
++platform-$(CONFIG_RTL838X) += rtl838x/
+ platform-$(CONFIG_SGI_IP22) += sgi-ip22/
+ platform-$(CONFIG_SGI_IP27) += sgi-ip27/
+ platform-$(CONFIG_SGI_IP28) += sgi-ip22/
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -631,6 +631,26 @@ config RALINK
+@@ -627,6 +627,26 @@ config RALINK
select ARCH_HAS_RESET_CONTROLLER
select RESET_CONTROLLER
+
config SGI_IP22
bool "SGI IP22 (Indy/Indigo2)"
- select FW_ARC
+ select ARC_MEMORY
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
-@@ -441,6 +441,12 @@ config GPIO_REG
+@@ -508,6 +508,12 @@ config GPIO_REG
A 32-bit single register GPIO fixed in/out implementation. This
can be used to represent any register as a set of GPIO signals.
depends on MFD_SYSCON
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
-@@ -117,6 +117,7 @@ obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t
- obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o
+@@ -126,6 +126,7 @@ obj-$(CONFIG_GPIO_RDA) += gpio-rda.o
obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o
+ obj-$(CONFIG_GPIO_REALTEK_OTTO) += gpio-realtek-otto.o
obj-$(CONFIG_GPIO_REG) += gpio-reg.o
+obj-$(CONFIG_GPIO_RTL8231) += gpio-rtl8231.o
obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
-@@ -127,6 +127,15 @@ config RDA_TIMER
+@@ -126,6 +126,15 @@ config RDA_TIMER
help
Enables the support for the RDA Micro timer driver.
config SUN4I_TIMER
bool "Sun4i timer driver" if COMPILE_TEST
depends on HAS_IOMEM
-@@ -696,5 +705,4 @@ config INGENIC_TIMER
- select IRQ_DOMAIN
- help
- Support for the timer/counter unit of the Ingenic JZ SoCs.
--
- endmenu
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
-@@ -61,6 +61,7 @@ obj-$(CONFIG_MILBEAUT_TIMER) += timer-mi
+@@ -63,6 +63,7 @@ obj-$(CONFIG_MILBEAUT_TIMER) += timer-mi
obj-$(CONFIG_SPRD_TIMER) += timer-sprd.o
obj-$(CONFIG_NPCM7XX_TIMER) += timer-npcm7xx.o
obj-$(CONFIG_RDA_TIMER) += timer-rda.o
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
-@@ -63,6 +63,8 @@ config NET_DSA_QCA8K
+@@ -67,6 +67,8 @@ config NET_DSA_QCA8K
This enables support for the Qualcomm Atheros QCA8K Ethernet
switch chips.
depends on NET_DSA
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
-@@ -21,3 +21,4 @@ obj-y += b53/
- obj-y += microchip/
- obj-y += mv88e6xxx/
+@@ -23,3 +23,4 @@ obj-y += mv88e6xxx/
+ obj-y += ocelot/
+ obj-y += qca/
obj-y += sja1105/
+obj-y += rtl83xx/
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
-@@ -44,7 +44,12 @@ static struct sk_buff *trailer_xmit(stru
+@@ -17,7 +17,12 @@ static struct sk_buff *trailer_xmit(stru
- trailer = skb_put(nskb, 4);
+ trailer = skb_put(skb, 4);
trailer[0] = 0x80;
+
+#ifdef CONFIG_NET_DSA_RTL83XX
trailer[2] = 0x10;
trailer[3] = 0x00;
-@@ -61,12 +66,23 @@ static struct sk_buff *trailer_rcv(struc
+@@ -34,12 +39,23 @@ static struct sk_buff *trailer_rcv(struc
return NULL;
trailer = skb_tail_pointer(skb) - 4;
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -163,6 +163,13 @@ source "drivers/net/ethernet/rdc/Kconfig
+@@ -162,6 +162,13 @@ source "drivers/net/ethernet/rdc/Kconfig
source "drivers/net/ethernet/realtek/Kconfig"
source "drivers/net/ethernet/renesas/Kconfig"
source "drivers/net/ethernet/rocker/Kconfig"
source "drivers/net/ethernet/sfc/Kconfig"
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
-@@ -76,6 +76,7 @@ obj-$(CONFIG_NET_VENDOR_REALTEK) += real
+@@ -75,6 +75,7 @@ obj-$(CONFIG_NET_VENDOR_REALTEK) += real
obj-$(CONFIG_NET_VENDOR_RENESAS) += renesas/
obj-$(CONFIG_NET_VENDOR_RDC) += rdc/
obj-$(CONFIG_NET_VENDOR_ROCKER) += rocker/
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -645,6 +645,10 @@ struct phy_driver {
- struct ethtool_tunable *tuna,
- const void *data);
- int (*set_loopback)(struct phy_device *dev, bool enable);
+@@ -881,6 +881,10 @@ struct phy_driver {
+ int (*get_sqi)(struct phy_device *dev);
+ /** @get_sqi_max: Get the maximum signal quality indication */
+ int (*get_sqi_max)(struct phy_device *dev);
+ int (*get_port)(struct phy_device *dev);
+ int (*set_port)(struct phy_device *dev, int port);
+ int (*get_eee)(struct phy_device *dev, struct ethtool_eee *e);
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
-@@ -1242,6 +1242,11 @@ int phylink_ethtool_ksettings_set(struct
-
- /* If we have a PHY, configure the phy */
- if (pl->phydev) {
+@@ -1425,6 +1425,11 @@ int phylink_ethtool_ksettings_set(struct
+ * the presence of a PHY, this should not be changed as that
+ * should be determined from the media side advertisement.
+ */
+ if (pl->phydev->drv->get_port && pl->phydev->drv->set_port) {
+ if(pl->phydev->drv->get_port(pl->phydev) != kset->base.port) {
+ pl->phydev->drv->set_port(pl->phydev, kset->base.port);
+ }
+ }
- ret = phy_ethtool_ksettings_set(pl->phydev, &our_kset);
- if (ret)
- return ret;
-@@ -1420,8 +1425,11 @@ int phylink_ethtool_get_eee(struct phyli
+ return phy_ethtool_ksettings_set(pl->phydev, kset);
+ }
+
+@@ -1700,8 +1705,11 @@ int phylink_ethtool_get_eee(struct phyli
ASSERT_RTNL();
return ret;
}
-@@ -1438,9 +1446,11 @@ int phylink_ethtool_set_eee(struct phyli
+@@ -1718,8 +1726,11 @@ int phylink_ethtool_set_eee(struct phyli
ASSERT_RTNL();
+ if (pl->phydev->drv->set_eee)
+ return pl->phydev->drv->set_eee(pl->phydev, eee);
ret = phy_ethtool_set_eee(pl->phydev, eee);
--
+ }
+
return ret;
}
- EXPORT_SYMBOL_GPL(phylink_ethtool_set_eee);
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
-@@ -540,6 +540,12 @@ config REALTEK_PHY
- ---help---
+@@ -324,6 +324,12 @@ config REALTEK_PHY
+ help
Supports the Realtek 821x PHY.
+config REALTEK_SOC_PHY
+ Supports the PHYs found in combination with Realtek Switch SoCs
+
config RENESAS_PHY
- tristate "Driver for Renesas PHYs"
- ---help---
+ tristate "Renesas PHYs"
+ help
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
-@@ -102,6 +102,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o
+@@ -86,6 +86,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o
obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o
obj-$(CONFIG_QSEMI_PHY) += qsemi.o
obj-$(CONFIG_REALTEK_PHY) += realtek.o
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -188,7 +188,7 @@ static inline const char *phy_modes(phy_
+@@ -226,7 +226,7 @@ static inline const char *phy_modes(phy_
#define PHY_INIT_TIMEOUT 100000
#define PHY_FORCE_TIMEOUT 10