Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35194
b: refs/heads/master
c: ccdaa2a
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Aug 29, 2006
1 parent 2fe9d77 commit 001a3b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83c758fabd3589842ebcb3af6b9150ff55bc39aa
refs/heads/master: ccdaa2a9daf4777aa50866a28921153ad837a2be
25 changes: 12 additions & 13 deletions trunk/drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -3343,23 +3343,16 @@ static int __devinit skge_probe(struct pci_dev *pdev,
goto err_out_free_hw;
}

err = request_irq(pdev->irq, skge_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_iounmap;
}
pci_set_drvdata(pdev, hw);

err = skge_reset(hw);
if (err)
goto err_out_free_irq;
goto err_out_iounmap;

printk(KERN_INFO PFX DRV_VERSION " addr 0x%llx irq %d chip %s rev %d\n",
(unsigned long long)pci_resource_start(pdev, 0), pdev->irq,
skge_board_name(hw), hw->chip_rev);

if ((dev = skge_devinit(hw, 0, using_dac)) == NULL)
dev = skge_devinit(hw, 0, using_dac);
if (!dev)
goto err_out_led_off;

if (!is_valid_ether_addr(dev->dev_addr)) {
Expand All @@ -3369,14 +3362,19 @@ static int __devinit skge_probe(struct pci_dev *pdev,
goto err_out_free_netdev;
}


err = register_netdev(dev);
if (err) {
printk(KERN_ERR PFX "%s: cannot register net device\n",
pci_name(pdev));
goto err_out_free_netdev;
}

err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, dev->name, hw);
if (err) {
printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
dev->name, pdev->irq);
goto err_out_unregister;
}
skge_show_addr(dev);

if (hw->ports > 1 && (dev1 = skge_devinit(hw, 1, using_dac))) {
Expand All @@ -3389,15 +3387,16 @@ static int __devinit skge_probe(struct pci_dev *pdev,
free_netdev(dev1);
}
}
pci_set_drvdata(pdev, hw);

return 0;

err_out_unregister:
unregister_netdev(dev);
err_out_free_netdev:
free_netdev(dev);
err_out_led_off:
skge_write16(hw, B0_LED, LED_STAT_OFF);
err_out_free_irq:
free_irq(pdev->irq, hw);
err_out_iounmap:
iounmap(hw->regs);
err_out_free_hw:
Expand Down

0 comments on commit 001a3b5

Please sign in to comment.