summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--linux/src/drivers/net/rtl8139.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b028e52..db0b80f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * linux/src/drivers/net/rtl8139.c (rtl8129_open): Move IRQ
+ initialization after ring initialization.
+
2008-07-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
* linux/dev/include/asm/segment.h (__put_user, __get_user): Add
diff --git a/linux/src/drivers/net/rtl8139.c b/linux/src/drivers/net/rtl8139.c
index 1d00f68..e97c905 100644
--- a/linux/src/drivers/net/rtl8139.c
+++ b/linux/src/drivers/net/rtl8139.c
@@ -705,10 +705,6 @@ static int rtl8129_open(struct net_device *dev)
int rx_buf_len_idx;
MOD_INC_USE_COUNT;
- if (request_irq(dev->irq, &rtl8129_interrupt, SA_SHIRQ, dev->name, dev)) {
- MOD_DEC_USE_COUNT;
- return -EAGAIN;
- }
/* The Rx ring allocation size is 2^N + delta, which is worst-case for
the kernel binary-buddy allocation. We allocate the Tx bounce buffers
@@ -737,6 +733,11 @@ static int rtl8129_open(struct net_device *dev)
tp->rx_config =
(RX_FIFO_THRESH << 13) | (rx_buf_len_idx << 11) | (RX_DMA_BURST<<8);
+ if (request_irq(dev->irq, &rtl8129_interrupt, SA_SHIRQ, dev->name, dev)) {
+ MOD_DEC_USE_COUNT;
+ return -EAGAIN;
+ }
+
rtl_hw_start(dev);
netif_start_tx_queue(dev);