iPXE
Data Structures | Macros | Functions
usbblk.h File Reference

USB mass storage driver. More...

#include <stdint.h>
#include <ipxe/usb.h>
#include <ipxe/scsi.h>
#include <ipxe/interface.h>

Go to the source code of this file.

Data Structures

struct  usbblk_command_wrapper
 Command block wrapper. More...
 
struct  usbblk_status_wrapper
 Command status wrapper. More...
 
struct  usbblk_command
 A USB mass storage command. More...
 
struct  usbblk_device
 A USB mass storage device. More...
 

Macros

#define USB_CLASS_MSC   0x08
 Mass storage class code. More...
 
#define USB_SUBCLASS_MSC_SCSI   0x06
 SCSI command set subclass code. More...
 
#define USB_PROTOCOL_MSC_BULK   0x50
 Bulk-only transport protocol. More...
 
#define USBBLK_RESET
 Mass storage reset command. More...
 
#define USBBLK_COMMAND_SIGNATURE   0x43425355UL
 Command block wrapper signature. More...
 
#define USBBLK_STATUS_SIGNATURE   0x53425355UL
 Command status wrapper signature. More...
 
#define USBBLK_TAG_MAGIC   0x18ae0000
 Command tag magic. More...
 
#define USBBLK_MAX_LEN   2048
 Maximum length of USB data block. More...
 
#define USBBLK_MAX_FILL   4
 Maximum endpoint fill level. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 

Detailed Description

USB mass storage driver.

Definition in file usbblk.h.

Macro Definition Documentation

◆ USB_CLASS_MSC

#define USB_CLASS_MSC   0x08

Mass storage class code.

Definition at line 18 of file usbblk.h.

◆ USB_SUBCLASS_MSC_SCSI

#define USB_SUBCLASS_MSC_SCSI   0x06

SCSI command set subclass code.

Definition at line 21 of file usbblk.h.

◆ USB_PROTOCOL_MSC_BULK

#define USB_PROTOCOL_MSC_BULK   0x50

Bulk-only transport protocol.

Definition at line 24 of file usbblk.h.

◆ USBBLK_RESET

#define USBBLK_RESET
Value:
USB_REQUEST_TYPE ( 255 ) )
#define USB_RECIP_INTERFACE
Request recipient is an interface.
Definition: usb.h:101
#define USB_DIR_OUT
Data transfer is from host to device.
Definition: usb.h:80
#define USB_TYPE_CLASS
Class-specific request type.
Definition: usb.h:89

Mass storage reset command.

Definition at line 27 of file usbblk.h.

◆ USBBLK_COMMAND_SIGNATURE

#define USBBLK_COMMAND_SIGNATURE   0x43425355UL

Command block wrapper signature.

Definition at line 49 of file usbblk.h.

◆ USBBLK_STATUS_SIGNATURE

#define USBBLK_STATUS_SIGNATURE   0x53425355UL

Command status wrapper signature.

Definition at line 64 of file usbblk.h.

◆ USBBLK_TAG_MAGIC

#define USBBLK_TAG_MAGIC   0x18ae0000

Command tag magic.

This is a policy decision.

Definition at line 107 of file usbblk.h.

◆ USBBLK_MAX_LEN

#define USBBLK_MAX_LEN   2048

Maximum length of USB data block.

This is a policy decision.

Definition at line 113 of file usbblk.h.

◆ USBBLK_MAX_FILL

#define USBBLK_MAX_FILL   4

Maximum endpoint fill level.

This is a policy decision.

Definition at line 119 of file usbblk.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )