![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0+ */ 0002 /* 0003 * Driver for USB Mass Storage compliant devices 0004 * Debugging Functions Header File 0005 * 0006 * Current development and maintenance by: 0007 * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net) 0008 * 0009 * Initial work by: 0010 * (c) 1999 Michael Gee (michael@linuxspecific.com) 0011 * 0012 * This driver is based on the 'USB Mass Storage Class' document. This 0013 * describes in detail the protocol used to communicate with such 0014 * devices. Clearly, the designers had SCSI and ATAPI commands in 0015 * mind when they created this document. The commands are all very 0016 * similar to commands in the SCSI-II and ATAPI specifications. 0017 * 0018 * It is important to note that in a number of cases this class 0019 * exhibits class-specific exemptions from the USB specification. 0020 * Notably the usage of NAK, STALL and ACK differs from the norm, in 0021 * that they are used to communicate wait, failed and OK on commands. 0022 * 0023 * Also, for certain devices, the interrupt endpoint is used to convey 0024 * status of a command. 0025 */ 0026 0027 #ifndef _DEBUG_H_ 0028 #define _DEBUG_H_ 0029 0030 #include <linux/kernel.h> 0031 0032 #ifdef CONFIG_USB_STORAGE_DEBUG 0033 void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb); 0034 void usb_stor_show_sense(const struct us_data *us, unsigned char key, 0035 unsigned char asc, unsigned char ascq); 0036 __printf(2, 3) void usb_stor_dbg(const struct us_data *us, 0037 const char *fmt, ...); 0038 0039 #define US_DEBUG(x) x 0040 #else 0041 __printf(2, 3) 0042 static inline void _usb_stor_dbg(const struct us_data *us, 0043 const char *fmt, ...) 0044 { 0045 } 0046 #define usb_stor_dbg(us, fmt, ...) \ 0047 do { if (0) _usb_stor_dbg(us, fmt, ##__VA_ARGS__); } while (0) 0048 #define US_DEBUG(x) 0049 #endif 0050 0051 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |