protocol.h (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | protocol.h (a00828e9ac62caed7b830d631914d7748817ccd1) |
---|---|
1/* Driver for USB Mass Storage compliant devices 2 * Protocol Functions Header File 3 * 4 * $Id: protocol.h,v 1.4 2001/02/13 07:10:03 mdharm Exp $ 5 * 6 * Current development and maintenance by: 7 * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net) 8 * --- 27 unchanged lines hidden (view full) --- 36 * You should have received a copy of the GNU General Public License along 37 * with this program; if not, write to the Free Software Foundation, Inc., 38 * 675 Mass Ave, Cambridge, MA 02139, USA. 39 */ 40 41#ifndef _PROTOCOL_H_ 42#define _PROTOCOL_H_ 43 | 1/* Driver for USB Mass Storage compliant devices 2 * Protocol Functions Header File 3 * 4 * $Id: protocol.h,v 1.4 2001/02/13 07:10:03 mdharm Exp $ 5 * 6 * Current development and maintenance by: 7 * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net) 8 * --- 27 unchanged lines hidden (view full) --- 36 * You should have received a copy of the GNU General Public License along 37 * with this program; if not, write to the Free Software Foundation, Inc., 38 * 675 Mass Ave, Cambridge, MA 02139, USA. 39 */ 40 41#ifndef _PROTOCOL_H_ 42#define _PROTOCOL_H_ 43 |
44/* Sub Classes */ 45 46#define US_SC_RBC 0x01 /* Typically, flash devices */ 47#define US_SC_8020 0x02 /* CD-ROM */ 48#define US_SC_QIC 0x03 /* QIC-157 Tapes */ 49#define US_SC_UFI 0x04 /* Floppy */ 50#define US_SC_8070 0x05 /* Removable media */ 51#define US_SC_SCSI 0x06 /* Transparent */ 52#define US_SC_ISD200 0x07 /* ISD200 ATA */ 53#define US_SC_MIN US_SC_RBC 54#define US_SC_MAX US_SC_ISD200 55 56#define US_SC_DEVICE 0xff /* Use device's value */ 57 | |
58/* Protocol handling routines */ 59extern void usb_stor_ATAPI_command(struct scsi_cmnd*, struct us_data*); 60extern void usb_stor_qic157_command(struct scsi_cmnd*, struct us_data*); 61extern void usb_stor_ufi_command(struct scsi_cmnd*, struct us_data*); 62extern void usb_stor_transparent_scsi_command(struct scsi_cmnd*, 63 struct us_data*); 64 65/* struct scsi_cmnd transfer buffer access utilities */ 66enum xfer_buf_dir {TO_XFER_BUF, FROM_XFER_BUF}; 67 68extern unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, 69 unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index, 70 unsigned int *offset, enum xfer_buf_dir dir); 71 72extern void usb_stor_set_xfer_buf(unsigned char *buffer, 73 unsigned int buflen, struct scsi_cmnd *srb); 74#endif | 44/* Protocol handling routines */ 45extern void usb_stor_ATAPI_command(struct scsi_cmnd*, struct us_data*); 46extern void usb_stor_qic157_command(struct scsi_cmnd*, struct us_data*); 47extern void usb_stor_ufi_command(struct scsi_cmnd*, struct us_data*); 48extern void usb_stor_transparent_scsi_command(struct scsi_cmnd*, 49 struct us_data*); 50 51/* struct scsi_cmnd transfer buffer access utilities */ 52enum xfer_buf_dir {TO_XFER_BUF, FROM_XFER_BUF}; 53 54extern unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, 55 unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index, 56 unsigned int *offset, enum xfer_buf_dir dir); 57 58extern void usb_stor_set_xfer_buf(unsigned char *buffer, 59 unsigned int buflen, struct scsi_cmnd *srb); 60#endif |