kernel: update 4.9 to 4.9.44
[openwrt/staging/wigyori.git] / target / linux / generic / hack-4.9 / 700-swconfig_switch_drivers.patch
1 From 36e516290611e613aa92996cb4339561452695b4 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Fri, 7 Jul 2017 17:24:23 +0200
4 Subject: net: swconfig: adds openwrt switch layer
5
6 Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 ---
8 drivers/net/phy/Kconfig | 83 +++++++++++++++++++++++++++++++++++++++++++++++
9 drivers/net/phy/Makefile | 15 +++++++++
10 include/uapi/linux/Kbuild | 1 +
11 3 files changed, 99 insertions(+)
12
13 --- a/drivers/net/phy/Kconfig
14 +++ b/drivers/net/phy/Kconfig
15 @@ -147,6 +147,89 @@ config MDIO_XGENE
16 This module provides a driver for the MDIO busses found in the
17 APM X-Gene SoC's.
18
19 +comment "Switch configuration API + drivers"
20 +
21 +config SWCONFIG
22 + tristate "Switch configuration API"
23 + ---help---
24 + Switch configuration API using netlink. This allows
25 + you to configure the VLAN features of certain switches.
26 +
27 +config SWCONFIG_LEDS
28 + bool "Switch LED trigger support"
29 + depends on (SWCONFIG && LEDS_TRIGGERS)
30 +
31 +config ADM6996_PHY
32 + tristate "Driver for ADM6996 switches"
33 + select SWCONFIG
34 + ---help---
35 + Currently supports the ADM6996FC and ADM6996M switches.
36 + Support for FC is very limited.
37 +
38 +config AR8216_PHY
39 + tristate "Driver for Atheros AR8216 switches"
40 + select ETHERNET_PACKET_MANGLE
41 + select SWCONFIG
42 +
43 +config AR8216_PHY_LEDS
44 + bool "Atheros AR8216 switch LED support"
45 + depends on (AR8216_PHY && LEDS_CLASS)
46 +
47 +source "drivers/net/phy/b53/Kconfig"
48 +
49 +config IP17XX_PHY
50 + tristate "Driver for IC+ IP17xx switches"
51 + select SWCONFIG
52 +
53 +config MVSWITCH_PHY
54 + tristate "Driver for Marvell 88E6060 switches"
55 + select ETHERNET_PACKET_MANGLE
56 +
57 +config MVSW61XX_PHY
58 + tristate "Driver for Marvell 88E6171/6172 switches"
59 + select SWCONFIG
60 +
61 +config PSB6970_PHY
62 + tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
63 + select SWCONFIG
64 + select ETHERNET_PACKET_MANGLE
65 +
66 +config RTL8306_PHY
67 + tristate "Driver for Realtek RTL8306S switches"
68 + select SWCONFIG
69 +
70 +config RTL8366_SMI
71 + tristate "Driver for the RTL8366 SMI interface"
72 + depends on GPIOLIB
73 + ---help---
74 + This module implements the SMI interface protocol which is used
75 + by some RTL8366 ethernet switch devices via the generic GPIO API.
76 +
77 +if RTL8366_SMI
78 +
79 +config RTL8366_SMI_DEBUG_FS
80 + bool "RTL8366 SMI interface debugfs support"
81 + depends on DEBUG_FS
82 + default n
83 +
84 +config RTL8366S_PHY
85 + tristate "Driver for the Realtek RTL8366S switch"
86 + select SWCONFIG
87 +
88 +config RTL8366RB_PHY
89 + tristate "Driver for the Realtek RTL8366RB switch"
90 + select SWCONFIG
91 +
92 +config RTL8367_PHY
93 + tristate "Driver for the Realtek RTL8367R/M switches"
94 + select SWCONFIG
95 +
96 +config RTL8367B_PHY
97 + tristate "Driver fot the Realtek RTL8367R-VB switch"
98 + select SWCONFIG
99 +
100 +endif # RTL8366_SMI
101 +
102 comment "MII PHY device drivers"
103
104 config AMD_PHY
105 --- a/drivers/net/phy/Makefile
106 +++ b/drivers/net/phy/Makefile
107 @@ -5,6 +5,21 @@ libphy-$(CONFIG_SWPHY) += swphy.o
108
109 obj-$(CONFIG_PHYLIB) += libphy.o
110
111 +obj-$(CONFIG_SWCONFIG) += swconfig.o
112 +obj-$(CONFIG_ADM6996_PHY) += adm6996.o
113 +obj-$(CONFIG_AR8216_PHY) += ar8216.o ar8327.o
114 +obj-$(CONFIG_SWCONFIG_B53) += b53/
115 +obj-$(CONFIG_IP17XX_PHY) += ip17xx.o
116 +obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o
117 +obj-$(CONFIG_MVSW61XX_PHY) += mvsw61xx.o
118 +obj-$(CONFIG_PSB6970_PHY) += psb6970.o
119 +obj-$(CONFIG_RTL8306_PHY) += rtl8306.o
120 +obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o
121 +obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o
122 +obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o
123 +obj-$(CONFIG_RTL8367_PHY) += rtl8367.o
124 +obj-$(CONFIG_RTL8367B_PHY) += rtl8367b.o
125 +
126 obj-$(CONFIG_MDIO_BCM_IPROC) += mdio-bcm-iproc.o
127 obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o
128 obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
129 --- a/include/uapi/linux/Kbuild
130 +++ b/include/uapi/linux/Kbuild
131 @@ -399,6 +399,7 @@ header-y += stddef.h
132 header-y += string.h
133 header-y += suspend_ioctls.h
134 header-y += swab.h
135 +header-y += switch.h
136 header-y += synclink.h
137 header-y += sync_file.h
138 header-y += sysctl.h