Commit 54a61fbc authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: fix off-by-one in RX copybreak check

The RX copybreak is intended as the _max_ value where the frame's data
should be copied. So for frame_len == copybreak, don't build an SG skb.

Fixes: 4a71df50 ("qeth: new qeth device driver")
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 420579db
...@@ -5344,7 +5344,7 @@ static int qeth_extract_skb(struct qeth_card *card, ...@@ -5344,7 +5344,7 @@ static int qeth_extract_skb(struct qeth_card *card,
} }
use_rx_sg = (card->options.cq == QETH_CQ_ENABLED) || use_rx_sg = (card->options.cq == QETH_CQ_ENABLED) ||
((skb_len >= card->options.rx_sg_cb) && (skb_len > card->options.rx_sg_cb &&
!atomic_read(&card->force_alloc_skb) && !atomic_read(&card->force_alloc_skb) &&
!IS_OSN(card)); !IS_OSN(card));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment