diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/net/qeth_main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index ba10d42a1a56..610d27cfd28b 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -2803,13 +2803,16 @@ qeth_queue_input_buffer(struct qeth_card *card, int index) | |||
2803 | if (newcount < count) { | 2803 | if (newcount < count) { |
2804 | /* we are in memory shortage so we switch back to | 2804 | /* we are in memory shortage so we switch back to |
2805 | traditional skb allocation and drop packages */ | 2805 | traditional skb allocation and drop packages */ |
2806 | if (atomic_cmpxchg(&card->force_alloc_skb, 0, 1)) | 2806 | if (!atomic_read(&card->force_alloc_skb) && |
2807 | printk(KERN_WARNING | 2807 | net_ratelimit()) |
2808 | "qeth: switch to alloc skb\n"); | 2808 | PRINT_WARN("Switch to alloc skb\n"); |
2809 | atomic_set(&card->force_alloc_skb, 3); | ||
2809 | count = newcount; | 2810 | count = newcount; |
2810 | } else { | 2811 | } else { |
2811 | if (atomic_cmpxchg(&card->force_alloc_skb, 1, 0)) | 2812 | if ((atomic_read(&card->force_alloc_skb) == 1) && |
2812 | printk(KERN_WARNING "qeth: switch to sg\n"); | 2813 | net_ratelimit()) |
2814 | PRINT_WARN("Switch to sg\n"); | ||
2815 | atomic_add_unless(&card->force_alloc_skb, -1, 0); | ||
2813 | } | 2816 | } |
2814 | 2817 | ||
2815 | /* | 2818 | /* |