X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fncr53c8xx.h;h=adbb47c929610fd21531e1b73d2f5d0bac039ca4;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=b41c6d9df77b6bdb234d4476082372e4527f6b87;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h index b41c6d9df..adbb47c92 100644 --- a/drivers/scsi/ncr53c8xx.h +++ b/drivers/scsi/ncr53c8xx.h @@ -42,10 +42,24 @@ #ifndef NCR53C8XX_H #define NCR53C8XX_H +#include + 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);