aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea
diff options
context:
space:
mode:
authorBreno Leitao <leitao@linux.vnet.ibm.com>2010-12-08 15:19:14 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-08 15:19:14 -0500
commitc7757fdb41dfcf6add9f8a4576eb85aa5e77a4eb (patch)
tree32a531bb925d1eafbec4446c9c9c6ad6d5de6fda /drivers/net/ehea
parent67631510a318d5a930055fe927607f483716e100 (diff)
ehea: Fixing LRO configuration
In order to set LRO on ehea, the user must set a module parameter, which is not the standard way to do so. This patch adds a way to set LRO using the ethtool tool. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r--drivers/net/ehea/ehea_ethtool.c9
-rw-r--r--drivers/net/ehea/ehea_main.c7
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
index 75b099ce49c9..1f37ee6b2a26 100644
--- a/drivers/net/ehea/ehea_ethtool.c
+++ b/drivers/net/ehea/ehea_ethtool.c
@@ -261,6 +261,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
261 261
262} 262}
263 263
264static int ehea_set_flags(struct net_device *dev, u32 data)
265{
266 return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO
267 | ETH_FLAG_TXVLAN
268 | ETH_FLAG_RXVLAN);
269}
270
264const struct ethtool_ops ehea_ethtool_ops = { 271const struct ethtool_ops ehea_ethtool_ops = {
265 .get_settings = ehea_get_settings, 272 .get_settings = ehea_get_settings,
266 .get_drvinfo = ehea_get_drvinfo, 273 .get_drvinfo = ehea_get_drvinfo,
@@ -273,6 +280,8 @@ const struct ethtool_ops ehea_ethtool_ops = {
273 .get_ethtool_stats = ehea_get_ethtool_stats, 280 .get_ethtool_stats = ehea_get_ethtool_stats,
274 .get_rx_csum = ehea_get_rx_csum, 281 .get_rx_csum = ehea_get_rx_csum,
275 .set_settings = ehea_set_settings, 282 .set_settings = ehea_set_settings,
283 .get_flags = ethtool_op_get_flags,
284 .set_flags = ehea_set_flags,
276 .nway_reset = ehea_nway_reset, /* Restart autonegotiation */ 285 .nway_reset = ehea_nway_reset, /* Restart autonegotiation */
277}; 286};
278 287
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 3d0af08483a1..b95f087cd5a9 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -683,7 +683,7 @@ static void ehea_proc_skb(struct ehea_port_res *pr, struct ehea_cqe *cqe,
683 int vlan_extracted = ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) && 683 int vlan_extracted = ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) &&
684 pr->port->vgrp); 684 pr->port->vgrp);
685 685
686 if (use_lro) { 686 if (skb->dev->features & NETIF_F_LRO) {
687 if (vlan_extracted) 687 if (vlan_extracted)
688 lro_vlan_hwaccel_receive_skb(&pr->lro_mgr, skb, 688 lro_vlan_hwaccel_receive_skb(&pr->lro_mgr, skb,
689 pr->port->vgrp, 689 pr->port->vgrp,
@@ -787,7 +787,7 @@ static int ehea_proc_rwqes(struct net_device *dev,
787 } 787 }
788 cqe = ehea_poll_rq1(qp, &wqe_index); 788 cqe = ehea_poll_rq1(qp, &wqe_index);
789 } 789 }
790 if (use_lro) 790 if (dev->features & NETIF_F_LRO)
791 lro_flush_all(&pr->lro_mgr); 791 lro_flush_all(&pr->lro_mgr);
792 792
793 pr->rx_packets += processed; 793 pr->rx_packets += processed;
@@ -3278,6 +3278,9 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
3278 | NETIF_F_LLTX; 3278 | NETIF_F_LLTX;
3279 dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT; 3279 dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT;
3280 3280
3281 if (use_lro)
3282 dev->features |= NETIF_F_LRO;
3283
3281 INIT_WORK(&port->reset_task, ehea_reset_port); 3284 INIT_WORK(&port->reset_task, ehea_reset_port);
3282 3285
3283 ret = register_netdev(dev); 3286 ret = register_netdev(dev);