]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h
Fixed unexpected timeout in Usb MassStorage Driver.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMassStorageDxe / UsbMassCbi.h
1 /** @file
2
3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 UsbMassCbi.h
15
16 Abstract:
17
18 Defination for the USB mass storage Control/Bulk/Interrupt transpor.
19
20 Revision History
21
22
23 **/
24
25 #ifndef _EFI_USBMASS_CBI_H_
26 #define _EFI_USBMASS_CBI_H_
27
28 enum {
29 USB_CBI_MAX_PACKET_NUM = 16,
30 USB_CBI_RESET_CMD_LEN = 12,
31
32 //
33 // Usb Cbi retry C/B/I transport times, set by experience
34 //
35 USB_CBI_MAX_RETRY = 3,
36
37 //
38 // Usb Cbi wait device reset complete, set by experience
39 //
40 USB_CBI_RESET_DEVICE_STALL = 50 * USB_MASS_1_MILLISECOND,
41
42 //
43 // Usb Cbi transport timeout, set by experience
44 //
45 USB_CBI_RESET_DEVICE_TIMEOUT = 1 * USB_MASS_1_SECOND,
46 };
47
48 //
49 // Put Interface at the first field is to make it easy to get by Context, which
50 // could be BOT/CBI Protocol instance
51 //
52 typedef struct {
53 EFI_USB_INTERFACE_DESCRIPTOR Interface;
54 EFI_USB_ENDPOINT_DESCRIPTOR *BulkInEndpoint;
55 EFI_USB_ENDPOINT_DESCRIPTOR *BulkOutEndpoint;
56 EFI_USB_ENDPOINT_DESCRIPTOR *InterruptEndpoint;
57 EFI_USB_IO_PROTOCOL *UsbIo;
58 } USB_CBI_PROTOCOL;
59
60 #pragma pack(1)
61 typedef struct {
62 UINT8 Type;
63 UINT8 Value;
64 } USB_CBI_STATUS;
65 #pragma pack()
66
67 extern USB_MASS_TRANSPORT mUsbCbi0Transport;
68 extern USB_MASS_TRANSPORT mUsbCbi1Transport;
69 #endif