Skip to contentSkip to conversation

5/5 ibmveth fix failed addbuf

PATCH New Santiago Leon 1 participant 1 message Oct 25, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 5/5 ibmveth fix failed addbuf

This patch fixes a bug that happens when the hypervisor can't add a buffer. The old code wrote IBM_VETH_INVALID_MAP into the free_map array, so next time the index was used, a ibmveth_assert() caught it and called BUG(). The patch writes the right value into the free_map array so that the index can be reused.

---
drivers/net/ibmveth.c | 2 +-

1 files changed, 1 insertion(+), 1 deletion(-)

---

drivers/net/ibmveth.c 2005-10-17 12:36:13.000000000 -0500 renamed from drivers/net/ibmveth.c 2005-10-17 12:35:13.000000000 -0500 +0 -0
diff -urN a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
@@ -237,7 +237,7 @@

lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc);

if(lpar_rc != H_Success) {
- pool->free_map[free_index] = IBM_VETH_INVALID_MAP;
+ pool->free_map[free_index] = index; pool->skbuff[index] = NULL; pool->consumer_index--; dma_unmap_single(&adapter->vdev->dev,

Signature · 3 lines
Santiago A. Leon
Power Linux Development
IBM Linux Technology Center