From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../x86/patches-3.3/003-via-rhine-crash-fix.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 target/linux/x86/patches-3.3/003-via-rhine-crash-fix.patch (limited to 'target/linux/x86/patches-3.3/003-via-rhine-crash-fix.patch') diff --git a/target/linux/x86/patches-3.3/003-via-rhine-crash-fix.patch b/target/linux/x86/patches-3.3/003-via-rhine-crash-fix.patch new file mode 100644 index 000000000..26bc380da --- /dev/null +++ b/target/linux/x86/patches-3.3/003-via-rhine-crash-fix.patch @@ -0,0 +1,60 @@ +--- a/drivers/net/ethernet/via/via-rhine.c ++++ b/drivers/net/ethernet/via/via-rhine.c +@@ -689,9 +689,12 @@ static void __devinit rhine_reload_eepro + #ifdef CONFIG_NET_POLL_CONTROLLER + static void rhine_poll(struct net_device *dev) + { +- disable_irq(dev->irq); +- rhine_interrupt(dev->irq, (void *)dev); +- enable_irq(dev->irq); ++ struct rhine_private *rp = netdev_priv(dev); ++ const int irq = rp->pdev->irq; ++ ++ disable_irq(irq); ++ rhine_interrupt(irq, dev); ++ enable_irq(irq); + } + #endif + +@@ -929,7 +932,6 @@ static int __devinit rhine_init_one(stru + dev = alloc_etherdev(sizeof(struct rhine_private)); + if (!dev) { + rc = -ENOMEM; +- dev_err(&pdev->dev, "alloc_etherdev failed\n"); + goto err_out; + } + SET_NETDEV_DEV(dev, &pdev->dev); +@@ -973,7 +975,6 @@ static int __devinit rhine_init_one(stru + } + #endif /* USE_MMIO */ + +- dev->base_addr = (unsigned long)ioaddr; + rp->base = ioaddr; + + /* Get chip registers into a sane state */ +@@ -996,8 +997,6 @@ static int __devinit rhine_init_one(stru + if (!phy_id) + phy_id = ioread8(ioaddr + 0x6C); + +- dev->irq = pdev->irq; +- + spin_lock_init(&rp->lock); + mutex_init(&rp->task_lock); + INIT_WORK(&rp->reset_task, rhine_reset_task); +@@ -1158,7 +1157,6 @@ static void alloc_rbufs(struct net_devic + rp->rx_skbuff[i] = skb; + if (skb == NULL) + break; +- skb->dev = dev; /* Mark as being used by this device. */ + + rp->rx_skbuff_dma[i] = + pci_map_single(rp->pdev, skb->data, rp->rx_buf_sz, +@@ -1943,7 +1941,6 @@ static int rhine_rx(struct net_device *d + rp->rx_skbuff[entry] = skb; + if (skb == NULL) + break; /* Better luck next round. */ +- skb->dev = dev; /* Mark as being used by this device. */ + rp->rx_skbuff_dma[entry] = + pci_map_single(rp->pdev, skb->data, + rp->rx_buf_sz, + -- cgit v1.2.3