Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159689
b: refs/heads/master
c: 5dce95e
h: refs/heads/master
i:
  159687: b32d5dc
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Aug 19, 2009
1 parent 3885064 commit 8eb01ea
Show file tree
Hide file tree
Showing 3 changed files with 13 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: d6e74b6b7eda3584a403eebae27f9591a1d9c9ff
refs/heads/master: 5dce95e5687a5a335202b03d133c1b4411ef7ce3
17 changes: 11 additions & 6 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,7 @@ static void tx_init(struct sky2_port *sky2)
le = get_tx_le(sky2, &sky2->tx_prod);
le->addr = 0;
le->opcode = OP_ADDR64 | HW_OWNER;
sky2->tx_last_upper = 0;
}

static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2,
Expand Down Expand Up @@ -1573,8 +1574,9 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
struct sky2_tx_le *le = NULL;
struct tx_ring_info *re;
unsigned i, len;
u16 slot;
dma_addr_t mapping;
u32 upper;
u16 slot;
u16 mss;
u8 ctrl;

Expand All @@ -1593,9 +1595,11 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
dev->name, slot, skb->len);

/* Send high bits if needed */
if (sizeof(dma_addr_t) > sizeof(u32)) {
upper = upper_32_bits(mapping);
if (upper != sky2->tx_last_upper) {
le = get_tx_le(sky2, &slot);
le->addr = cpu_to_le32(upper_32_bits(mapping));
le->addr = cpu_to_le32(upper);
sky2->tx_last_upper = upper;
le->opcode = OP_ADDR64 | HW_OWNER;
}

Expand Down Expand Up @@ -1681,10 +1685,11 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
if (pci_dma_mapping_error(hw->pdev, mapping))
goto mapping_unwind;

if (sizeof(dma_addr_t) > sizeof(u32)) {
upper = upper_32_bits(mapping);
if (upper != sky2->tx_last_upper) {
le = get_tx_le(sky2, &slot);
le->addr = cpu_to_le32(upper_32_bits(mapping));
le->ctrl = 0;
le->addr = cpu_to_le32(upper);
sky2->tx_last_upper = upper;
le->opcode = OP_ADDR64 | HW_OWNER;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/sky2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,7 @@ struct sky2_port {

u16 tx_pending;
u16 tx_last_mss;
u32 tx_last_upper;
u32 tx_tcpsum;

struct rx_ring_info *rx_ring ____cacheline_aligned_in_smp;
Expand Down

0 comments on commit 8eb01ea

Please sign in to comment.