From owner-cvs-src@FreeBSD.ORG  Wed Oct 26 17:13:51 2005
Return-Path: <owner-cvs-src@FreeBSD.ORG>
X-Original-To: cvs-src@freebsd.org
Delivered-To: cvs-src@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DBF0716A420;
	Wed, 26 Oct 2005 17:13:51 +0000 (GMT) (envelope-from jhb@freebsd.org)
Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3700D43D49;
	Wed, 26 Oct 2005 17:13:51 +0000 (GMT) (envelope-from jhb@freebsd.org)
Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by
	mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8)
	id <B435fbd3a0001>; Wed, 26 Oct 2005 13:30:34 -0400
From: John Baldwin <jhb@freebsd.org>
To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Date: Wed, 26 Oct 2005 12:58:49 -0400
User-Agent: KMail/1.8.2
References: <200510260617.j9Q6HRqh082376@repoman.freebsd.org>
	<200510261100.55974.jhb@freebsd.org>
	<bb4a86c70510260933h421557eeicfc63569da70bcd0@mail.gmail.com>
In-Reply-To: <bb4a86c70510260933h421557eeicfc63569da70bcd0@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200510261258.51651.jhb@freebsd.org>
Cc: cvs-src@freebsd.org, src-committers@freebsd.org,
	Ruslan Ermilov <ru@freebsd.org>, cvs-all@freebsd.org
Subject: Re: cvs commit: src/sys/netgraph/bluetooth/drivers/bt3c
	ng_bt3c_pccard.c
X-BeenThere: cvs-src@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit messages for the src tree <cvs-src.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/cvs-src>
List-Post: <mailto:cvs-src@freebsd.org>
List-Help: <mailto:cvs-src-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Oct 2005 17:13:52 -0000

On Wednesday 26 October 2005 12:33 pm, Maksim Yevmenkin wrote:
> John,
>
> [...]
>
> > Sorry about that, will be fixing it more cleanly.  BTW, does anyone know
> > why this driver allocates its softc manualn in its attach routine?
>
> ng_bt3c(4) is a netgraph device driver. there could be failures in
> both device part (i/o port, interrupts etc.) as well as in netgraph
> part (could not create node). so decided to do it this way. right now
> i can not recall any other reason :)

Even if netgraph fails then new-bus will still free it for you when attach 
returns ENXIO.  All you have to do is set the size in your driver_t and axe 
the malloc, free, and device_set_softc calls and you should be done.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org