From owner-freebsd-current@FreeBSD.ORG Mon Jun 14 01:47:50 2004 Return-Path: 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 E3FF416A4CE for ; Mon, 14 Jun 2004 01:47:50 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88B9D43D2F for ; Mon, 14 Jun 2004 01:47:50 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from freebsd.org (junior-wifi.samsco.home [192.168.0.11]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i5E1mpJf003507; Sun, 13 Jun 2004 19:48:51 -0600 (MDT) (envelope-from scottl@freebsd.org) Message-ID: <40CD0345.4060608@freebsd.org> Date: Sun, 13 Jun 2004 19:45:41 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040304 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Doug White References: <20040613181820.H84464@carver.gumbysoft.com> In-Reply-To: <20040613181820.H84464@carver.gumbysoft.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: current@freebsd.org Subject: Re: very rough if_sk fixes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 01:47:51 -0000 Doug White wrote: > Hey all, > > I ran out and bought a Linksys EG1032 today and fixed up some of the > witness warnings and a detach panic. I'm not 100% sure my lock relocation > is totally correct, though, so if someone wants to look at this and tell > me I have no idea what I'm doing, that'd be great. :-) Suggestions > appreciated. In particular I may need to tighten up the locking and > ordering in skc_detach() since I'm not sure if we can take an interrupt in > that context, and it'd be kinda bad to. > > Most of the changes were trivial... too trivial maybe :-) > > I'm also hoarding a copy of this patch at > http://people.freebsd.org/~dwhite/if_sk.c.diff if the attachment doesn't > come through. > > Thanks! > It's typically poor practice to have to hold a driver lock in the probe or attach routines. If there is an apparant need then it needs to be re-examined. A brief look at if_sk shows no real need for the lock to be held in sk_attach(), though the driver appears to heavily abuse newbus so I might be missing something. Scott