FreeBSD kernel usb device Code
usb_msctest.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  {
  MSC_EJECT_STOPUNIT , MSC_EJECT_REZERO , MSC_EJECT_ZTESTOR , MSC_EJECT_CMOTECH ,
  MSC_EJECT_HUAWEI , MSC_EJECT_HUAWEI2 , MSC_EJECT_TCT
}
 

Functions

int usb_iface_is_cdrom (struct usb_device *udev, uint8_t iface_index)
 
usb_error_t usb_msc_eject (struct usb_device *udev, uint8_t iface_index, int method)
 
usb_error_t usb_msc_auto_quirk (struct usb_device *udev, uint8_t iface_index, const struct usb_attach_arg *uaa)
 
usb_error_t usb_msc_read_10 (struct usb_device *udev, uint8_t iface_index, uint32_t lba, uint32_t blocks, void *buffer)
 
usb_error_t usb_msc_write_10 (struct usb_device *udev, uint8_t iface_index, uint32_t lba, uint32_t blocks, void *buffer)
 
usb_error_t usb_msc_read_capacity (struct usb_device *udev, uint8_t iface_index, uint32_t *lba_last, uint32_t *block_size)
 
usb_error_t usb_dymo_eject (struct usb_device *udev, uint8_t iface_index)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MSC_EJECT_STOPUNIT 
MSC_EJECT_REZERO 
MSC_EJECT_ZTESTOR 
MSC_EJECT_CMOTECH 
MSC_EJECT_HUAWEI 
MSC_EJECT_HUAWEI2 
MSC_EJECT_TCT 

Definition at line 32 of file usb_msctest.h.

Function Documentation

◆ usb_dymo_eject()

usb_error_t usb_dymo_eject ( struct usb_device udev,
uint8_t  iface_index 
)

Definition at line 1030 of file usb_msctest.c.

References bbb_attach(), bbb_detach(), bbb_raw_write(), data, UICLASS_HID, USB_ERR_INVAL, and USB_MS_HZ.

Referenced by usb_probe_and_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usb_iface_is_cdrom()

int usb_iface_is_cdrom ( struct usb_device udev,
uint8_t  iface_index 
)

Definition at line 707 of file usb_msctest.c.

References bbb_transfer::actlen, bbb_attach(), bbb_command_start(), bbb_detach(), bbb_transfer::buffer, DIR_IN, ERR_CSW_FAILED, SCSI_INQ_LEN, scsi_inquiry, UICLASS_MASS, USB_MS_HZ, and usb_pause_mtx().

Referenced by usb_alloc_device().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usb_msc_auto_quirk()

◆ usb_msc_eject()

◆ usb_msc_read_10()

usb_error_t usb_msc_read_10 ( struct usb_device udev,
uint8_t  iface_index,
uint32_t  lba,
uint32_t  blocks,
void *  buffer 
)

Definition at line 1045 of file usb_msctest.c.

References bbb_attach(), bbb_command_start(), bbb_detach(), bbb_transfer::buffer, DIR_IN, SCSI_FIXED_BLOCK_SIZE, UICLASS_MASS, USB_ERR_INVAL, and USB_MS_HZ.

Here is the call graph for this function:

◆ usb_msc_read_capacity()

usb_error_t usb_msc_read_capacity ( struct usb_device udev,
uint8_t  iface_index,
uint32_t *  lba_last,
uint32_t *  block_size 
)

Definition at line 1107 of file usb_msctest.c.

References bbb_attach(), bbb_command_start(), bbb_detach(), bbb_transfer::buffer, DIR_IN, SCSI_FIXED_BLOCK_SIZE, scsi_read_capacity, UICLASS_MASS, USB_ERR_INVAL, and USB_MS_HZ.

Here is the call graph for this function:

◆ usb_msc_write_10()

usb_error_t usb_msc_write_10 ( struct usb_device udev,
uint8_t  iface_index,
uint32_t  lba,
uint32_t  blocks,
void *  buffer 
)

Definition at line 1076 of file usb_msctest.c.

References bbb_attach(), bbb_command_start(), bbb_detach(), bbb_transfer::buffer, DIR_OUT, SCSI_FIXED_BLOCK_SIZE, UICLASS_MASS, USB_ERR_INVAL, and USB_MS_HZ.

Here is the call graph for this function: