aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/ethtool.c35
1 files changed, 28 insertions, 7 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 794cf57078cd..82cae3bca78d 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -197,7 +197,10 @@ static int ethtool_set_settings(struct net_device *dev, void __user *useraddr)
197 return dev->ethtool_ops->set_settings(dev, &cmd); 197 return dev->ethtool_ops->set_settings(dev, &cmd);
198} 198}
199 199
200static int ethtool_get_drvinfo(struct net_device *dev, void __user *useraddr) 200/*
201 * noinline attribute so that gcc doesnt use too much stack in dev_ethtool()
202 */
203static noinline int ethtool_get_drvinfo(struct net_device *dev, void __user *useraddr)
201{ 204{
202 struct ethtool_drvinfo info; 205 struct ethtool_drvinfo info;
203 const struct ethtool_ops *ops = dev->ethtool_ops; 206 const struct ethtool_ops *ops = dev->ethtool_ops;
@@ -232,7 +235,10 @@ static int ethtool_get_drvinfo(struct net_device *dev, void __user *useraddr)
232 return 0; 235 return 0;
233} 236}
234 237
235static int ethtool_set_rxnfc(struct net_device *dev, void __user *useraddr) 238/*
239 * noinline attribute so that gcc doesnt use too much stack in dev_ethtool()
240 */
241static noinline int ethtool_set_rxnfc(struct net_device *dev, void __user *useraddr)
236{ 242{
237 struct ethtool_rxnfc cmd; 243 struct ethtool_rxnfc cmd;
238 244
@@ -245,7 +251,10 @@ static int ethtool_set_rxnfc(struct net_device *dev, void __user *useraddr)
245 return dev->ethtool_ops->set_rxnfc(dev, &cmd); 251 return dev->ethtool_ops->set_rxnfc(dev, &cmd);
246} 252}
247 253
248static int ethtool_get_rxnfc(struct net_device *dev, void __user *useraddr) 254/*
255 * noinline attribute so that gcc doesnt use too much stack in dev_ethtool()
256 */
257static noinline int ethtool_get_rxnfc(struct net_device *dev, void __user *useraddr)
249{ 258{
250 struct ethtool_rxnfc info; 259 struct ethtool_rxnfc info;
251 const struct ethtool_ops *ops = dev->ethtool_ops; 260 const struct ethtool_ops *ops = dev->ethtool_ops;
@@ -317,7 +326,10 @@ static void __rx_ntuple_filter_add(struct ethtool_rx_ntuple_list *list,
317 list->count++; 326 list->count++;
318} 327}
319 328
320static int ethtool_set_rx_ntuple(struct net_device *dev, void __user *useraddr) 329/*
330 * noinline attribute so that gcc doesnt use too much stack in dev_ethtool()
331 */
332static noinline int ethtool_set_rx_ntuple(struct net_device *dev, void __user *useraddr)
321{ 333{
322 struct ethtool_rx_ntuple cmd; 334 struct ethtool_rx_ntuple cmd;
323 const struct ethtool_ops *ops = dev->ethtool_ops; 335 const struct ethtool_ops *ops = dev->ethtool_ops;
@@ -788,7 +800,10 @@ static int ethtool_set_eeprom(struct net_device *dev, void __user *useraddr)
788 return ret; 800 return ret;
789} 801}
790 802
791static int ethtool_get_coalesce(struct net_device *dev, void __user *useraddr) 803/*
804 * noinline attribute so that gcc doesnt use too much stack in dev_ethtool()
805 */
806static noinline int ethtool_get_coalesce(struct net_device *dev, void __user *useraddr)
792{ 807{
793 struct ethtool_coalesce coalesce = { .cmd = ETHTOOL_GCOALESCE }; 808 struct ethtool_coalesce coalesce = { .cmd = ETHTOOL_GCOALESCE };
794 809
@@ -802,7 +817,10 @@ static int ethtool_get_coalesce(struct net_device *dev, void __user *useraddr)
802 return 0; 817 return 0;
803} 818}
804 819
805static int ethtool_set_coalesce(struct net_device *dev, void __user *useraddr) 820/*
821 * noinline attribute so that gcc doesnt use too much stack in dev_ethtool()
822 */
823static noinline int ethtool_set_coalesce(struct net_device *dev, void __user *useraddr)
806{ 824{
807 struct ethtool_coalesce coalesce; 825 struct ethtool_coalesce coalesce;
808 826
@@ -1212,7 +1230,10 @@ static int ethtool_set_value(struct net_device *dev, char __user *useraddr,
1212 return actor(dev, edata.data); 1230 return actor(dev, edata.data);
1213} 1231}
1214 1232
1215static int ethtool_flash_device(struct net_device *dev, char __user *useraddr) 1233/*
1234 * noinline attribute so that gcc doesnt use too much stack in dev_ethtool()
1235 */
1236static noinline int ethtool_flash_device(struct net_device *dev, char __user *useraddr)
1216{ 1237{
1217 struct ethtool_flash efl; 1238 struct ethtool_flash efl;
1218 1239