aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-09-26 14:57:40 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-27 17:56:31 -0400
commit9fa1b1f33c4cbbe0ba7c0c166d170faaa735e53d (patch)
tree221112a5eb57ed0a190d760477714cf23be19798
parentc2716fb407ebaab7a09888cc8e4a2b9dfac20416 (diff)
[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>
-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,
3349 if (!dev) 3349 if (!dev)
3350 goto err_out_free_pci; 3350 goto err_out_free_pci;
3351 3351
3352 if (!disable_msi && pci_enable_msi(pdev) == 0) {
3353 err = sky2_test_msi(hw);
3354 if (err == -EOPNOTSUPP)
3355 pci_disable_msi(pdev);
3356 else if (err)
3357 goto err_out_free_netdev;
3358 }
3359
3352 err = register_netdev(dev); 3360 err = register_netdev(dev);
3353 if (err) { 3361 if (err) {
3354 printk(KERN_ERR PFX "%s: cannot register net device\n", 3362 printk(KERN_ERR PFX "%s: cannot register net device\n",
@@ -3356,6 +3364,14 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
3356 goto err_out_free_netdev; 3364 goto err_out_free_netdev;
3357 } 3365 }
3358 3366
3367 err = request_irq(pdev->irq, sky2_intr, IRQF_SHARED, dev->name, hw);
3368 if (err) {
3369 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
3370 pci_name(pdev), pdev->irq);
3371 goto err_out_unregister;
3372 }
3373 sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
3374
3359 sky2_show_addr(dev); 3375 sky2_show_addr(dev);
3360 3376
3361 if (hw->ports > 1 && (dev1 = sky2_init_netdev(hw, 1, using_dac))) { 3377 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,
3370 } 3386 }
3371 } 3387 }
3372 3388
3373 if (!disable_msi && pci_enable_msi(pdev) == 0) {
3374 err = sky2_test_msi(hw);
3375 if (err == -EOPNOTSUPP)
3376 pci_disable_msi(pdev);
3377 else if (err)
3378 goto err_out_unregister;
3379 }
3380
3381 err = request_irq(pdev->irq, sky2_intr, IRQF_SHARED, DRV_NAME, hw);
3382 if (err) {
3383 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
3384 pci_name(pdev), pdev->irq);
3385 goto err_out_unregister;
3386 }
3387
3388 sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
3389
3390 setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw); 3389 setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw);
3391 sky2_idle_start(hw); 3390 sky2_idle_start(hw);
3392 3391
@@ -3396,10 +3395,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
3396 3395
3397err_out_unregister: 3396err_out_unregister:
3398 pci_disable_msi(pdev); 3397 pci_disable_msi(pdev);
3399 if (dev1) {
3400 unregister_netdev(dev1);
3401 free_netdev(dev1);
3402 }
3403 unregister_netdev(dev); 3398 unregister_netdev(dev);
3404err_out_free_netdev: 3399err_out_free_netdev:
3405 free_netdev(dev); 3400 free_netdev(dev);