Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -3234,6 +3234,11 @@ static int r8152_tx_agg_sg_fill(struct r8152 *tp, struct tx_agg *agg)
len = skb->len;

if ((num_sgs + sg_num) > max_sg_num) {
if (!sg_num) {
netif_warn(tp, tx_err, netdev,
"num_sgs %d > max_sg_num %d\n",
num_sgs, max_sg_num);
}
__skb_queue_head(&skb_head, skb);
break;
}
Expand Down Expand Up @@ -3657,21 +3662,25 @@ static int rx_bottom(struct r8152 *tp, int budget)
static void tx_bottom(struct r8152 *tp)
{
int res;
struct sk_buff *prev_skb = NULL;

do {
struct net_device *netdev = tp->netdev;
struct tx_agg *agg;
struct sk_buff *skb;

if (skb_queue_empty(&tp->tx_queue))
skb = skb_peek(&tp->tx_queue);
if (!skb)
break;

agg = r8152_get_tx_agg(tp);
if (!agg)
break;

if (tp->sg_use)
if (tp->sg_use && skb != prev_skb) {
res = r8152_tx_agg_sg_fill(tp, agg);
else
prev_skb = skb;
} else
res = r8152_tx_agg_fill(tp, agg);

if (!res)
Expand Down