Re: [PATCH][RFC] Converting drivers/net/rcpci45.c to new PCI API

From: Torben Mathiasen (torben@kernel.dk)
Date: Tue Dec 19 2000 - 16:05:30 EST


On Tue, Dec 19 2000, Francois Romieu wrote:

[deleted]

> > - if (pci_enable_device(pdev))
> > - break;
> > - pci_set_master(pdev);
> > + unregister_netdev(dev);
> > + iounmap((void *)dev->base_addr);
> > + free_irq(dev->irq, dev);
>
> I'd rather inhibit irq first then release the ressources.
> + free_irq(dev->irq, dev);
> + iounmap((void *)dev->base_addr);
> + unregister_netdev(dev);
>

You should release the irq when the adapter is closed, not removed,
unless there's some special case that can't be handled if you take
ints during init.

And why would you unregister your netdev after releasing resources?

-- 
Torben Mathiasen <torben@kernel.dk>
Linux ThunderLAN maintainer 
http://tlan.kernel.dk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 23 2000 - 21:00:25 EST