Date: Sun, 4 Jun 2006 18:42:20 +0800 From: "william wallace" <avalonwallace@gmail.com> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-hackers@freebsd.org Subject: Re: misc questions about the device&driver arch Message-ID: <87ab37ab0606040342y55ef91baje8f07d68e1a70464@mail.gmail.com> In-Reply-To: <20060604.043725.778152499.imp@bsdimp.com> References: <87ab37ab0605192239n73b7fcdbtbdd5dbd3f1099fc3@mail.gmail.com> <20060520.013546.104050983.imp@bsdimp.com> <87ab37ab0606040029u67edc35ende0b34e39e80bd37@mail.gmail.com> <20060604.043725.778152499.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/4/06, M. Warner Losh <imp@bsdimp.com> wrote: > In message: <87ab37ab0606040029u67edc35ende0b34e39e80bd37@mail.gmail.com> > : > > > Warner > : Prior to removing a card from the system, two things must occur: > : > : The device's driver must cease accessing the card. > : > : The card must cease generation transaction and interrupts. > : > : How this is accomplished is OS-specific, but the following must take place: > : > : The OS must stop issuing new requests to the device's driver or must > : instruct the driver to stop accepting new requests. > : > : The driver must terminate or complete all outstanding requests. > : > : The card must be disabled from generating interrupts or transactions. > : > : When the OS commands the driver to quiesce itself and its device, the > : OS must not expect the device to remain in the system (in other words, > : it could be removed and not replaced with a similar card). > : > : How to design and implement quiescing in freebsd? > > device_quiesce? I have it in a p4 tree right now. Specifically, it > hooks up to the MOD_UNLOAD with a QUIESCE flag. The driver's > device_quiesce routine gets called, the driver sleeps there until it > knows that it is good, then returns to the caller. Then the driver's > detach routine can be called. > > Warner > where can i get the p4 tree read ,sir -- we who r about to die,salute u!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87ab37ab0606040342y55ef91baje8f07d68e1a70464>