Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63729
b: refs/heads/master
c: 76b9cfc
h: refs/heads/master
i:
  63727: 2d6b288
v: v3
  • Loading branch information
Brian King authored and Jeff Garzik committed Aug 7, 2007
1 parent c39dd93 commit f906e45
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 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: c21723edd5f6c288ab613ed658b7140e07fc7209
refs/heads/master: 76b9cfccb39f542ce48a79b9ad50af25e422506c
24 changes: 14 additions & 10 deletions trunk/drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,24 +1280,28 @@ const char * buf, size_t count)
int i;
/* Make sure there is a buffer pool with buffers that
can hold a packet of the size of the MTU */
for(i = 0; i<IbmVethNumBufferPools; i++) {
for (i = 0; i < IbmVethNumBufferPools; i++) {
if (pool == &adapter->rx_buff_pool[i])
continue;
if (!adapter->rx_buff_pool[i].active)
continue;
if (mtu < adapter->rx_buff_pool[i].buff_size) {
pool->active = 0;
h_free_logical_lan_buffer(adapter->
vdev->
unit_address,
pool->
buff_size);
}
if (mtu <= adapter->rx_buff_pool[i].buff_size)
break;
}
if (pool->active) {

if (i == IbmVethNumBufferPools) {
ibmveth_error_printk("no active pool >= MTU\n");
return -EPERM;
}

pool->active = 0;
if (netif_running(netdev)) {
adapter->pool_config = 1;
ibmveth_close(netdev);
adapter->pool_config = 0;
if ((rc = ibmveth_open(netdev)))
return rc;
}
}
} else if (attr == &veth_num_attr) {
if (value <= 0 || value > IBMVETH_MAX_POOL_COUNT)
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/ibmveth.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ static inline long h_send_logical_lan(unsigned long unit_address,
#define h_change_logical_lan_mac(ua, mac) \
plpar_hcall_norets(H_CHANGE_LOGICAL_LAN_MAC, ua, mac)

#define h_free_logical_lan_buffer(ua, bufsize) \
plpar_hcall_norets(H_FREE_LOGICAL_LAN_BUFFER, ua, bufsize)

#define IbmVethNumBufferPools 5
#define IBMVETH_BUFF_OH 22 /* Overhead: 14 ethernet header + 8 opaque handle */
#define IBMVETH_MAX_MTU 68
Expand Down

0 comments on commit f906e45

Please sign in to comment.