VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / scsi / ncr53c8xx.h
index b41c6d9..adbb47c 100644 (file)
 #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 
@@ -53,39 +67,17 @@ typedef     u_long          vm_offset_t;
 **
 **==========================================================
 */
-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;
+};
 
 /*==========================================================
 **
@@ -96,18 +88,13 @@ typedef struct {
 */
 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);