source: mainline/uspace/drv/block/usbmast/scsi_ms.h@ 9bfa8c8

Last change on this file since 9bfa8c8 was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Replace some license headers with SPDX identifier

Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * SPDX-FileCopyrightText: 2011 Vojtech Horky
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/** @addtogroup drvusbmast
8 * @{
9 */
10/** @file
11 * SCSI functions for USB mass storage.
12 */
13
14#ifndef USB_USBMAST_SCSI_MS_H_
15#define USB_USBMAST_SCSI_MS_H_
16
17#include <scsi/spc.h>
18#include <stddef.h>
19#include <stdint.h>
20#include <usb/usb.h>
21#include <usb/dev/driver.h>
22
23/** Result of SCSI Inquiry command.
24 * This is already parsed structure, not the original buffer returned by
25 * the device.
26 */
27typedef struct {
28 /** SCSI peripheral device type */
29 unsigned device_type;
30 /** Whether the device is removable */
31 bool removable;
32 /** Vendor ID string */
33 char vendor[SCSI_INQ_VENDOR_STR_BUFSIZE];
34 /** Product ID string */
35 char product[SCSI_INQ_PRODUCT_STR_BUFSIZE];
36 /** Revision string */
37 char revision[SCSI_INQ_REVISION_STR_BUFSIZE];
38} usbmast_inquiry_data_t;
39
40extern errno_t usbmast_inquiry(usbmast_fun_t *, usbmast_inquiry_data_t *);
41extern errno_t usbmast_request_sense(usbmast_fun_t *, void *, size_t);
42extern errno_t usbmast_read_capacity(usbmast_fun_t *, uint32_t *, uint32_t *);
43extern errno_t usbmast_read(usbmast_fun_t *, uint64_t, size_t, void *);
44extern errno_t usbmast_write(usbmast_fun_t *, uint64_t, size_t, const void *);
45extern errno_t usbmast_sync_cache(usbmast_fun_t *, uint64_t, size_t);
46extern const char *usbmast_scsi_dev_type_str(unsigned);
47
48#endif
49
50/**
51 * @}
52 */
Note: See TracBrowser for help on using the repository browser.