From dak@wanadoo.fr  Mon Aug 12 07:03:46 2002
Return-Path: <dak@wanadoo.fr>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B660537B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Aug 2002 07:03:46 -0700 (PDT)
Received: from nebula.wanadoo.fr (ca-sqy-3-86.abo.wanadoo.fr [80.8.56.86])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EB3F143E65
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Aug 2002 07:03:45 -0700 (PDT)
	(envelope-from dak@wanadoo.fr)
Received: from nebula.wanadoo.fr (localhost [127.0.0.1])
	by nebula.wanadoo.fr (8.12.5/8.12.5) with ESMTP id g7CE0drf001618
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Aug 2002 16:00:40 +0200 (CEST)
	(envelope-from dak@nebula.wanadoo.fr)
Received: (from dak@localhost)
	by nebula.wanadoo.fr (8.12.5/8.12.5/Submit) id g7CE0dY1001617;
	Mon, 12 Aug 2002 16:00:39 +0200 (CEST)
Message-Id: <200208121400.g7CE0dY1001617@nebula.wanadoo.fr>
Date: Mon, 12 Aug 2002 16:00:39 +0200 (CEST)
From: Aurelien Nephtali <aurelien.nephtali@wanadoo.fr>
Reply-To: Aurelien Nephtali <aurelien.nephtali@wanadoo.fr>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: usb(4) manpage: Structures' fields aren't synchronized with those in dev/usb/usb.h
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41580
>Category:       docs
>Synopsis:       usb(4) manpage: Structures' fields aren't synchronized with those in dev/usb/usb.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hmp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 12 07:10:01 PDT 2002
>Closed-Date:    Sat May 24 11:33:25 PDT 2003
>Last-Modified:  Sat May 24 11:33:25 PDT 2003
>Originator:     dak
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
none
>Environment:
System: FreeBSD nebula 4.6-STABLE FreeBSD 4.6-STABLE #104: Mon Aug 12 00:51:40 CEST 2002 dak@nebula:/usr/src/sys/compile/nebula i386


	
>Description:
	Fields of 'usb_device_info' and 'usb_device_stats' structures don't match those in dev/usb/usb.h
>How-To-Repeat:
	man 4 usb
>Fix:
	Just apply this (long) patch:
	

--- usb.4.patch begins here ---
--- usb.4.old	Mon Aug 12 15:45:32 2002
+++ usb.4	Mon Aug 12 15:49:00 2002
@@ -171,25 +171,25 @@
 Should no such device exist an error is reported.
 .Bd -literal
 struct usb_device_info {
-        u_int8_t        bus;
-        u_int8_t        addr;
-#       define USBDEVNAME_NR  4
-#       define USBDEVNAME_LEN 10
-        char            devnames[USBDEVNAME_NR][USBDEVNAME_LEN];
-        char            product[USB_MAX_STRING_LEN];
-        char            vendor[USB_MAX_STRING_LEN];
-        char            release[8];
-        u_int16_t       productNo;
-        u_int16_t       vendorNo;
-        u_int16_t       releaseNo;
-        u_int8_t        class;
-        u_int8_t        subclass;
-        u_int8_t        protocol;
-        u_int8_t        config;
-        u_int8_t        lowspeed;
-        int             power;
-        int             nports;
-        u_int8_t        ports[16];
+        u_int8_t        udi_bus;
+        u_int8_t        udi_addr;
+#       define MAXDEVNAMELEN	10
+#       define MAXDEVNAMES	4
+        char            udi_devnames[MAXDEVNAMES][MAXDEVNAMELEN];
+        char            udi_product[USB_MAX_STRING_LEN];
+        char            udi_vendor[USB_MAX_STRING_LEN];
+        char            udi_release[8];
+        u_int16_t       udi_productNo;
+        u_int16_t       udi_vendorNo;
+        u_int16_t       udi_releaseNo;
+        u_int8_t        udi_class;
+        u_int8_t        udi_subclass;
+        u_int8_t        udi_protocol;
+        u_int8_t        udi_config;
+        u_int8_t        udi_lowspeed;
+        int             udi_power;
+        int             udi_nports;
+        u_int8_t        udi_ports[16];
 #define USB_PORT_ENABLED      0xff
 #define USB_PORT_SUSPENDED    0xfe
 #define USB_PORT_POWERED      0xfd
@@ -197,40 +197,40 @@
 };
 .Ed
 .Pp
-.Va bus
+.Va udi_bus
 and
-.Va addr
+.Va udi_addr
 contain the topological information for the device.
-.Va devnames
+.Va udi_devnames
 contains the device names of the connected drivers.
 For example the
 third USB Zip drive connected will be
 .Li umass2 .
 The
-.Va product , vendor
+.Va udi_product , udi_vendor
 and
-.Va release
+.Va udi_release
 fields contain self-explanatory descriptions of the device.
-.Va productNo , vendorNo , releaseNo , class , subclass
+.Va udi_productNo , udi_vendorNo , udi_releaseNo , udi_class , udi_subclass
 and
-.Va protocol
+.Va udi_protocol
 contain the corresponding values from the device descriptors.
 The
-.Va config
+.Va udi_config
 field shows the current configuration of the device.
 .Pp
-.Va lowspeed
+.Va udi_lowspeed
 indicates whether the device is a full speed (0) or low speed (1)
 device.
 The
-.Va power
+.Va udi_power
 field shows the power consumption in milli-amps drawn at 5 volts,
 or zero if the device is self powered.
 .Pp
 If the device is a hub the
-.Va nports
+.Va udi_nports
 field is non-zero and the
-.Va ports
+.Va udi_ports
 field contains the addresses of the connected devices.
 If no device is connected to a port one of the
 .Va USB_PORT_*
@@ -239,12 +239,12 @@
 This command retrieves statistics about the controller.
 .Bd -literal
 struct usb_device_stats {
-        u_long  requests[4];
+        u_long  uds_requests[4];
 };
 .Ed
 .Pp
 The
-.Va requests
+.Va uds_requests
 field is indexed by the transfer kind, i.e.\&
 .Va UE_* ,
 and indicates how many transfers of each kind that has been completed
--- usb.4.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->hmp 
Responsible-Changed-By: hmp 
Responsible-Changed-When: Sun May 18 13:01:10 PDT 2003 
Responsible-Changed-Why:  
I will take a look at this, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41580 
State-Changed-From-To: open->closed 
State-Changed-By: hmp 
State-Changed-When: Sat May 24 11:31:34 PDT 2003 
State-Changed-Why:  
An updated patch has been committed in rev. 1.28.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41580 
>Unformatted:
