On Thu, 10 Apr 2003, Jeffrey Hsu wrote: JH> > I must stop the interface before calling if_detach. JH> JH>The midway driver doesn't do that now anyways, so there's no reason to JH>start now. I have rewritten the midway driver for busdma, to use (more or less correct) locking and build as a module. You must stop the interface in that case to free resource and to ensure, that it has stopped dma-ing. JH> > If I unlock after stoping before detaching, I get a race window JH> > where somebody could just UP the interface. JH> JH>This race is outside the scope of the network driver lock. So what mechanism ensures, that my exported functions (ioctl, start, init) are not called while I'm detaching? Is there such a mechanism or not? JH> > While thinking about, it seems, that having a lock in struct ifnet would JH> > make sense in the long run. How can we otherwise ensure, that nobody is JH> > calling if_ioctl while we are detaching the interface? JH> JH>That's what I had planned. What would that lock do? I mean, which, if any, of the exported driver functions would be called with that lock held? harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt_at_fokus.fraunhofer.de, harti_at_freebsd.orgReceived on Thu Apr 10 2003 - 04:12:47 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:03 UTC