From dodell@skik.dtrace.internal.sitetronics.com  Sun Oct  9 20:05:25 2005
Return-Path: <dodell@skik.dtrace.internal.sitetronics.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C416816A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  9 Oct 2005 20:05:25 +0000 (GMT)
	(envelope-from dodell@skik.dtrace.internal.sitetronics.com)
Received: from knight.ixsystems.net (afg.ixsystems.net [206.40.55.73])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 637E543D73
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  9 Oct 2005 20:05:21 +0000 (GMT)
	(envelope-from dodell@skik.dtrace.internal.sitetronics.com)
Received: from skik.dtrace.internal.sitetronics.com (afg.ixsystems.net [206.40.55.73])
	by knight.ixsystems.net (8.12.10/8.11.6) with ESMTP id j99JXeCI057364
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 9 Oct 2005 12:33:44 -0700 (PDT)
	(envelope-from dodell@skik.dtrace.internal.sitetronics.com)
Received: from skik.dtrace.internal.sitetronics.com (localhost [127.0.0.1])
	by skik.dtrace.internal.sitetronics.com (8.13.5/8.13.4) with ESMTP id j99K5afX036751
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 9 Oct 2005 13:05:36 -0700 (PDT)
	(envelope-from dodell@skik.dtrace.internal.sitetronics.com)
Received: (from dodell@localhost)
	by skik.dtrace.internal.sitetronics.com (8.13.5/8.13.4/Submit) id j99K5a3J036750;
	Sun, 9 Oct 2005 13:05:36 -0700 (PDT)
	(envelope-from dodell)
Message-Id: <200510092005.j99K5a3J036750@skik.dtrace.internal.sitetronics.com>
Date: Sun, 9 Oct 2005 13:05:36 -0700 (PDT)
From: "Devon H. O'Dell" <dodell@offmyserver.com>
Reply-To: "Devon H. O'Dell" <dodell@offmyserver.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject:
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         87176
>Category:       docs
>Synopsis:       
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 09 20:10:17 GMT 2005
>Closed-Date:    Fri Nov 04 22:17:37 GMT 2005
>Last-Modified:  Fri Nov 04 22:17:37 GMT 2005
>Originator:     Devon H. O'Dell
>Release:        FreeBSD 7.0-CURRENT amd64
>Organization:
	OffMyServer, Inc.
>Environment:
System: FreeBSD skik.dtrace.internal.sitetronics.com 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Oct 4 13:44:46 PDT 2005 dodell@skik.dtrace.internal.sitetronics.com:/usr/obj/usr/src/sys/SKIK-RD amd64


>Description:
	The device_get_softc(9) manpage incorrectly or ambiguously specifies
	when allocation of the device's softc takes place. My interpretation
	was that it takes place on the call of device_get_softc(9). To the
	contrary, the implementation of device_get_softc simply returns the
	dev->softc field; allocation is automatically done when the device
	attaches.
>How-To-Repeat:
	man 9 device_get_softc	
>Fix:

--- device_get_softc.9.patch begins here ---
--- share/man/man9/device_get_softc.9.old	Sun Oct  9 12:57:20 2005
+++ share/man/man9/device_get_softc.9	Sun Oct  9 12:58:05 2005
@@ -42,8 +42,8 @@
 .Sh DESCRIPTION
 Return the driver-specific state of
 .Fa dev .
-The softc is automatically allocated and zeroed the first
-time it is requested.
+The softc is automatically allocated and zeroed when the
+driver is attached.
 The size of the allocation is determined by the device's
 .Vt driver_t
 information used to define the driver.
--- device_get_softc.9.patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Thu Oct 13 16:58:02 GMT 2005 
State-Changed-Why:  
Committed with some expansion.  The softc is also available during a driver's 
probe routine, but it is only persisent from probe to attach in a particular 
sitation as described in DEVICE_PROBE(9).  Thanks for the report and patch, 
will be merged to 5 and 6 in a few days. 


Responsible-Changed-From-To: freebsd-doc->jhb 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Thu Oct 13 16:58:02 GMT 2005 
Responsible-Changed-Why:  
Committed with some expansion.  The softc is also available during a driver's 
probe routine, but it is only persisent from probe to attach in a particular 
sitation as described in DEVICE_PROBE(9).  Thanks for the report and patch, 
will be merged to 5 and 6 in a few days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87176 
State-Changed-From-To: patched->closed 
State-Changed-By: jhb 
State-Changed-When: Fri Nov 4 22:17:24 GMT 2005 
State-Changed-Why:  
Merged to 5.x and 6.x. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87176 
>Unformatted:
 	[patch] device_get_softc(9) is ambiguous about when allocation takes place
