~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to include/grub/usbtrans.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  int size;
38
38
  int toggle;
39
39
  grub_transfer_type_t pid;
40
 
  char *data;
 
40
  grub_uint32_t data;
 
41
  grub_size_t preceding;
41
42
};
42
43
typedef struct grub_usb_transaction *grub_usb_transaction_t;
43
44
 
55
56
 
56
57
  grub_transaction_type_t type;
57
58
 
 
59
  grub_transfer_type_t dir;
 
60
 
58
61
  struct grub_usb_device *dev;
59
62
 
60
63
  struct grub_usb_transaction *transactions;
 
64
  
 
65
  int last_trans;
 
66
  /* Index of last processed transaction in OHCI/UHCI driver. */
 
67
 
 
68
  void *controller_data;
 
69
 
 
70
  /* Used when finishing transfer to copy data back.  */
 
71
  struct grub_pci_dma_chunk *data_chunk;
 
72
  void *data;
61
73
};
62
74
typedef struct grub_usb_transfer *grub_usb_transfer_t;
63
75
 
64
76
 
65
 
#define GRUB_USB_REQTYPE_IN             (1 << 7)
66
 
#define GRUB_USB_REQTYPE_OUT            (0 << 7)
67
 
#define GRUB_USB_REQTYPE_STANDARD       (0 << 5)
68
 
#define GRUB_USB_REQTYPE_CLASS          (1 << 5)
69
 
#define GRUB_USB_REQTYPE_VENDOR         (2 << 5)
70
 
#define GRUB_USB_REQTYPE_TARGET_DEV     (0 << 0)
71
 
#define GRUB_USB_REQTYPE_TARGET_INTERF  (1 << 0)
72
 
#define GRUB_USB_REQTYPE_TARGET_ENDP    (2 << 0)
73
 
#define GRUB_USB_REQTYPE_TARGET_OTHER   (3 << 0)
74
 
 
75
 
#define GRUB_USB_REQ_GET_STATUS         0x00
76
 
#define GRUB_USB_REQ_CLEAR_FEATURE      0x01
77
 
#define GRUB_USB_REQ_SET_FEATURE        0x03
78
 
#define GRUB_USB_REQ_SET_ADDRESS        0x05
79
 
#define GRUB_USB_REQ_GET_DESCRIPTOR     0x06
80
 
#define GRUB_USB_REQ_SET_DESCRIPTOR     0x07
81
 
#define GRUB_USB_REQ_GET_CONFIGURATION  0x08
82
 
#define GRUB_USB_REQ_SET_CONFIGURATION  0x09
83
 
#define GRUB_USB_REQ_GET_INTERFACE      0x0A
84
 
#define GRUB_USB_REQ_SET_INTERFACE      0x0B
85
 
#define GRUB_USB_REQ_SYNC_FRAME         0x0C
86
 
 
87
 
#define GRUB_USB_REQ_HUB_GET_PORT_STATUS 0x00
88
 
 
89
 
#define GRUB_USB_FEATURE_ENDP_HALT      0x01
90
 
#define GRUB_USB_FEATURE_DEV_REMOTE_WU  0x02
91
 
#define GRUB_USB_FEATURE_TEST_MODE      0x04
92
 
 
93
 
#define GRUB_USB_HUB_STATUS_CONNECTED   (1 << 0)
94
 
#define GRUB_USB_HUB_STATUS_LOWSPEED    (1 << 9)
95
 
#define GRUB_USB_HUB_STATUS_HIGHSPEED   (1 << 10)
 
77
 
 
78
enum
 
79
  {
 
80
    GRUB_USB_REQTYPE_TARGET_DEV = (0 << 0),
 
81
    GRUB_USB_REQTYPE_TARGET_INTERF = (1 << 0),
 
82
    GRUB_USB_REQTYPE_TARGET_ENDP = (2 << 0),
 
83
    GRUB_USB_REQTYPE_TARGET_OTHER = (3 << 0),
 
84
    GRUB_USB_REQTYPE_STANDARD = (0 << 5),
 
85
    GRUB_USB_REQTYPE_CLASS = (1 << 5),
 
86
    GRUB_USB_REQTYPE_VENDOR = (2 << 5),
 
87
    GRUB_USB_REQTYPE_OUT = (0 << 7),
 
88
    GRUB_USB_REQTYPE_IN = (1 << 7),
 
89
    GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT = GRUB_USB_REQTYPE_TARGET_INTERF
 
90
    | GRUB_USB_REQTYPE_CLASS | GRUB_USB_REQTYPE_OUT,
 
91
    GRUB_USB_REQTYPE_VENDOR_OUT = GRUB_USB_REQTYPE_VENDOR | GRUB_USB_REQTYPE_OUT,
 
92
    GRUB_USB_REQTYPE_CLASS_INTERFACE_IN = GRUB_USB_REQTYPE_TARGET_INTERF
 
93
    | GRUB_USB_REQTYPE_CLASS | GRUB_USB_REQTYPE_IN,
 
94
    GRUB_USB_REQTYPE_VENDOR_IN = GRUB_USB_REQTYPE_VENDOR | GRUB_USB_REQTYPE_IN
 
95
  };
 
96
 
 
97
enum
 
98
  {
 
99
    GRUB_USB_REQ_GET_STATUS = 0x00,
 
100
    GRUB_USB_REQ_CLEAR_FEATURE = 0x01,
 
101
    GRUB_USB_REQ_SET_FEATURE = 0x03,
 
102
    GRUB_USB_REQ_SET_ADDRESS = 0x05,
 
103
    GRUB_USB_REQ_GET_DESCRIPTOR = 0x06,
 
104
    GRUB_USB_REQ_SET_DESCRIPTOR = 0x07,
 
105
    GRUB_USB_REQ_GET_CONFIGURATION = 0x08,
 
106
    GRUB_USB_REQ_SET_CONFIGURATION = 0x09,
 
107
    GRUB_USB_REQ_GET_INTERFACE = 0x0A,
 
108
    GRUB_USB_REQ_SET_INTERFACE = 0x0B,
 
109
    GRUB_USB_REQ_SYNC_FRAME = 0x0C
 
110
  };
 
111
 
 
112
#define GRUB_USB_FEATURE_ENDP_HALT      0x00
 
113
#define GRUB_USB_FEATURE_DEV_REMOTE_WU  0x01
 
114
#define GRUB_USB_FEATURE_TEST_MODE      0x02
 
115
 
 
116
enum
 
117
  {
 
118
    GRUB_USB_HUB_FEATURE_PORT_RESET = 0x04,
 
119
    GRUB_USB_HUB_FEATURE_PORT_POWER = 0x08,
 
120
    GRUB_USB_HUB_FEATURE_C_PORT_CONNECTED = 0x10,
 
121
    GRUB_USB_HUB_FEATURE_C_PORT_ENABLED = 0x11,
 
122
    GRUB_USB_HUB_FEATURE_C_PORT_SUSPEND = 0x12,
 
123
    GRUB_USB_HUB_FEATURE_C_PORT_OVERCURRENT = 0x13,
 
124
    GRUB_USB_HUB_FEATURE_C_PORT_RESET = 0x14
 
125
  };
 
126
 
 
127
enum
 
128
  {
 
129
    GRUB_USB_HUB_STATUS_PORT_CONNECTED = (1 << 0),
 
130
    GRUB_USB_HUB_STATUS_PORT_ENABLED = (1 << 1),
 
131
    GRUB_USB_HUB_STATUS_PORT_SUSPEND = (1 << 2),
 
132
    GRUB_USB_HUB_STATUS_PORT_OVERCURRENT = (1 << 3),
 
133
    GRUB_USB_HUB_STATUS_PORT_POWERED = (1 << 8),
 
134
    GRUB_USB_HUB_STATUS_PORT_LOWSPEED = (1 << 9),
 
135
    GRUB_USB_HUB_STATUS_PORT_HIGHSPEED = (1 << 10),
 
136
    GRUB_USB_HUB_STATUS_C_PORT_CONNECTED = (1 << 16),
 
137
    GRUB_USB_HUB_STATUS_C_PORT_ENABLED = (1 << 17),
 
138
    GRUB_USB_HUB_STATUS_C_PORT_SUSPEND = (1 << 18),
 
139
    GRUB_USB_HUB_STATUS_C_PORT_OVERCURRENT = (1 << 19),
 
140
    GRUB_USB_HUB_STATUS_C_PORT_RESET = (1 << 20)
 
141
  };
96
142
 
97
143
struct grub_usb_packet_setup
98
144
{