fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / scsi / nsp32.h
index eddb950..a976e81 100644 (file)
@@ -16,6 +16,7 @@
 #ifndef _NSP32_H
 #define _NSP32_H
 
+#include <linux/version.h>
 //#define NSP32_DEBUG 9
 
 /*
@@ -499,7 +500,7 @@ typedef struct _nsp32_autoparam {
 #define MSGIN03                        BIT(1)          /* Auto Msg In 03 Flag  */
 
 typedef struct _nsp32_lunt {
-       Scsi_Cmnd       *SCpnt;     /* Current Handling Scsi_Cmnd */
+       struct scsi_cmnd        *SCpnt;     /* Current Handling struct scsi_cmnd */
        unsigned long    save_datp;  /* Save Data Pointer - saved position from initial address */
        int              msgin03;       /* auto msg in 03 flag     */
        unsigned int     sg_num;        /* Total number of SG entries */
@@ -563,11 +564,11 @@ typedef struct _nsp32_hw_data {
        int           IrqNumber;
        int           BaseAddress;
        int           NumAddress;
-       unsigned long MmioAddress;
+       void __iomem *MmioAddress;
 #define NSP32_MMIO_OFFSET 0x0800
        unsigned long MmioLength;
 
-       Scsi_Cmnd *CurrentSC;
+       struct scsi_cmnd *CurrentSC;
 
        struct pci_dev             *Pci;
        const struct pci_device_id *pci_devid;
@@ -605,9 +606,6 @@ typedef struct _nsp32_hw_data {
        unsigned char msginbuf [MSGINBUF_MAX];  /* megin buffer     */
        char          msgin_len;                /* msginbuf length  */
 
-#ifdef CONFIG_PM
-       u32           PciState[16];     /* save PCI state to this area */
-#endif
 } nsp32_hw_data;
 
 /*
@@ -621,47 +619,5 @@ typedef struct _nsp32_hw_data {
 #define REQSACK_TIMEOUT_TIME   10000   /* max wait time for REQ/SACK assertion
                                           or negation, 10000us == 10ms */
 
-/**************************************************************************
- * Compatibility functions
- */
-
-/* for Kernel 2.4 */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
-# define scsi_register_host(template)  scsi_register_module(MODULE_SCSI_HA, template)
-# define scsi_unregister_host(template) scsi_unregister_module(MODULE_SCSI_HA, template)
-# define scsi_host_put(host)            scsi_unregister(host)
-# define pci_name(pci_dev)              ((pci_dev)->slot_name)
-
-typedef void irqreturn_t;
-# define IRQ_NONE      /* */
-# define IRQ_HANDLED   /* */
-# define IRQ_RETVAL(x) /* */
-
-/* This is ad-hoc version of scsi_host_get_next() */
-static inline struct Scsi_Host *scsi_host_get_next(struct Scsi_Host *host)
-{
-       if (host == NULL) {
-               return scsi_hostlist;
-       } else {
-               return host->next;
-       }
-}
-
-/* This is ad-hoc version of scsi_host_hn_get() */
-static inline struct Scsi_Host *scsi_host_hn_get(unsigned short hostno)
-{
-       struct Scsi_Host *host;
-
-       for (host = scsi_host_get_next(NULL); host != NULL;
-            host = scsi_host_get_next(host)) {
-               if (host->host_no == hostno) {
-                       break;
-               }
-       }
-
-       return host;
-}
-#endif
-
 #endif /* _NSP32_H */
 /* end */