2 * scsi.h Copyright (C) 1992 Drew Eckhardt
3 * Copyright (C) 1993, 1994, 1995, 1998, 1999 Eric Youngdale
4 * generic SCSI package header file by
5 * Initial versions: Drew Eckhardt
6 * Subsequent revisions: Eric Youngdale
10 * Modified by Eric Youngdale eric@andante.org to
11 * add scatter-gather, multiple outstanding request, and other
15 * NOTE: this file only contains compatibility glue for old drivers. All
16 * these wrappers will be removed sooner or later. For new code please use
17 * the interfaces declared in the headers in include/scsi/
23 #include <linux/config.h> /* for CONFIG_SCSI_LOGGING */
25 #include <scsi/scsi_cmnd.h>
26 #include <scsi/scsi_dbg.h>
27 #include <scsi/scsi_device.h>
28 #include <scsi/scsi_eh.h>
29 #include <scsi/scsi_request.h>
30 #include <scsi/scsi_tcq.h>
31 #include <scsi/scsi.h>
34 * Some defs, in case these are not defined elsewhere.
50 * Legacy dma direction interfaces.
52 * This assumes the pci/sbus dma mapping flags have the same numercial
53 * values as the generic dma-mapping ones. Currently they have but there's
54 * no way to check. Better don't use these interfaces!
56 #define SCSI_DATA_UNKNOWN (DMA_BIDIRECTIONAL)
57 #define SCSI_DATA_WRITE (DMA_TO_DEVICE)
58 #define SCSI_DATA_READ (DMA_FROM_DEVICE)
59 #define SCSI_DATA_NONE (DMA_NONE)
61 #define scsi_to_pci_dma_dir(scsi_dir) ((int)(scsi_dir))
62 #define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
65 * Old names for debug prettyprinting functions.
67 static inline void print_Scsi_Cmnd(struct scsi_cmnd *cmd)
69 return scsi_print_command(cmd);
71 static inline void print_command(unsigned char *cdb)
73 return __scsi_print_command(cdb);
75 static inline void print_sense(const char *devclass, struct scsi_cmnd *cmd)
77 return scsi_print_sense(devclass, cmd);
79 static inline void print_req_sense(const char *devclass, struct scsi_request *req)
81 return scsi_print_req_sense(devclass, req);
83 static inline void print_driverbyte(int scsiresult)
85 return scsi_print_driverbyte(scsiresult);
87 static inline void print_hostbyte(int scsiresult)
89 return scsi_print_hostbyte(scsiresult);
91 static inline void print_status(unsigned char status)
93 return scsi_print_status(status);
95 static inline int print_msg(const unsigned char *msg)
97 return scsi_print_msg(msg);
101 * This is the crap from the old error handling code. We have it in a special
102 * place so that we can more easily delete it later on.
104 #include "scsi_obsolete.h"
106 /* obsolete typedef junk. */
107 #include "scsi_typedefs.h"