Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79200
b: refs/heads/master
c: 439104b
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Jan 28, 2008
1 parent 0423f4b commit 27b3dbf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 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: f3ec33e587df02e25963755989cc473e3f07bf0d
refs/heads/master: 439104b3a39b2f576daa229d783eb2cefac8b7df
8 changes: 5 additions & 3 deletions trunk/drivers/net/sungem.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ static int gem_rx(struct gem *gp, int work_to_do)
{
int entry, drops, work_done = 0;
u32 done;
__sum16 csum;

if (netif_msg_rx_status(gp))
printk(KERN_DEBUG "%s: rx interrupt, done: %d, rx_new: %d\n",
Expand All @@ -769,7 +770,7 @@ static int gem_rx(struct gem *gp, int work_to_do)
for (;;) {
struct gem_rxd *rxd = &gp->init_block->rxd[entry];
struct sk_buff *skb;
u64 status = cpu_to_le64(rxd->status_word);
u64 status = le64_to_cpu(rxd->status_word);
dma_addr_t dma_addr;
int len;

Expand Down Expand Up @@ -811,7 +812,7 @@ static int gem_rx(struct gem *gp, int work_to_do)
goto next;
}

dma_addr = cpu_to_le64(rxd->buffer);
dma_addr = le64_to_cpu(rxd->buffer);
if (len > RX_COPY_THRESHOLD) {
struct sk_buff *new_skb;

Expand Down Expand Up @@ -853,7 +854,8 @@ static int gem_rx(struct gem *gp, int work_to_do)
skb = copy_skb;
}

skb->csum = ntohs((status & RXDCTRL_TCPCSUM) ^ 0xffff);
csum = (__force __sum16)htons((status & RXDCTRL_TCPCSUM) ^ 0xffff);
skb->csum = csum_unfold(csum);
skb->ip_summed = CHECKSUM_COMPLETE;
skb->protocol = eth_type_trans(skb, gp->dev);

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/sungem.h
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,8 @@
* DMA mappings for a transmitted packet.
*/
struct gem_txd {
u64 control_word;
u64 buffer;
__le64 control_word;
__le64 buffer;
};

#define TXDCTRL_BUFSZ 0x0000000000007fffULL /* Buffer Size */
Expand Down Expand Up @@ -863,8 +863,8 @@ struct gem_txd {
* by the host driver just as in the TX descriptor case above.
*/
struct gem_rxd {
u64 status_word;
u64 buffer;
__le64 status_word;
__le64 buffer;
};

#define RXDCTRL_TCPCSUM 0x000000000000ffffULL /* TCP Pseudo-CSUM */
Expand Down

0 comments on commit 27b3dbf

Please sign in to comment.