Diff for /src/sys/bus/usb/usb.h between versions 1.3 and 1.4

version 1.3, 2003/08/07 21:16:47 version 1.4, 2003/12/30 01:01:44
Line 1 Line 1
/*        $NetBSD: usb.h,v 1.38 1999/10/20 21:02:39 augustss Exp $ *//*
/*        $FreeBSD: src/sys/dev/usb/usb.h,v 1.17.2.11 2002/11/13 15:15:22 joe Exp $      */ * $NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $
/*        $DragonFly$     */ * $FreeBSD: src/sys/dev/usb/usb.h,v 1.38 2002/11/06 21:37:21 joe Exp $
  * $DragonFly$
  */
   
 /*  /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.   * Copyright (c) 1998 The NetBSD Foundation, Inc.
Line 48 Line 50
   
 #if defined(__NetBSD__) || defined(__OpenBSD__)  #if defined(__NetBSD__) || defined(__OpenBSD__)
 #include <sys/ioctl.h>  #include <sys/ioctl.h>
   #endif
   
 #if defined(_KERNEL)  #if defined(_KERNEL)
 #include "usb_port.h"  #include "usb_port.h"
 #endif /* _KERNEL */  #endif /* _KERNEL */
   
 #elif defined(__FreeBSD__)  
 #if defined(_KERNEL)  
 #include <sys/malloc.h>  
   
 MALLOC_DECLARE(M_USB);  
 MALLOC_DECLARE(M_USBDEV);  
 MALLOC_DECLARE(M_USBHC);  
   
 #include "usb_port.h"  
 #endif /* _KERNEL */  
 #endif /* __FreeBSD__ */  
   
 /* these three defines are used by usbd to autoload the usb kld */  /* these three defines are used by usbd to autoload the usb kld */
#define USB_KLD         "usb"#define USB_KLD         "usb"           /* name of usb module */
 #define USB_UHUB        "usb/uhub"      /* root hub */  #define USB_UHUB        "usb/uhub"      /* root hub */
   
   #define USB_STACK_VERSION 2
   
 #define USB_MAX_DEVICES 128  #define USB_MAX_DEVICES 128
 #define USB_START_ADDR 0  #define USB_START_ADDR 0
   
Line 337  typedef struct { Line 330  typedef struct {
     (((desc)->DeviceRemovable[(i)/8] >> ((i) % 8)) & 1)      (((desc)->DeviceRemovable[(i)/8] >> ((i) % 8)) & 1)
         /* deprecated */ uByte          PortPowerCtrlMask[1];          /* deprecated */ uByte          PortPowerCtrlMask[1];
 } UPACKED usb_hub_descriptor_t;  } UPACKED usb_hub_descriptor_t;
#define USB_HUB_DESCRIPTOR_SIZE 8 /* includes deprecated PortPowerCtrlMask */#define USB_HUB_DESCRIPTOR_SIZE 9 /* includes deprecated PortPowerCtrlMask */
   
 typedef struct {  typedef struct {
         uByte           bLength;          uByte           bLength;
Line 513  typedef struct { Line 506  typedef struct {
 #if 0  #if 0
 /* These are the values from the spec. */  /* These are the values from the spec. */
 #define USB_PORT_RESET_DELAY    10  /* ms */  #define USB_PORT_RESET_DELAY    10  /* ms */
#define USB_PORT_RESET_SETTLE        10  /* ms */#define USB_PORT_ROOT_RESET_DELAY 50  /* ms */
 #define USB_PORT_RESET_RECOVERY        10  /* ms */
 #define USB_PORT_POWERUP_DELAY  100 /* ms */  #define USB_PORT_POWERUP_DELAY  100 /* ms */
 #define USB_SET_ADDRESS_SETTLE  2   /* ms */  #define USB_SET_ADDRESS_SETTLE  2   /* ms */
#define USB_RESUME_TIME            (20*5)  /* ms */#define USB_RESUME_DELAY        (20*5)  /* ms */
 #define USB_RESUME_WAIT         10  /* ms */  #define USB_RESUME_WAIT         10  /* ms */
 #define USB_RESUME_RECOVERY     10  /* ms */  #define USB_RESUME_RECOVERY     10  /* ms */
 #define USB_EXTRA_POWER_UP_TIME 0   /* ms */  #define USB_EXTRA_POWER_UP_TIME 0   /* ms */
 #else  #else
 /* Allow for marginal (i.e. non-conforming) devices. */  /* Allow for marginal (i.e. non-conforming) devices. */
 #define USB_PORT_RESET_DELAY    50  /* ms */  #define USB_PORT_RESET_DELAY    50  /* ms */
#define USB_PORT_RESET_RECOVERY 50  /* ms */#define USB_PORT_ROOT_RESET_DELAY 250  /* ms */
#define USB_PORT_POWERUP_DELAY  200 /* ms */#define USB_PORT_RESET_RECOVERY 250  /* ms */
 #define USB_PORT_POWERUP_DELAY  300 /* ms */
 #define USB_SET_ADDRESS_SETTLE  10  /* ms */  #define USB_SET_ADDRESS_SETTLE  10  /* ms */
 #define USB_RESUME_DELAY        (50*5)  /* ms */  #define USB_RESUME_DELAY        (50*5)  /* ms */
 #define USB_RESUME_WAIT         50  /* ms */  #define USB_RESUME_WAIT         50  /* ms */
Line 616  struct usb_device_info { Line 611  struct usb_device_info {
         u_int8_t        udi_subclass;          u_int8_t        udi_subclass;
         u_int8_t        udi_protocol;          u_int8_t        udi_protocol;
         u_int8_t        udi_config;          u_int8_t        udi_config;
        u_int8_t        udi_lowspeed;        u_int8_t        udi_speed;
 #define USB_SPEED_LOW  1
 #define USB_SPEED_FULL 2
 #define USB_SPEED_HIGH 3
         int             udi_power;      /* power consumption in mA, 0 if selfpowered */          int             udi_power;      /* power consumption in mA, 0 if selfpowered */
         int             udi_nports;          int             udi_nports;
         char            udi_devnames[USB_MAX_DEVNAMES][USB_MAX_DEVNAMELEN];          char            udi_devnames[USB_MAX_DEVNAMES][USB_MAX_DEVNAMELEN];

Removed from v.1.3  
changed lines
  Added in v.1.4