From owner-freebsd-doc Mon Aug 12 7:10:19 2002 Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE76C37B400 for ; Mon, 12 Aug 2002 07:10:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2135D43E77 for ; Mon, 12 Aug 2002 07:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7CEA2JU035710 for ; Mon, 12 Aug 2002 07:10:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7CEA28E035709; Mon, 12 Aug 2002 07:10:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B660537B400 for ; 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 ; 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 ; 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 Reply-To: Aurelien Nephtali To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/41580: usb(4) manpage: Structures' fields aren't synchronized with those in dev/usb/usb.h Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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