diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tg3.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 84530d9f1f4b..17ca0a37c9e7 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -6219,7 +6219,8 @@ static void tg3_rx_prodring_free(struct tg3 *tp, | |||
6219 | tg3_rx_skb_free(tp, &tpr->rx_std_buffers[i], | 6219 | tg3_rx_skb_free(tp, &tpr->rx_std_buffers[i], |
6220 | tp->rx_pkt_map_sz); | 6220 | tp->rx_pkt_map_sz); |
6221 | 6221 | ||
6222 | if (tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) { | 6222 | if ((tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) && |
6223 | !(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) { | ||
6223 | for (i = 0; i <= tp->rx_jmb_ring_mask; i++) | 6224 | for (i = 0; i <= tp->rx_jmb_ring_mask; i++) |
6224 | tg3_rx_skb_free(tp, &tpr->rx_jmb_buffers[i], | 6225 | tg3_rx_skb_free(tp, &tpr->rx_jmb_buffers[i], |
6225 | TG3_RX_JMB_MAP_SZ); | 6226 | TG3_RX_JMB_MAP_SZ); |
@@ -6246,7 +6247,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp, | |||
6246 | if (tpr != &tp->napi[0].prodring) { | 6247 | if (tpr != &tp->napi[0].prodring) { |
6247 | memset(&tpr->rx_std_buffers[0], 0, | 6248 | memset(&tpr->rx_std_buffers[0], 0, |
6248 | TG3_RX_STD_BUFF_RING_SIZE(tp)); | 6249 | TG3_RX_STD_BUFF_RING_SIZE(tp)); |
6249 | if (tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) | 6250 | if (tpr->rx_jmb_buffers) |
6250 | memset(&tpr->rx_jmb_buffers[0], 0, | 6251 | memset(&tpr->rx_jmb_buffers[0], 0, |
6251 | TG3_RX_JMB_BUFF_RING_SIZE(tp)); | 6252 | TG3_RX_JMB_BUFF_RING_SIZE(tp)); |
6252 | goto done; | 6253 | goto done; |
@@ -6289,7 +6290,8 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp, | |||
6289 | } | 6290 | } |
6290 | } | 6291 | } |
6291 | 6292 | ||
6292 | if (!(tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE)) | 6293 | if (!(tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) || |
6294 | (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) | ||
6293 | goto done; | 6295 | goto done; |
6294 | 6296 | ||
6295 | memset(tpr->rx_jmb, 0, TG3_RX_JMB_RING_BYTES(tp)); | 6297 | memset(tpr->rx_jmb, 0, TG3_RX_JMB_RING_BYTES(tp)); |
@@ -6361,7 +6363,8 @@ static int tg3_rx_prodring_init(struct tg3 *tp, | |||
6361 | if (!tpr->rx_std) | 6363 | if (!tpr->rx_std) |
6362 | goto err_out; | 6364 | goto err_out; |
6363 | 6365 | ||
6364 | if (tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) { | 6366 | if ((tp->tg3_flags & TG3_FLAG_JUMBO_CAPABLE) && |
6367 | !(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) { | ||
6365 | tpr->rx_jmb_buffers = kzalloc(TG3_RX_JMB_BUFF_RING_SIZE(tp), | 6368 | tpr->rx_jmb_buffers = kzalloc(TG3_RX_JMB_BUFF_RING_SIZE(tp), |
6366 | GFP_KERNEL); | 6369 | GFP_KERNEL); |
6367 | if (!tpr->rx_jmb_buffers) | 6370 | if (!tpr->rx_jmb_buffers) |