From owner-freebsd-hackers Tue Apr 29 23:32:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA08977 for hackers-outgoing; Tue, 29 Apr 1997 23:32:01 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA08949 for ; Tue, 29 Apr 1997 23:31:51 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id QAA08621; Wed, 30 Apr 1997 16:29:05 +1000 Date: Wed, 30 Apr 1997 16:29:05 +1000 From: Bruce Evans Message-Id: <199704300629.QAA08621@godzilla.zeta.org.au> To: bde@zeta.org.au, msmith@atrad.adelaide.edu.au Subject: Re: Unloading LKMs (was Re: A Desparate Plea for Help...) Cc: hackers@freebsd.org Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> to garbage). Unloading followed by reloading obviously can't work, >> because the driver only initializes the devsw once. > >Um, the driver initialises the devsw on every load, does it not? eg: > >static int >qcam_load (struct lkm_table *lkmtp, int cmd) >{ > if (qcam_probe(&qcam_mod_dev)) { > qcam_attach(&qcam_mod_dev); > > qcam_drvinit(NULL); /* XXX this shouldn't NEED to be here > * the LKM code should be doing this > * for us! */ >... Oops. The only related problem for loading is that errors for initializing the devsw slot are ignored. Bruce