#ifndef NCR53C8XX_H
#define NCR53C8XX_H
+#include <scsi/scsi_host.h>
+
typedef u_long vm_offset_t;
#include "sym53c8xx_defs.h"
+/*
+ Build a scatter/gather entry.
+ see sym53c8xx_2/sym_hipd.h for more detailed sym_build_sge()
+ implementation ;)
+ */
+
+#define ncr_build_sge(np, data, badd, len) \
+do { \
+ (data)->addr = cpu_to_scr(badd); \
+ (data)->size = cpu_to_scr(len); \
+} while (0)
+
/*==========================================================
**
** Structures used by the detection routine to transmit
**
**==========================================================
*/
-typedef struct {
- int bus;
- u_char device_fn;
+struct ncr_slot {
u_long base;
u_long base_2;
- u_long io_port;
u_long base_c;
u_long base_2_c;
u_long base_v;
u_long base_2_v;
int irq;
/* port and reg fields to use INB, OUTB macros */
- u_long base_io;
volatile struct ncr_reg *reg;
-} ncr_slot;
-
-/*==========================================================
-**
-** Structure used to store the NVRAM content.
-**
-**==========================================================
-*/
-typedef struct {
- int type;
-#define SCSI_NCR_SYMBIOS_NVRAM (1)
-#define SCSI_NCR_TEKRAM_NVRAM (2)
-#ifdef SCSI_NCR_NVRAM_SUPPORT
- union {
- Symbios_nvram Symbios;
- Tekram_nvram Tekram;
- } data;
-#endif
-} ncr_nvram;
+};
/*==========================================================
**
*/
struct ncr_device {
struct device *dev;
- ncr_slot slot;
- ncr_chip chip;
- ncr_nvram *nvram;
+ struct ncr_slot slot;
+ struct ncr_chip chip;
u_char host_id;
-#ifdef SCSI_NCR_PQS_PDS_SUPPORT
- u_char pqs_pds;
-#endif
- __u8 differential;
- int attach_done;
+ u8 differential;
};
-extern struct Scsi_Host *ncr_attach (Scsi_Host_Template *tpnt, int unit, struct ncr_device *device);
+extern struct Scsi_Host *ncr_attach(struct scsi_host_template *tpnt, int unit, struct ncr_device *device);
extern int ncr53c8xx_release(struct Scsi_Host *host);
irqreturn_t ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs);