aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r--drivers/net/ehea/ehea_main.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index ac0c5b438e0a..b22dab9153f6 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -545,14 +545,17 @@ static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array,
545 x &= (arr_len - 1); 545 x &= (arr_len - 1);
546 546
547 pref = skb_array[x]; 547 pref = skb_array[x];
548 prefetchw(pref); 548 if (pref) {
549 prefetchw(pref + EHEA_CACHE_LINE); 549 prefetchw(pref);
550 550 prefetchw(pref + EHEA_CACHE_LINE);
551 pref = (skb_array[x]->data); 551
552 prefetch(pref); 552 pref = (skb_array[x]->data);
553 prefetch(pref + EHEA_CACHE_LINE); 553 prefetch(pref);
554 prefetch(pref + EHEA_CACHE_LINE * 2); 554 prefetch(pref + EHEA_CACHE_LINE);
555 prefetch(pref + EHEA_CACHE_LINE * 3); 555 prefetch(pref + EHEA_CACHE_LINE * 2);
556 prefetch(pref + EHEA_CACHE_LINE * 3);
557 }
558
556 skb = skb_array[skb_index]; 559 skb = skb_array[skb_index];
557 skb_array[skb_index] = NULL; 560 skb_array[skb_index] = NULL;
558 return skb; 561 return skb;
@@ -569,12 +572,14 @@ static inline struct sk_buff *get_skb_by_index_ll(struct sk_buff **skb_array,
569 x &= (arr_len - 1); 572 x &= (arr_len - 1);
570 573
571 pref = skb_array[x]; 574 pref = skb_array[x];
572 prefetchw(pref); 575 if (pref) {
573 prefetchw(pref + EHEA_CACHE_LINE); 576 prefetchw(pref);
577 prefetchw(pref + EHEA_CACHE_LINE);
574 578
575 pref = (skb_array[x]->data); 579 pref = (skb_array[x]->data);
576 prefetchw(pref); 580 prefetchw(pref);
577 prefetchw(pref + EHEA_CACHE_LINE); 581 prefetchw(pref + EHEA_CACHE_LINE);
582 }
578 583
579 skb = skb_array[wqe_index]; 584 skb = skb_array[wqe_index];
580 skb_array[wqe_index] = NULL; 585 skb_array[wqe_index] = NULL;
@@ -3080,7 +3085,8 @@ static const struct net_device_ops ehea_netdev_ops = {
3080 .ndo_change_mtu = ehea_change_mtu, 3085 .ndo_change_mtu = ehea_change_mtu,
3081 .ndo_vlan_rx_register = ehea_vlan_rx_register, 3086 .ndo_vlan_rx_register = ehea_vlan_rx_register,
3082 .ndo_vlan_rx_add_vid = ehea_vlan_rx_add_vid, 3087 .ndo_vlan_rx_add_vid = ehea_vlan_rx_add_vid,
3083 .ndo_vlan_rx_kill_vid = ehea_vlan_rx_kill_vid 3088 .ndo_vlan_rx_kill_vid = ehea_vlan_rx_kill_vid,
3089 .ndo_tx_timeout = ehea_tx_watchdog,
3084}; 3090};
3085 3091
3086struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, 3092struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
@@ -3142,7 +3148,6 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
3142 | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX 3148 | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX
3143 | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER 3149 | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER
3144 | NETIF_F_LLTX; 3150 | NETIF_F_LLTX;
3145 dev->tx_timeout = &ehea_tx_watchdog;
3146 dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT; 3151 dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT;
3147 3152
3148 INIT_WORK(&port->reset_task, ehea_reset_port); 3153 INIT_WORK(&port->reset_task, ehea_reset_port);