Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203748
b: refs/heads/master
c: 1f4b161
h: refs/heads/master
v: v3
  • Loading branch information
Bhavesh Davda authored and David S. Miller committed Jul 26, 2010
1 parent b75cf05 commit 4d60d9c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 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: 690a1f2002a3091bd18a501f46c9530f10481463
refs/heads/master: 1f4b16128439b225c2986f06d015c848c290d7d9
13 changes: 9 additions & 4 deletions trunk/drivers/net/vmxnet3/vmxnet3_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,22 +664,27 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx,
while (len) {
u32 buf_size;

buf_size = len > VMXNET3_MAX_TX_BUF_SIZE ?
VMXNET3_MAX_TX_BUF_SIZE : len;
if (len < VMXNET3_MAX_TX_BUF_SIZE) {
buf_size = len;
dw2 |= len;
} else {
buf_size = VMXNET3_MAX_TX_BUF_SIZE;
/* spec says that for TxDesc.len, 0 == 2^14 */
}

tbi = tq->buf_info + tq->tx_ring.next2fill;
tbi->map_type = VMXNET3_MAP_SINGLE;
tbi->dma_addr = pci_map_single(adapter->pdev,
skb->data + buf_offset, buf_size,
PCI_DMA_TODEVICE);

tbi->len = buf_size; /* this automatically convert 2^14 to 0 */
tbi->len = buf_size;

gdesc = tq->tx_ring.base + tq->tx_ring.next2fill;
BUG_ON(gdesc->txd.gen == tq->tx_ring.gen);

gdesc->txd.addr = cpu_to_le64(tbi->dma_addr);
gdesc->dword[2] = cpu_to_le32(dw2 | buf_size);
gdesc->dword[2] = cpu_to_le32(dw2);
gdesc->dword[3] = 0;

dev_dbg(&adapter->netdev->dev,
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/vmxnet3/vmxnet3_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
/*
* Version numbers
*/
#define VMXNET3_DRIVER_VERSION_STRING "1.0.13.0-k"
#define VMXNET3_DRIVER_VERSION_STRING "1.0.14.0-k"

/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
#define VMXNET3_DRIVER_VERSION_NUM 0x01000B00
#define VMXNET3_DRIVER_VERSION_NUM 0x01000E00


/*
Expand Down

0 comments on commit 4d60d9c

Please sign in to comment.