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
18 #include <linux/config.h> /* for CONFIG_SCSI_LOGGING */
20 #include <scsi/scsi_cmnd.h>
21 #include <scsi/scsi_device.h>
22 #include <scsi/scsi_eh.h>
23 #include <scsi/scsi_request.h>
24 #include <scsi/scsi_tcq.h>
25 #include <scsi/scsi.h>
28 * Some defs, in case these are not defined elsewhere.
38 #define SCSI_TIMEOUT (5*HZ)
40 #define SCSI_TIMEOUT (2*HZ)
50 * Prototypes for functions in constants.c
51 * Some of these used to live in constants.h
53 extern void print_Scsi_Cmnd(struct scsi_cmnd *);
54 extern void print_command(unsigned char *);
55 extern void print_sense(const char *, struct scsi_cmnd *);
56 extern void print_req_sense(const char *, struct scsi_request *);
57 extern void print_driverbyte(int scsiresult);
58 extern void print_hostbyte(int scsiresult);
59 extern void print_status(unsigned char status);
60 extern int print_msg(const unsigned char *);
61 extern const char *scsi_sense_key_string(unsigned char);
62 extern const char *scsi_extd_sense_format(unsigned char, unsigned char);
65 * Legacy dma direction interfaces.
67 * This assumes the pci/sbus dma mapping flags have the same numercial
68 * values as the generic dma-mapping ones. Currently they have but there's
69 * no way to check. Better don't use these interfaces!
71 #define SCSI_DATA_UNKNOWN (DMA_BIDIRECTIONAL)
72 #define SCSI_DATA_WRITE (DMA_TO_DEVICE)
73 #define SCSI_DATA_READ (DMA_FROM_DEVICE)
74 #define SCSI_DATA_NONE (DMA_NONE)
76 #define scsi_to_pci_dma_dir(scsi_dir) ((int)(scsi_dir))
77 #define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
80 * This is the crap from the old error handling code. We have it in a special
81 * place so that we can more easily delete it later on.
83 #include "scsi_obsolete.h"
85 /* obsolete typedef junk. */
86 #include "scsi_typedefs.h"