X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Fips.h;h=24123d537c5859be2b76e58bcbb2f18037a2dc0a;hb=39bd962269f0f10ba890aea4769693f8f9a3cb47;hp=34680f3dd4523e10662aa03f6605478c2a72b262;hpb=1516b55d903a5d370859d9013e48db5caea95204;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h index 34680f3dd45..24123d537c5 100644 --- a/drivers/scsi/ips.h +++ b/drivers/scsi/ips.h @@ -51,16 +51,13 @@ #define _IPS_H_ #include +#include #include #include /* * Some handy macros */ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined CONFIG_HIGHIO - #define IPS_HIGHIO - #endif - #define IPS_HA(x) ((ips_ha_t *) x->hostdata) #define IPS_COMMAND_ID(ha, scb) (int) (scb - ha->scbs) #define IPS_IS_TROMBONE(ha) (((ha->device_id == IPS_DEVICEID_COPPERHEAD) && \ @@ -83,42 +80,14 @@ #define IPS_SGLIST_SIZE(ha) (IPS_USE_ENH_SGLIST(ha) ? \ sizeof(IPS_ENH_SG_LIST) : sizeof(IPS_STD_SG_LIST)) - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4) - #define pci_set_dma_mask(dev,mask) ( mask > 0xffffffff ? 1:0 ) - #define scsi_set_pci_device(sh,dev) (0) - #endif - - #ifndef IRQ_NONE - typedef void irqreturn_t; - #define IRQ_NONE - #define IRQ_HANDLED - #define IRQ_RETVAL(x) - #endif - - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - #define IPS_REGISTER_HOSTS(SHT) scsi_register_module(MODULE_SCSI_HA,SHT) - #define IPS_UNREGISTER_HOSTS(SHT) scsi_unregister_module(MODULE_SCSI_HA,SHT) - #define IPS_ADD_HOST(shost,device) - #define IPS_REMOVE_HOST(shost) - #define IPS_SCSI_SET_DEVICE(sh,ha) scsi_set_pci_device(sh, (ha)->pcidev) - #define IPS_PRINTK(level, pcidev, format, arg...) \ - printk(level "%s %s:" format , "ips" , \ - (pcidev)->slot_name , ## arg) - #define scsi_host_alloc(sh,size) scsi_register(sh,size) - #define scsi_host_put(sh) scsi_unregister(sh) - #else - #define IPS_REGISTER_HOSTS(SHT) (!ips_detect(SHT)) - #define IPS_UNREGISTER_HOSTS(SHT) - #define IPS_ADD_HOST(shost,device) do { scsi_add_host(shost,device); scsi_scan_host(shost); } while (0) - #define IPS_REMOVE_HOST(shost) scsi_remove_host(shost) - #define IPS_SCSI_SET_DEVICE(sh,ha) do { } while (0) - #define IPS_PRINTK(level, pcidev, format, arg...) \ + #define IPS_PRINTK(level, pcidev, format, arg...) \ dev_printk(level , &((pcidev)->dev) , format , ## arg) - #endif - #ifndef MDELAY - #define MDELAY mdelay - #endif + #define MDELAY(n) \ + do { \ + mdelay(n); \ + touch_nmi_watchdog(); \ + } while (0) #ifndef min #define min(x,y) ((x) < (y) ? x : y) @@ -131,7 +100,7 @@ #define pci_dma_hi32(a) ((a >> 16) >> 16) #define pci_dma_lo32(a) (a & 0xffffffff) - #if (BITS_PER_LONG > 32) || (defined CONFIG_HIGHMEM64G && defined IPS_HIGHIO) + #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G) #define IPS_ENABLE_DMA64 (1) #else #define IPS_ENABLE_DMA64 (0) @@ -448,16 +417,10 @@ /* * Scsi_Host Template */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - static int ips_proc24_info(char *, char **, off_t, int, int, int); - static void ips_select_queue_depth(struct Scsi_Host *, struct scsi_device *); - static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]); -#else static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int); static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]); static int ips_slave_configure(struct scsi_device *SDptr); -#endif /* * Raid Command Formats