Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2002 16:00:39 +0200 (CEST)
From:      Aurelien Nephtali <aurelien.nephtali@wanadoo.fr>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/41580: usb(4) manpage: Structures' fields aren't synchronized with those in dev/usb/usb.h
Message-ID:  <200208121400.g7CE0dY1001617@nebula.wanadoo.fr>

next in thread | raw e-mail | index | archive | help

>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:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 12 07:10:01 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208121400.g7CE0dY1001617>