Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215196
b: refs/heads/master
c: 4803572
h: refs/heads/master
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Oct 17, 2010
1 parent d783f9b commit bf41073
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f94e290eba2f98e8f759d273d9d04e8487fb4b6b
refs/heads/master: 4803572815feea2dca9485a343a8556c9037e36e
11 changes: 7 additions & 4 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -6219,7 +6219,8 @@ static void tg3_rx_prodring_free(struct tg3 *tp,
tg3_rx_skb_free(tp, &tpr->rx_std_buffers[i],
tp->rx_pkt_map_sz);

if (tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) {
if ((tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) &&
!(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) {
for (i = 0; i <= tp->rx_jmb_ring_mask; i++)
tg3_rx_skb_free(tp, &tpr->rx_jmb_buffers[i],
TG3_RX_JMB_MAP_SZ);
Expand All @@ -6246,7 +6247,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
if (tpr != &tp->napi[0].prodring) {
memset(&tpr->rx_std_buffers[0], 0,
TG3_RX_STD_BUFF_RING_SIZE(tp));
if (tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE)
if (tpr->rx_jmb_buffers)
memset(&tpr->rx_jmb_buffers[0], 0,
TG3_RX_JMB_BUFF_RING_SIZE(tp));
goto done;
Expand Down Expand Up @@ -6289,7 +6290,8 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
}
}

if (!(tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE))
if (!(tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) ||
(tp->tg3_flags2 & TG3_FLG2_5780_CLASS))
goto done;

memset(tpr->rx_jmb, 0, TG3_RX_JMB_RING_BYTES(tp));
Expand Down Expand Up @@ -6361,7 +6363,8 @@ static int tg3_rx_prodring_init(struct tg3 *tp,
if (!tpr->rx_std)
goto err_out;

if (tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) {
if ((tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) &&
!(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) {
tpr->rx_jmb_buffers = kzalloc(TG3_RX_JMB_BUFF_RING_SIZE(tp),
GFP_KERNEL);
if (!tpr->rx_jmb_buffers)
Expand Down

0 comments on commit bf41073

Please sign in to comment.