VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / scsi / scsi.h
index fd5c8a3..cb6b5fb 100644 (file)
  *       add scatter-gather, multiple outstanding request, and other
  *       enhancements.
  */
+/*
+ * NOTE:  this file only contains compatibility glue for old drivers.  All
+ * these wrappers will be removed sooner or later.  For new code please use
+ * the interfaces declared in the headers in include/scsi/
+ */
 
 #ifndef _SCSI_H
 #define _SCSI_H
@@ -18,6 +23,7 @@
 #include <linux/config.h>          /* for CONFIG_SCSI_LOGGING */
 
 #include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_request.h>
 #define FALSE 0
 #endif
 
-#ifdef DEBUG
-#define SCSI_TIMEOUT (5*HZ)
-#else
-#define SCSI_TIMEOUT (2*HZ)
-#endif
-
 struct Scsi_Host;
 struct scsi_cmnd;
 struct scsi_device;
 struct scsi_target;
 struct scatterlist;
 
-/*
- * Prototypes for functions in constants.c
- * Some of these used to live in constants.h
- */
-extern void print_Scsi_Cmnd(struct scsi_cmnd *);
-extern void print_command(unsigned char *);
-extern void print_sense(const char *, struct scsi_cmnd *);
-extern void print_req_sense(const char *, struct scsi_request *);
-extern void print_driverbyte(int scsiresult);
-extern void print_hostbyte(int scsiresult);
-extern void print_status(unsigned char status);
-extern int print_msg(const unsigned char *);
-extern const char *scsi_sense_key_string(unsigned char);
-extern const char *scsi_extd_sense_format(unsigned char, unsigned char);
-
 /*
  * Legacy dma direction interfaces.
  *
@@ -76,6 +61,42 @@ extern const char *scsi_extd_sense_format(unsigned char, unsigned char);
 #define scsi_to_pci_dma_dir(scsi_dir)  ((int)(scsi_dir))
 #define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
 
+/*
+ * Old names for debug prettyprinting functions.
+ */
+static inline void print_Scsi_Cmnd(struct scsi_cmnd *cmd)
+{
+       return scsi_print_command(cmd);
+}
+static inline void print_command(unsigned char *cdb)
+{
+       return __scsi_print_command(cdb);
+}
+static inline void print_sense(const char *devclass, struct scsi_cmnd *cmd)
+{
+       return scsi_print_sense(devclass, cmd);
+}
+static inline void print_req_sense(const char *devclass, struct scsi_request *req)
+{
+       return scsi_print_req_sense(devclass, req);
+}
+static inline void print_driverbyte(int scsiresult)
+{
+       return scsi_print_driverbyte(scsiresult);
+}
+static inline void print_hostbyte(int scsiresult)
+{
+       return scsi_print_hostbyte(scsiresult);
+}
+static inline void print_status(unsigned char status)
+{
+       return scsi_print_status(status);
+}
+static inline int print_msg(const unsigned char *msg)
+{
+       return scsi_print_msg(msg);
+}
+
 /*
  * This is the crap from the old error handling code.  We have it in a special
  * place so that we can more easily delete it later on.