kernel: bump 4.9 to 4.9.75
[openwrt/openwrt.git] / target / linux / mvebu / patches-4.9 / 430-net-mvneta-add-module-EEPROM-reading-support.patch
1 From: Russell King <rmk+kernel@arm.linux.org.uk>
2 Date: Thu, 1 Oct 2015 23:32:39 +0100
3 Subject: [PATCH] net: mvneta: add module EEPROM reading support
4
5 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
6 ---
7
8 --- a/drivers/net/ethernet/marvell/mvneta.c
9 +++ b/drivers/net/ethernet/marvell/mvneta.c
10 @@ -3950,6 +3950,22 @@ static u16 mvneta_select_queue(struct ne
11 }
12
13
14 +static int mvneta_ethtool_get_module_info(struct net_device *dev,
15 + struct ethtool_modinfo *modinfo)
16 +{
17 + struct mvneta_port *pp = netdev_priv(dev);
18 +
19 + return phylink_ethtool_get_module_info(pp->phylink, modinfo);
20 +}
21 +
22 +static int mvneta_ethtool_get_module_eeprom(struct net_device *dev,
23 + struct ethtool_eeprom *ee, u8 *buf)
24 +{
25 + struct mvneta_port *pp = netdev_priv(dev);
26 +
27 + return phylink_ethtool_get_module_eeprom(pp->phylink, ee, buf);
28 +}
29 +
30 static int mvneta_ethtool_get_eee(struct net_device *dev,
31 struct ethtool_eee *eee)
32 {
33 @@ -4023,6 +4039,8 @@ const struct ethtool_ops mvneta_eth_tool
34 .set_rxfh = mvneta_ethtool_set_rxfh,
35 .get_link_ksettings = mvneta_ethtool_get_link_ksettings,
36 .set_link_ksettings = mvneta_ethtool_set_link_ksettings,
37 + .get_module_info = mvneta_ethtool_get_module_info,
38 + .get_module_eeprom = mvneta_ethtool_get_module_eeprom,
39 .get_eee = mvneta_ethtool_get_eee,
40 .set_eee = mvneta_ethtool_set_eee,
41 };