diff options
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 13 | ||||
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_int.h | 4 |
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 9d64186050f3..abe0ff53daf3 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -664,8 +664,13 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx, | |||
664 | while (len) { | 664 | while (len) { |
665 | u32 buf_size; | 665 | u32 buf_size; |
666 | 666 | ||
667 | buf_size = len > VMXNET3_MAX_TX_BUF_SIZE ? | 667 | if (len < VMXNET3_MAX_TX_BUF_SIZE) { |
668 | VMXNET3_MAX_TX_BUF_SIZE : len; | 668 | buf_size = len; |
669 | dw2 |= len; | ||
670 | } else { | ||
671 | buf_size = VMXNET3_MAX_TX_BUF_SIZE; | ||
672 | /* spec says that for TxDesc.len, 0 == 2^14 */ | ||
673 | } | ||
669 | 674 | ||
670 | tbi = tq->buf_info + tq->tx_ring.next2fill; | 675 | tbi = tq->buf_info + tq->tx_ring.next2fill; |
671 | tbi->map_type = VMXNET3_MAP_SINGLE; | 676 | tbi->map_type = VMXNET3_MAP_SINGLE; |
@@ -673,13 +678,13 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx, | |||
673 | skb->data + buf_offset, buf_size, | 678 | skb->data + buf_offset, buf_size, |
674 | PCI_DMA_TODEVICE); | 679 | PCI_DMA_TODEVICE); |
675 | 680 | ||
676 | tbi->len = buf_size; /* this automatically convert 2^14 to 0 */ | 681 | tbi->len = buf_size; |
677 | 682 | ||
678 | gdesc = tq->tx_ring.base + tq->tx_ring.next2fill; | 683 | gdesc = tq->tx_ring.base + tq->tx_ring.next2fill; |
679 | BUG_ON(gdesc->txd.gen == tq->tx_ring.gen); | 684 | BUG_ON(gdesc->txd.gen == tq->tx_ring.gen); |
680 | 685 | ||
681 | gdesc->txd.addr = cpu_to_le64(tbi->dma_addr); | 686 | gdesc->txd.addr = cpu_to_le64(tbi->dma_addr); |
682 | gdesc->dword[2] = cpu_to_le32(dw2 | buf_size); | 687 | gdesc->dword[2] = cpu_to_le32(dw2); |
683 | gdesc->dword[3] = 0; | 688 | gdesc->dword[3] = 0; |
684 | 689 | ||
685 | dev_dbg(&adapter->netdev->dev, | 690 | dev_dbg(&adapter->netdev->dev, |
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index 762a6a7763fe..2121c735cabd 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h | |||
@@ -68,10 +68,10 @@ | |||
68 | /* | 68 | /* |
69 | * Version numbers | 69 | * Version numbers |
70 | */ | 70 | */ |
71 | #define VMXNET3_DRIVER_VERSION_STRING "1.0.13.0-k" | 71 | #define VMXNET3_DRIVER_VERSION_STRING "1.0.14.0-k" |
72 | 72 | ||
73 | /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ | 73 | /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ |
74 | #define VMXNET3_DRIVER_VERSION_NUM 0x01000B00 | 74 | #define VMXNET3_DRIVER_VERSION_NUM 0x01000E00 |
75 | 75 | ||
76 | 76 | ||
77 | /* | 77 | /* |