Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103234
b: refs/heads/master
c: 39f2058
h: refs/heads/master
v: v3
  • Loading branch information
Pekka Enberg authored and Jeff Garzik committed Jul 4, 2008
1 parent af9bc08 commit b268da3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 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: 18a9cdb9c7ec88f6e94cd8dcb03fb6cded067119
refs/heads/master: 39f205854c829294f9b4db65100d3abdf9c9c145
9 changes: 5 additions & 4 deletions trunk/drivers/net/ipg.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ static int ipg_get_rxbuff(struct net_device *dev, int entry)

IPG_DEBUG_MSG("_get_rxbuff\n");

skb = netdev_alloc_skb(dev, IPG_RXSUPPORT_SIZE + NET_IP_ALIGN);
skb = netdev_alloc_skb(dev, sp->rxsupport_size + NET_IP_ALIGN);
if (!skb) {
sp->rx_buff[entry] = NULL;
return -ENOMEM;
Expand Down Expand Up @@ -1270,7 +1270,7 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
framelen = le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFRAMELEN;

endframelen = framelen - jumbo->current_size;
if (framelen > IPG_RXSUPPORT_SIZE)
if (framelen > sp->rxsupport_size)
dev_kfree_skb_irq(jumbo->skb);
else {
memcpy(skb_put(jumbo->skb, endframelen),
Expand Down Expand Up @@ -1311,7 +1311,7 @@ static void ipg_nic_rx_no_start_no_end(struct net_device *dev,
if (skb) {
if (jumbo->found_start) {
jumbo->current_size += sp->rxfrag_size;
if (jumbo->current_size <= IPG_RXSUPPORT_SIZE) {
if (jumbo->current_size <= sp->rxsupport_size) {
memcpy(skb_put(jumbo->skb,
sp->rxfrag_size),
skb->data, sp->rxfrag_size);
Expand Down Expand Up @@ -1744,7 +1744,7 @@ static int ipg_nic_open(struct net_device *dev)

IPG_DEBUG_MSG("_nic_open\n");

sp->rx_buf_sz = IPG_RXSUPPORT_SIZE;
sp->rx_buf_sz = sp->rxsupport_size;

/* Check for interrupt line conflicts, and request interrupt
* line for IPG.
Expand Down Expand Up @@ -2237,6 +2237,7 @@ static int __devinit ipg_probe(struct pci_dev *pdev,

sp->is_jumbo = IPG_JUMBO;
sp->rxfrag_size = IPG_RXFRAG_SIZE;
sp->rxsupport_size = IPG_RXSUPPORT_SIZE;

/* Declare IPG NIC functions for Ethernet device methods.
*/
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ipg.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ struct ipg_nic_private {
bool is_jumbo;
struct ipg_jumbo jumbo;
unsigned long rxfrag_size;
unsigned long rxsupport_size;
unsigned int rx_buf_sz;
struct pci_dev *pdev;
struct net_device *dev;
Expand Down

0 comments on commit b268da3

Please sign in to comment.