summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-09-09 06:30:37 +0000
committerThomas Bushnell <thomas@gnu.org>1999-09-09 06:30:37 +0000
commit8ea6c4e694a080b8c4eca00867f83ff8e709aafa (patch)
tree29276af802957ae0a81b1576246c5a40decb78d9 /linux
parentc547af3061d799ad5a787e473ebde0e080eb44fc (diff)
1999-09-09 Thomas Bushnell, BSG <tb@mit.edu>
* linux/src/drivers/net/rtl8139.c (RX_BUF_LEN_IDX): Reduce from 3 to 2. (64K exceeds the limits in linux/dev/glue/kmem.c:kmalloc.) (rtl8129_open): If we fail to get the memory we need, then free the IRQ before returning. Reported by Daniel Kobras <daniel.kobras@student.uni-tuebingen.de>.
Diffstat (limited to 'linux')
-rw-r--r--linux/src/drivers/net/rtl8139.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/src/drivers/net/rtl8139.c b/linux/src/drivers/net/rtl8139.c
index b5c355b..0bd11a5 100644
--- a/linux/src/drivers/net/rtl8139.c
+++ b/linux/src/drivers/net/rtl8139.c
@@ -27,7 +27,7 @@ static const char *version =
static int max_interrupt_work = 10;
/* Size of the in-memory receive ring. */
-#define RX_BUF_LEN_IDX 3 /* 0==8K, 1==16K, 2==32K, 3==64K */
+#define RX_BUF_LEN_IDX 2 /* 0==8K, 1==16K, 2==32K, 3==64K */
#define RX_BUF_LEN (8192 << RX_BUF_LEN_IDX)
/* Size of the Tx bounce buffers -- must be at least (dev->mtu+14+4). */
#define TX_BUF_SIZE 1536
@@ -614,6 +614,7 @@ rtl8129_open(struct device *dev)
tp->tx_bufs = kmalloc(TX_BUF_SIZE * NUM_TX_DESC, GFP_KERNEL);
tp->rx_ring = kmalloc(RX_BUF_LEN + 16, GFP_KERNEL);
if (tp->tx_bufs == NULL || tp->rx_ring == NULL) {
+ free_irq (dev->irq, dev);
if (tp->tx_bufs)
kfree(tp->tx_bufs);
if (rtl8129_debug > 0)