2 May 2009 00:56
RFC: device attachment/detachment
Christoph Egger <Christoph_Egger <at> gmx.de>
2009-05-01 22:56:43 GMT
2009-05-01 22:56:43 GMT
Hi, Drivers attaches in the device tree independent if their attachment function failed or not. The autoconf framework isn't aware of this, because the attachment function doesn't return an error code. dyoung <at> started to work on the drivers to detach the drivers on shutdown/reboot. The drivers' detach function doesn't know if the attachment failed or not. It only can carefully check which resource was allocated and which not and free the allocated ones. Attached patch modifies the driver's attachment function to return an error code, zero for success. I modified all drivers necessary to compile an amd64 GENERIC kernel plus bwi(4). The intended functional change is in subr_autoconf.c, there's no intended functional change in the drivers. The full blown patch (500KB) is at http://www.netbsd.org/~cegger/autoconf.diff bwi(4) attachment always fails on my machine due to lack of Draft-N support in a very early support. W/o the patch 'drvctl -d bwi0' crashes in various places due to assumptions even in MI code. With the patch, bwi0 detaches:(Continue reading)
RSS Feed