diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 053d4e85820d..3725ac857086 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -117,10 +117,10 @@ | |||
117 | 117 | ||
118 | #define TG3_RX_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * \ | 118 | #define TG3_RX_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * \ |
119 | TG3_RX_RING_SIZE) | 119 | TG3_RX_RING_SIZE) |
120 | #define TG3_RX_JUMBO_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * \ | 120 | #define TG3_RX_JUMBO_RING_BYTES (sizeof(struct tg3_ext_rx_buffer_desc) * \ |
121 | TG3_RX_JUMBO_RING_SIZE) | 121 | TG3_RX_JUMBO_RING_SIZE) |
122 | #define TG3_RX_RCB_RING_BYTES(tp) (sizeof(struct tg3_rx_buffer_desc) * \ | 122 | #define TG3_RX_RCB_RING_BYTES(tp) (sizeof(struct tg3_rx_buffer_desc) * \ |
123 | TG3_RX_RCB_RING_SIZE(tp)) | 123 | TG3_RX_RCB_RING_SIZE(tp)) |
124 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ | 124 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ |
125 | TG3_TX_RING_SIZE) | 125 | TG3_TX_RING_SIZE) |
126 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) | 126 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) |
@@ -4367,7 +4367,7 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key, | |||
4367 | 4367 | ||
4368 | case RXD_OPAQUE_RING_JUMBO: | 4368 | case RXD_OPAQUE_RING_JUMBO: |
4369 | dest_idx = dest_idx_unmasked % TG3_RX_JUMBO_RING_SIZE; | 4369 | dest_idx = dest_idx_unmasked % TG3_RX_JUMBO_RING_SIZE; |
4370 | desc = &tpr->rx_jmb[dest_idx]; | 4370 | desc = &tpr->rx_jmb[dest_idx].std; |
4371 | map = &tpr->rx_jmb_buffers[dest_idx]; | 4371 | map = &tpr->rx_jmb_buffers[dest_idx]; |
4372 | if (src_idx >= 0) | 4372 | if (src_idx >= 0) |
4373 | src_map = &tpr->rx_jmb_buffers[src_idx]; | 4373 | src_map = &tpr->rx_jmb_buffers[src_idx]; |
@@ -4428,9 +4428,9 @@ static void tg3_recycle_rx(struct tg3 *tp, u32 opaque_key, | |||
4428 | 4428 | ||
4429 | case RXD_OPAQUE_RING_JUMBO: | 4429 | case RXD_OPAQUE_RING_JUMBO: |
4430 | dest_idx = dest_idx_unmasked % TG3_RX_JUMBO_RING_SIZE; | 4430 | dest_idx = dest_idx_unmasked % TG3_RX_JUMBO_RING_SIZE; |
4431 | dest_desc = &tpr->rx_jmb[dest_idx]; | 4431 | dest_desc = &tpr->rx_jmb[dest_idx].std; |
4432 | dest_map = &tpr->rx_jmb_buffers[dest_idx]; | 4432 | dest_map = &tpr->rx_jmb_buffers[dest_idx]; |
4433 | src_desc = &tpr->rx_jmb[src_idx]; | 4433 | src_desc = &tpr->rx_jmb[src_idx].std; |
4434 | src_map = &tpr->rx_jmb_buffers[src_idx]; | 4434 | src_map = &tpr->rx_jmb_buffers[src_idx]; |
4435 | break; | 4435 | break; |
4436 | 4436 | ||
@@ -5614,7 +5614,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp, | |||
5614 | for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) { | 5614 | for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) { |
5615 | struct tg3_rx_buffer_desc *rxd; | 5615 | struct tg3_rx_buffer_desc *rxd; |
5616 | 5616 | ||
5617 | rxd = &tpr->rx_jmb[i]; | 5617 | rxd = &tpr->rx_jmb[i].std; |
5618 | rxd->idx_len = TG3_RX_JMB_DMA_SZ << RXD_LEN_SHIFT; | 5618 | rxd->idx_len = TG3_RX_JMB_DMA_SZ << RXD_LEN_SHIFT; |
5619 | rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT) | | 5619 | rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT) | |
5620 | RXD_FLAG_JUMBO; | 5620 | RXD_FLAG_JUMBO; |
@@ -7053,7 +7053,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
7053 | tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, | 7053 | tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, |
7054 | ((u64) tpr->rx_jmb_mapping & 0xffffffff)); | 7054 | ((u64) tpr->rx_jmb_mapping & 0xffffffff)); |
7055 | tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS, | 7055 | tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS, |
7056 | RX_JUMBO_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT); | 7056 | (RX_JUMBO_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT) | |
7057 | BDINFO_FLAGS_USE_EXT_RECV); | ||
7057 | tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_NIC_ADDR, | 7058 | tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_NIC_ADDR, |
7058 | NIC_SRAM_RX_JUMBO_BUFFER_DESC); | 7059 | NIC_SRAM_RX_JUMBO_BUFFER_DESC); |
7059 | } else { | 7060 | } else { |