summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-09-26 11:57:40 -0700
committerJeff Garzik <jeff@garzik.org>2006-09-27 17:56:31 -0400
commit9fa1b1f33c4cbbe0ba7c0c166d170faaa735e53d (patch)
tree221112a5eb57ed0a190d760477714cf23be19798 /drivers/net
parentc2716fb407ebaab7a09888cc8e4a2b9dfac20416 (diff)
downloadtalos-op-linux-9fa1b1f33c4cbbe0ba7c0c166d170faaa735e53d.tar.gz
talos-op-linux-9fa1b1f33c4cbbe0ba7c0c166d170faaa735e53d.zip
[PATCH] sky2: name irq after eth for irqbalance
Use the ethernet device name when requesting the irq because the irqbalance daemon looks for the name when deciding policy. Better to play along with this dubious heuristic. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sky2.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 00702dd1530e..b908596bd89a 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3349,6 +3349,14 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
if (!dev)
goto err_out_free_pci;
+ if (!disable_msi && pci_enable_msi(pdev) == 0) {
+ err = sky2_test_msi(hw);
+ if (err == -EOPNOTSUPP)
+ pci_disable_msi(pdev);
+ else if (err)
+ goto err_out_free_netdev;
+ }
+
err = register_netdev(dev);
if (err) {
printk(KERN_ERR PFX "%s: cannot register net device\n",
@@ -3356,6 +3364,14 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
goto err_out_free_netdev;
}
+ err = request_irq(pdev->irq, sky2_intr, IRQF_SHARED, dev->name, hw);
+ if (err) {
+ printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
+ pci_name(pdev), pdev->irq);
+ goto err_out_unregister;
+ }
+ sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
+
sky2_show_addr(dev);
if (hw->ports > 1 && (dev1 = sky2_init_netdev(hw, 1, using_dac))) {
@@ -3370,23 +3386,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
}
}
- if (!disable_msi && pci_enable_msi(pdev) == 0) {
- err = sky2_test_msi(hw);
- if (err == -EOPNOTSUPP)
- pci_disable_msi(pdev);
- else if (err)
- goto err_out_unregister;
- }
-
- err = request_irq(pdev->irq, sky2_intr, IRQF_SHARED, DRV_NAME, hw);
- if (err) {
- printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
- pci_name(pdev), pdev->irq);
- goto err_out_unregister;
- }
-
- sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
-
setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw);
sky2_idle_start(hw);
@@ -3396,10 +3395,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
err_out_unregister:
pci_disable_msi(pdev);
- if (dev1) {
- unregister_netdev(dev1);
- free_netdev(dev1);
- }
unregister_netdev(dev);
err_out_free_netdev:
free_netdev(dev);
OpenPOWER on IntegriCloud