aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-08-28 19:19:38 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-29 17:18:31 -0400
commitccdaa2a9daf4777aa50866a28921153ad837a2be (patch)
treed702099a5f17b806b0fe86f2135462df09688a89 /drivers/net
parent83c758fabd3589842ebcb3af6b9150ff55bc39aa (diff)
[PATCH] skge: use ethX for irq assigments
The user level irq balance daemon uses "eth" as a way to distinquish ethernet devices. Also, by using device name it is possible to distinquish different boards. 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/skge.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index e38b178769c2..bcdf9f59607d 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3343,23 +3343,16 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3343 goto err_out_free_hw; 3343 goto err_out_free_hw;
3344 } 3344 }
3345 3345
3346 err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, DRV_NAME, hw);
3347 if (err) {
3348 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
3349 pci_name(pdev), pdev->irq);
3350 goto err_out_iounmap;
3351 }
3352 pci_set_drvdata(pdev, hw);
3353
3354 err = skge_reset(hw); 3346 err = skge_reset(hw);
3355 if (err) 3347 if (err)
3356 goto err_out_free_irq; 3348 goto err_out_iounmap;
3357 3349
3358 printk(KERN_INFO PFX DRV_VERSION " addr 0x%llx irq %d chip %s rev %d\n", 3350 printk(KERN_INFO PFX DRV_VERSION " addr 0x%llx irq %d chip %s rev %d\n",
3359 (unsigned long long)pci_resource_start(pdev, 0), pdev->irq, 3351 (unsigned long long)pci_resource_start(pdev, 0), pdev->irq,
3360 skge_board_name(hw), hw->chip_rev); 3352 skge_board_name(hw), hw->chip_rev);
3361 3353
3362 if ((dev = skge_devinit(hw, 0, using_dac)) == NULL) 3354 dev = skge_devinit(hw, 0, using_dac);
3355 if (!dev)
3363 goto err_out_led_off; 3356 goto err_out_led_off;
3364 3357
3365 if (!is_valid_ether_addr(dev->dev_addr)) { 3358 if (!is_valid_ether_addr(dev->dev_addr)) {
@@ -3369,7 +3362,6 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3369 goto err_out_free_netdev; 3362 goto err_out_free_netdev;
3370 } 3363 }
3371 3364
3372
3373 err = register_netdev(dev); 3365 err = register_netdev(dev);
3374 if (err) { 3366 if (err) {
3375 printk(KERN_ERR PFX "%s: cannot register net device\n", 3367 printk(KERN_ERR PFX "%s: cannot register net device\n",
@@ -3377,6 +3369,12 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3377 goto err_out_free_netdev; 3369 goto err_out_free_netdev;
3378 } 3370 }
3379 3371
3372 err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, dev->name, hw);
3373 if (err) {
3374 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
3375 dev->name, pdev->irq);
3376 goto err_out_unregister;
3377 }
3380 skge_show_addr(dev); 3378 skge_show_addr(dev);
3381 3379
3382 if (hw->ports > 1 && (dev1 = skge_devinit(hw, 1, using_dac))) { 3380 if (hw->ports > 1 && (dev1 = skge_devinit(hw, 1, using_dac))) {
@@ -3389,15 +3387,16 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3389 free_netdev(dev1); 3387 free_netdev(dev1);
3390 } 3388 }
3391 } 3389 }
3390 pci_set_drvdata(pdev, hw);
3392 3391
3393 return 0; 3392 return 0;
3394 3393
3394err_out_unregister:
3395 unregister_netdev(dev);
3395err_out_free_netdev: 3396err_out_free_netdev:
3396 free_netdev(dev); 3397 free_netdev(dev);
3397err_out_led_off: 3398err_out_led_off:
3398 skge_write16(hw, B0_LED, LED_STAT_OFF); 3399 skge_write16(hw, B0_LED, LED_STAT_OFF);
3399err_out_free_irq:
3400 free_irq(pdev->irq, hw);
3401err_out_iounmap: 3400err_out_iounmap:
3402 iounmap(hw->regs); 3401 iounmap(hw->regs);
3403err_out_free_hw: 3402err_out_free_hw: