]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix suspend/resume support in via-rhine2
authorPavel Machek <pavel@ucw.cz>
Thu, 21 Oct 2004 15:11:45 +0000 (11:11 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 21 Oct 2004 15:11:45 +0000 (11:11 -0400)
If I want via-rhine to work after resume, I need this patch. It stops
interrupts during suspend and reinitializes them after that.

drivers/net/via-rhine.c

index 5a011ee958b9582269882988807bd842c7d371e5..41a97d7185d6d38765dfe6d6c0841f0ab06d1652 100644 (file)
@@ -1957,6 +1957,7 @@ static int rhine_suspend(struct pci_dev *pdev, u32 state)
        rhine_shutdown(&pdev->dev);
        spin_unlock_irqrestore(&rp->lock, flags);
 
+       free_irq(dev->irq, dev);
        return 0;
 }
 
@@ -1970,6 +1971,9 @@ static int rhine_resume(struct pci_dev *pdev)
        if (!netif_running(dev))
                return 0;
 
+        if (request_irq(dev->irq, rhine_interrupt, SA_SHIRQ, dev->name, dev))
+               printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name);
+
        ret = pci_set_power_state(pdev, 0);
        if (debug > 1)
                printk(KERN_INFO "%s: Entering power state D0 %s (%d).\n",