diff options
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 31 |
2 files changed, 19 insertions, 14 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 6e317caf429..16a41389575 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0100" | 43 | #define DRV_VERSION "EHEA_0101" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 604c844d076..b22dab9153f 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; |