From: Jon S. <jon...@ya...> - 2003-01-27 18:36:39
|
--- Jeff Dike <jd...@ka...> wrote: > Don't you have to handle this case anyway? And if > you do, doesn't that mean > that UML exitcalls don't need to be working? > > If UML abandons a device in an unknown state, can > you just reset it to get > it back to a known state? 1) If UML is shutdown unexpectedly I leave DMA buffers allocated in the host. You will have to take a manual action to free them when you are sure the hardware is reset. 2) If UML is shutdown and runs exitcalls. The hardware drivers receive their shutdown messages. This causes them to shutdown their DMA, free resources, etc. They will call dma_free_coherent() which I map out to the host driver to free the buffers. 3) My PCI support is generic. It works for all possible PCI devices. There is no way for me to know how to reset all possible PCI devices. This is what each drivers' exitcall routine does and why I need to call them. I could leave exitscall out, but then I would never be able to free any DMA buffers in the host. The only time I should free buffers in the host is when I get a dma_free_coherent() call in UML since the drivers won't call this unless the hardware is done with the buffer. The only way to get the drivers to shutdown their hardware is to call exitcalls. ===== Jon Smirl jon...@ya... __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |