![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0+ */ 0002 /* 0003 * Driver for USB Mass Storage compliant devices 0004 * Protocol Functions Header File 0005 * 0006 * Current development and maintenance by: 0007 * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net) 0008 * 0009 * This driver is based on the 'USB Mass Storage Class' document. This 0010 * describes in detail the protocol used to communicate with such 0011 * devices. Clearly, the designers had SCSI and ATAPI commands in 0012 * mind when they created this document. The commands are all very 0013 * similar to commands in the SCSI-II and ATAPI specifications. 0014 * 0015 * It is important to note that in a number of cases this class 0016 * exhibits class-specific exemptions from the USB specification. 0017 * Notably the usage of NAK, STALL and ACK differs from the norm, in 0018 * that they are used to communicate wait, failed and OK on commands. 0019 * 0020 * Also, for certain devices, the interrupt endpoint is used to convey 0021 * status of a command. 0022 */ 0023 0024 #ifndef _PROTOCOL_H_ 0025 #define _PROTOCOL_H_ 0026 0027 /* Protocol handling routines */ 0028 extern void usb_stor_pad12_command(struct scsi_cmnd*, struct us_data*); 0029 extern void usb_stor_ufi_command(struct scsi_cmnd*, struct us_data*); 0030 extern void usb_stor_transparent_scsi_command(struct scsi_cmnd*, 0031 struct us_data*); 0032 0033 /* struct scsi_cmnd transfer buffer access utilities */ 0034 enum xfer_buf_dir {TO_XFER_BUF, FROM_XFER_BUF}; 0035 0036 extern unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, 0037 unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **, 0038 unsigned int *offset, enum xfer_buf_dir dir); 0039 0040 extern void usb_stor_set_xfer_buf(unsigned char *buffer, 0041 unsigned int buflen, struct scsi_cmnd *srb); 0042 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |