Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6591
b: refs/heads/master
c: 8b5641d
h: refs/heads/master
i:
  6589: d7002b7
  6587: 2b049bc
  6583: 78dae83
  6575: b7f9a04
  6559: 01a9b50
  6527: 1141fec
v: v3
  • Loading branch information
Francois Romieu authored and Jeff Garzik committed Jul 30, 2005
1 parent e7dae2a commit 06b61a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 830fb7d23217ae748df0b16d4d419110810036b7
refs/heads/master: 8b5641d4f1f7376257783b79f121a19ccd86b56b
8 changes: 7 additions & 1 deletion trunk/drivers/net/sis190.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#define TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc))
#define RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc))
#define RX_BUF_SIZE 1536
#define RX_BUF_MASK 0xfff8

#define SIS190_REGS_SIZE 0x80
#define SIS190_TX_TIMEOUT (6*HZ)
Expand Down Expand Up @@ -400,7 +401,7 @@ static inline void sis190_give_to_asic(struct RxDesc *desc, u32 rx_buf_sz)
u32 eor = le32_to_cpu(desc->size) & RingEnd;

desc->PSize = 0x0;
desc->size = cpu_to_le32(rx_buf_sz | eor);
desc->size = cpu_to_le32((rx_buf_sz & RX_BUF_MASK) | eor);
wmb();
desc->status = cpu_to_le32(OWNbit | INTbit);
}
Expand Down Expand Up @@ -924,6 +925,11 @@ static void sis190_set_rxbufsize(struct sis190_private *tp,
unsigned int mtu = dev->mtu;

tp->rx_buf_sz = (mtu > RX_BUF_SIZE) ? mtu + ETH_HLEN + 8 : RX_BUF_SIZE;
/* RxDesc->size has a licence to kill the lower bits */
if (tp->rx_buf_sz & 0x07) {
tp->rx_buf_sz += 8;
tp->rx_buf_sz &= RX_BUF_MASK;
}
}

static int sis190_open(struct net_device *dev)
Expand Down

0 comments on commit 06b61a0

Please sign in to comment.