> -----Original Message----- > From: 'Christoph Hellwig' [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 19, 2007 5:53 PM > > > Putting dual-port issue aside, could you elaborate what is the problem > in > > your opinion in bdx_remove() implementation? What is wrong with calling > > free_netdev() right after unregister_netdev()? Could you provide > pointers > > for docs and examples to correct PCI network device remove interface > > implementation? > > free_netdev can only be called if you're sure you don't reference your > netdevice anymore. Most notably that means you need to call free_irq > first.
In my understanding unregister_netdev(), in case netdev is still IFF_UP and holds irq, will call dev_close() which will call netdev->stop(), bdx_close() in our case. bdx_close() releases all netdev resources among others calls free_irq(). That's why I'm pretty sure that we do not hold any reference to netdev after unregister_netdev() finishes and we can free_netdev() without any worry :) What do you think, does it still look fishy? Alexander Indenbaum - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html