From owner-freebsd-current Wed Mar 19 10:37:47 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2293237B404 for ; Wed, 19 Mar 2003 10:37:46 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 0698A43FB1 for ; Wed, 19 Mar 2003 10:37:42 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 12347 invoked by uid 1000); 19 Mar 2003 18:37:43 -0000 Date: Wed, 19 Mar 2003 10:37:43 -0800 (PST) From: Nate Lawson To: current@freebsd.org Cc: wpaul@freebsd.org Subject: Updated if_* attach/detach patches Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I have updated my patches for: dc pcn rl sf sis sk ste ti tl vr wb xl They have been compile tested but I only have an rl card so I'd appreciate feedback. Patches are at: http://www.root.org/~nate/freebsd/if_pci/ Clean up locking and resource management for pci/if_* - Remove locking of the softc in the attach method, instead depending on ether_ifattach being at the end of attach (delaying interrupt enable) - Call *_detach directly in the error case of attach, depending on checking in detach to only free resources that were allocated. This makes all resource freeing in one place, avoiding thinkos that lead to memory leaks. - dc: move interrupt allocation back where it was before. It was unnecessary to move it - pcn: add missing bzero of softc - rl: move irq allocation before ether_ifattach. Problems could have been caused by allocating the irq after enabling interrupts on the card. - rl: call rl_stop before ether_ifdetach - sf: call sf_stop before ether_ifdetach - sis: add missed free of sis_tag - sis: check errors from tag creation - sk: remove duplicate initialization of sk_dev - ste: add missed bus_generic_detach - ti: call ti_stop before ether_ifdetach - ti: add missed error setting in ti_rdata alloc failure - vr: add missed error setting in I/O, memory mapping cases - wb: add missing bzero of softc - xl: add missed error setting in I/O, memory mapping cases - xl: add missing bzero of softc - xl: remove multi-level goto on attach failure -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message