aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ips.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ips.h')
-rw-r--r--drivers/scsi/ips.h44
1 files changed, 2 insertions, 42 deletions
diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h
index b726dcc424b1..24123d537c58 100644
--- a/drivers/scsi/ips.h
+++ b/drivers/scsi/ips.h
@@ -58,10 +58,6 @@
58 /* 58 /*
59 * Some handy macros 59 * Some handy macros
60 */ 60 */
61 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined CONFIG_HIGHIO
62 #define IPS_HIGHIO
63 #endif
64
65 #define IPS_HA(x) ((ips_ha_t *) x->hostdata) 61 #define IPS_HA(x) ((ips_ha_t *) x->hostdata)
66 #define IPS_COMMAND_ID(ha, scb) (int) (scb - ha->scbs) 62 #define IPS_COMMAND_ID(ha, scb) (int) (scb - ha->scbs)
67 #define IPS_IS_TROMBONE(ha) (((ha->device_id == IPS_DEVICEID_COPPERHEAD) && \ 63 #define IPS_IS_TROMBONE(ha) (((ha->device_id == IPS_DEVICEID_COPPERHEAD) && \
@@ -84,38 +80,8 @@
84 #define IPS_SGLIST_SIZE(ha) (IPS_USE_ENH_SGLIST(ha) ? \ 80 #define IPS_SGLIST_SIZE(ha) (IPS_USE_ENH_SGLIST(ha) ? \
85 sizeof(IPS_ENH_SG_LIST) : sizeof(IPS_STD_SG_LIST)) 81 sizeof(IPS_ENH_SG_LIST) : sizeof(IPS_STD_SG_LIST))
86 82
87 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4) 83 #define IPS_PRINTK(level, pcidev, format, arg...) \
88 #define pci_set_dma_mask(dev,mask) ( mask > 0xffffffff ? 1:0 )
89 #define scsi_set_pci_device(sh,dev) (0)
90 #endif
91
92 #ifndef IRQ_NONE
93 typedef void irqreturn_t;
94 #define IRQ_NONE
95 #define IRQ_HANDLED
96 #define IRQ_RETVAL(x)
97 #endif
98
99 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
100 #define IPS_REGISTER_HOSTS(SHT) scsi_register_module(MODULE_SCSI_HA,SHT)
101 #define IPS_UNREGISTER_HOSTS(SHT) scsi_unregister_module(MODULE_SCSI_HA,SHT)
102 #define IPS_ADD_HOST(shost,device)
103 #define IPS_REMOVE_HOST(shost)
104 #define IPS_SCSI_SET_DEVICE(sh,ha) scsi_set_pci_device(sh, (ha)->pcidev)
105 #define IPS_PRINTK(level, pcidev, format, arg...) \
106 printk(level "%s %s:" format , "ips" , \
107 (pcidev)->slot_name , ## arg)
108 #define scsi_host_alloc(sh,size) scsi_register(sh,size)
109 #define scsi_host_put(sh) scsi_unregister(sh)
110 #else
111 #define IPS_REGISTER_HOSTS(SHT) (!ips_detect(SHT))
112 #define IPS_UNREGISTER_HOSTS(SHT)
113 #define IPS_ADD_HOST(shost,device) do { scsi_add_host(shost,device); scsi_scan_host(shost); } while (0)
114 #define IPS_REMOVE_HOST(shost) scsi_remove_host(shost)
115 #define IPS_SCSI_SET_DEVICE(sh,ha) do { } while (0)
116 #define IPS_PRINTK(level, pcidev, format, arg...) \
117 dev_printk(level , &((pcidev)->dev) , format , ## arg) 84 dev_printk(level , &((pcidev)->dev) , format , ## arg)
118 #endif
119 85
120 #define MDELAY(n) \ 86 #define MDELAY(n) \
121 do { \ 87 do { \
@@ -134,7 +100,7 @@
134 #define pci_dma_hi32(a) ((a >> 16) >> 16) 100 #define pci_dma_hi32(a) ((a >> 16) >> 16)
135 #define pci_dma_lo32(a) (a & 0xffffffff) 101 #define pci_dma_lo32(a) (a & 0xffffffff)
136 102
137 #if (BITS_PER_LONG > 32) || (defined CONFIG_HIGHMEM64G && defined IPS_HIGHIO) 103 #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
138 #define IPS_ENABLE_DMA64 (1) 104 #define IPS_ENABLE_DMA64 (1)
139 #else 105 #else
140 #define IPS_ENABLE_DMA64 (0) 106 #define IPS_ENABLE_DMA64 (0)
@@ -451,16 +417,10 @@
451 /* 417 /*
452 * Scsi_Host Template 418 * Scsi_Host Template
453 */ 419 */
454#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
455 static int ips_proc24_info(char *, char **, off_t, int, int, int);
456 static void ips_select_queue_depth(struct Scsi_Host *, struct scsi_device *);
457 static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]);
458#else
459 static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int); 420 static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
460 static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, 421 static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
461 sector_t capacity, int geom[]); 422 sector_t capacity, int geom[]);
462 static int ips_slave_configure(struct scsi_device *SDptr); 423 static int ips_slave_configure(struct scsi_device *SDptr);
463#endif
464 424
465/* 425/*
466 * Raid Command Formats 426 * Raid Command Formats