public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC] [PATCH 1/9] drivers/scsi/dpt/dpti_i2o.h Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
@ 2006-08-12 21:01 ` Michal Piotrowski
  2006-08-12 21:02 ` [RFC] [PATCH 2/9] drivers/scsi/gdth.c " Michal Piotrowski
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:01 UTC (permalink / raw)
  To: Michal Piotrowski; +Cc: Andrew Morton, James Bottomley, linux-scsi, LKML

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/dpt/dpti_i2o.h linux-work/drivers/scsi/dpt/dpti_i2o.h
--- linux-work-clean/drivers/scsi/dpt/dpti_i2o.h	2006-08-12 01:51:16.000000000 +0200
+++ linux-work/drivers/scsi/dpt/dpti_i2o.h	2006-08-12 20:54:40.000000000 +0200
@@ -47,21 +47,11 @@
  *	I2O Interface Objects
  */

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
-
-#define DECLARE_MUTEX(name) struct semaphore name=MUTEX
-
-typedef struct wait_queue *adpt_wait_queue_head_t;
-#define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) adpt_wait_queue_head_t wait = NULL
-typedef struct wait_queue adpt_wait_queue_t;
-#else
-
 #include <linux/wait.h>
 typedef wait_queue_head_t adpt_wait_queue_head_t;
 #define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) DECLARE_WAIT_QUEUE_HEAD(wait)
 typedef wait_queue_t adpt_wait_queue_t;

-#endif
 /*
  * message structures
  */



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 2/9] drivers/scsi/gdth.c Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
  2006-08-12 21:01 ` [RFC] [PATCH 1/9] drivers/scsi/dpt/dpti_i2o.h Removal of old scsi code Michal Piotrowski
@ 2006-08-12 21:02 ` Michal Piotrowski
  2006-08-12 21:02 ` [RFC] [PATCH 3/9] drivers/scsi/gdth.h " Michal Piotrowski
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:02 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, Achim Leubner

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/gdth.c linux-work/drivers/scsi/gdth.c
--- linux-work-clean/drivers/scsi/gdth.c	2006-08-12 01:51:16.000000000 +0200
+++ linux-work/drivers/scsi/gdth.c	2006-08-12 20:54:01.000000000 +0200
@@ -393,12 +393,7 @@
 #include <linux/proc_fs.h>
 #include <linux/time.h>
 #include <linux/timer.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)
 #include <linux/dma-mapping.h>
-#else
-#define DMA_32BIT_MASK	0x00000000ffffffffULL
-#define DMA_64BIT_MASK	0xffffffffffffffffULL
-#endif

 #ifdef GDTH_RTC
 #include <linux/mc146818rtc.h>
@@ -410,12 +405,7 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <linux/spinlock.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 #include <linux/blkdev.h>
-#else
-#include <linux/blk.h>
-#include "sd.h"
-#endif

 #include "scsi.h"
 #include <scsi/scsi_host.h>
@@ -711,7 +701,6 @@ static void gdth_delay(int milliseconds)
     }
 }

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 static void gdth_scsi_done(struct scsi_cmnd *scp)
 {
     TRACE2(("gdth_scsi_done()\n"));
@@ -749,42 +738,6 @@ int __gdth_execute(struct scsi_device *s
     kfree(scp);
     return rval;
 }
-#else
-static void gdth_scsi_done(Scsi_Cmnd *scp)
-{
-    TRACE2(("gdth_scsi_done()\n"));
-
-    scp->request.rq_status = RQ_SCSI_DONE;
-    if (scp->request.waiting)
-        complete(scp->request.waiting);
-}
-
-int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
-                   int timeout, u32 *info)
-{
-    Scsi_Cmnd *scp = scsi_allocate_device(sdev, 1, FALSE);
-    unsigned bufflen = gdtcmd ? sizeof(gdth_cmd_str) : 0;
-    DECLARE_COMPLETION(wait);
-    int rval;
-
-    if (!scp)
-        return -ENOMEM;
-    scp->cmd_len = 12;
-    scp->use_sg = 0;
-    scp->SCp.this_residual = IOCTL_PRI;   /* priority */
-    scp->request.rq_status = RQ_SCSI_BUSY;
-    scp->request.waiting = &wait;
-    scsi_do_cmd(scp, cmnd, gdtcmd, bufflen, gdth_scsi_done, timeout*HZ, 1);
-    wait_for_completion(&wait);
-
-    rval = scp->SCp.Status;
-    if (info)
-        *info = scp->SCp.Message;
-
-    scsi_release_command(scp);
-    return rval;
-}
-#endif

 int gdth_execute(struct Scsi_Host *shost, gdth_cmd_str *gdtcmd, char *cmnd,
                  int timeout, u32 *info)
@@ -2249,29 +2202,17 @@ static int __init gdth_search_drives(int
         printk("GDT-HA %d: Vendor: %s Name: %s\n",
                hanum,oemstr->text.oem_company_name,ha->binfo.type_string);
         /* Save the Host Drive inquiry data */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
         strlcpy(ha->oem_name,oemstr->text.scsi_host_drive_inquiry_vendor_id,
                 sizeof(ha->oem_name));
-#else
-        strncpy(ha->oem_name,oemstr->text.scsi_host_drive_inquiry_vendor_id,7);
-        ha->oem_name[7] = '\0';
-#endif
     } else {
         /* Old method, based on PCI ID */
         TRACE2(("gdth_search_drives(): CACHE_READ_OEM_STRING_RECORD failed\n"));
         printk("GDT-HA %d: Name: %s\n",
                hanum,ha->binfo.type_string);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
         if (ha->oem_id == OEM_ID_INTEL)
             strlcpy(ha->oem_name,"Intel  ", sizeof(ha->oem_name));
         else
             strlcpy(ha->oem_name,"ICP    ", sizeof(ha->oem_name));
-#else
-        if (ha->oem_id == OEM_ID_INTEL)
-            strcpy(ha->oem_name,"Intel  ");
-        else
-            strcpy(ha->oem_name,"ICP    ");
-#endif
     }

     /* scanning for host drives */
@@ -2680,17 +2621,10 @@ static void gdth_copy_internal_data(int
                 return;
             }
             local_irq_save(flags);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
             address = kmap_atomic(sl->page, KM_BIO_SRC_IRQ) + sl->offset;
             memcpy(address,buffer,cpnow);
             flush_dcache_page(sl->page);
             kunmap_atomic(address, KM_BIO_SRC_IRQ);
-#else
-            address = kmap_atomic(sl->page, KM_BH_IRQ) + sl->offset;
-            memcpy(address,buffer,cpnow);
-            flush_dcache_page(sl->page);
-            kunmap_atomic(address, KM_BH_IRQ);
-#endif
             local_irq_restore(flags);
             if (cpsum == cpcount)
                 break;
@@ -4281,11 +4215,7 @@ int __init option_setup(char *str)
     return 1;
 }

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 static int __init gdth_detect(struct scsi_host_template *shtp)
-#else
-static int __init gdth_detect(Scsi_Host_Template *shtp)
-#endif
 {
     struct Scsi_Host *shp;
     gdth_pci_str pcistr[MAXHA];
@@ -4425,10 +4355,6 @@ static int __init gdth_detect(Scsi_Host_
                     hdr_channel = ha->bus_cnt;
                 ha->virt_bus = hdr_channel;

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) && \
-    LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-                shp->highmem_io  = 0;
-#endif
                 if (ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT)
                     shp->max_cmd_len = 16;

@@ -4549,10 +4475,6 @@ static int __init gdth_detect(Scsi_Host_
                     hdr_channel = ha->bus_cnt;
                 ha->virt_bus = hdr_channel;

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) && \
-    LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-                shp->highmem_io  = 0;
-#endif
                 if (ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT)
                     shp->max_cmd_len = 16;

@@ -4652,10 +4574,6 @@ static int __init gdth_detect(Scsi_Host_
                 hdr_channel = ha->bus_cnt;
             ha->virt_bus = hdr_channel;

-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-            scsi_set_pci_device(shp, pcistr[ctr].pdev);
-#endif
             if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat &GDT_64BIT)||
                 /* 64-bit DMA only supported from FW >= x.43 */
                 (!ha->dma64_support)) {
@@ -4887,11 +4805,7 @@ static int gdth_eh_bus_reset(Scsi_Cmnd *
     return SUCCESS;
 }

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 static int gdth_bios_param(struct scsi_device *sdev,struct block_device *bdev,sector_t cap,int *ip)
-#else
-static int gdth_bios_param(Disk *disk,kdev_t dev,int *ip)
-#endif
 {
     unchar b, t;
     int hanum;
@@ -4899,13 +4813,8 @@ static int gdth_bios_param(Disk *disk,kd
     struct scsi_device *sd;
     unsigned capacity;

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
     sd = sdev;
     capacity = cap;
-#else
-    sd = disk->device;
-    capacity = disk->capacity;
-#endif
     hanum = NUMDATA(sd->host)->hanum;
     b = virt_ctr ? NUMDATA(sd->host)->busnum : sd->channel;
     t = sd->id;
@@ -5520,7 +5429,6 @@ static int gdth_ioctl(struct inode *inod
         hanum = res.ionode;
         ha = HADATA(gdth_ctr_tab[hanum]);

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
         scp  = kmalloc(sizeof(*scp), GFP_KERNEL);
         if (!scp)
             return -ENOMEM;
@@ -5532,17 +5440,7 @@ static int gdth_ioctl(struct inode *inod
         rval = gdth_eh_bus_reset(scp);
         res.status = (rval == SUCCESS ? S_OK : S_GENERR);
         kfree(scp);
-#else
-        scp  = scsi_allocate_device(ha->sdev, 1, FALSE);
-        if (!scp)
-            return -ENOMEM;
-        scp->cmd_len = 12;
-        scp->use_sg = 0;
-        scp->channel = virt_ctr ? 0 : res.number;
-        rval = gdth_eh_bus_reset(scp);
-        res.status = (rval == SUCCESS ? S_OK : S_GENERR);
-        scsi_release_command(scp);
-#endif
+
         if (copy_to_user(argp, &res, sizeof(gdth_ioctl_reset)))
             return -EFAULT;
         break;
@@ -5630,7 +5528,6 @@ static int gdth_halt(struct notifier_blo
     return NOTIFY_OK;
 }

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 /* configure lun */
 static int gdth_slave_configure(struct scsi_device *sdev)
 {
@@ -5639,13 +5536,8 @@ static int gdth_slave_configure(struct s
     sdev->skip_ms_page_8 = 1;
     return 0;
 }
-#endif

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 static struct scsi_host_template driver_template = {
-#else
-static Scsi_Host_Template driver_template = {
-#endif
         .proc_name              = "gdth",
         .proc_info              = gdth_proc_info,
         .name                   = "GDT SCSI Disk Array Controller",
@@ -5656,20 +5548,12 @@ static Scsi_Host_Template driver_templat
         .eh_bus_reset_handler   = gdth_eh_bus_reset,
         .bios_param             = gdth_bios_param,
         .can_queue              = GDTH_MAXCMDS,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
         .slave_configure        = gdth_slave_configure,
-#endif
         .this_id                = -1,
         .sg_tablesize           = GDTH_MAXSG,
         .cmd_per_lun            = GDTH_MAXC_P_L,
         .unchecked_isa_dma      = 1,
         .use_clustering         = ENABLE_CLUSTERING,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-        .use_new_eh_code        = 1,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20)
-        .highmem_io             = 1,
-#endif
-#endif
 };

 #include "scsi_module.c"


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 3/9] drivers/scsi/gdth.h Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
  2006-08-12 21:01 ` [RFC] [PATCH 1/9] drivers/scsi/dpt/dpti_i2o.h Removal of old scsi code Michal Piotrowski
  2006-08-12 21:02 ` [RFC] [PATCH 2/9] drivers/scsi/gdth.c " Michal Piotrowski
@ 2006-08-12 21:02 ` Michal Piotrowski
  2006-08-12 21:02 ` [RFC] [PATCH 4/9] drivers/scsi/gdth_proc.c " Michal Piotrowski
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:02 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, Achim Leubner

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/gdth.h linux-work/drivers/scsi/gdth.h
--- linux-work-clean/drivers/scsi/gdth.h	2006-08-12 01:51:16.000000000 +0200
+++ linux-work/drivers/scsi/gdth.h	2006-08-12 20:49:38.000000000 +0200
@@ -936,18 +936,12 @@ typedef struct {
     gdth_binfo_str      binfo;                  /* controller info */
     gdth_evt_data       dvr;                    /* event structure */
     spinlock_t          smp_lock;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
     struct pci_dev      *pdev;
-#endif
     char                oem_name[8];
 #ifdef GDTH_DMA_STATISTICS
     ulong               dma32_cnt, dma64_cnt;   /* statistics: DMA buffer */
 #endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
     struct scsi_device         *sdev;
-#else
-    struct scsi_device         sdev;
-#endif
 } gdth_ha_str;

 /* structure for scsi_register(), SCSI bus != 0 */
@@ -1029,10 +1023,6 @@ typedef struct {

 /* function prototyping */

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 int gdth_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
-#else
-int gdth_proc_info(char *,char **,off_t,int,int,int);
-#endif

 #endif




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 4/9] drivers/scsi/gdth_proc.c Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
                   ` (2 preceding siblings ...)
  2006-08-12 21:02 ` [RFC] [PATCH 3/9] drivers/scsi/gdth.h " Michal Piotrowski
@ 2006-08-12 21:02 ` Michal Piotrowski
  2006-08-12 21:02 ` [RFC] [PATCH 5/9] drivers/scsi/ips.c " Michal Piotrowski
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:02 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, Achim Leubner

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/gdth_proc.c linux-work/drivers/scsi/gdth_proc.c
--- linux-work-clean/drivers/scsi/gdth_proc.c	2006-08-12 01:51:16.000000000 +0200
+++ linux-work/drivers/scsi/gdth_proc.c	2006-08-12 20:48:42.000000000 +0200
@@ -4,7 +4,6 @@

 #include <linux/completion.h>

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 int gdth_proc_info(struct Scsi_Host *host, char *buffer,char **start,off_t offset,int length,
                    int inout)
 {
@@ -21,32 +20,6 @@ int gdth_proc_info(struct Scsi_Host *hos
     else
         return(gdth_get_info(buffer,start,offset,length,host,hanum,busnum));
 }
-#else
-int gdth_proc_info(char *buffer,char **start,off_t offset,int length,int hostno,
-                   int inout)
-{
-    int hanum,busnum,i;
-
-    TRACE2(("gdth_proc_info() length %d offs %d inout %d\n",
-            length,(int)offset,inout));
-
-    for (i = 0; i < gdth_ctr_vcount; ++i) {
-        if (gdth_ctr_vtab[i]->host_no == hostno)
-            break;
-    }
-    if (i == gdth_ctr_vcount)
-        return(-EINVAL);
-
-    hanum = NUMDATA(gdth_ctr_vtab[i])->hanum;
-    busnum= NUMDATA(gdth_ctr_vtab[i])->busnum;
-
-    if (inout)
-        return(gdth_set_info(buffer,length,gdth_ctr_vtab[i],hanum,busnum));
-    else
-        return(gdth_get_info(buffer,start,offset,length,
-                             gdth_ctr_vtab[i],hanum,busnum));
-}
-#endif

 static int gdth_set_info(char *buffer,int length,struct Scsi_Host *host,
                          int hanum,int busnum)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 5/9] drivers/scsi/ips.c Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
                   ` (3 preceding siblings ...)
  2006-08-12 21:02 ` [RFC] [PATCH 4/9] drivers/scsi/gdth_proc.c " Michal Piotrowski
@ 2006-08-12 21:02 ` Michal Piotrowski
  2006-08-12 21:02 ` [RFC] [PATCH 6/9] drivers/scsi/ips.h " Michal Piotrowski
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:02 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, ipslinux

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/ips.c linux-work/drivers/scsi/ips.c
--- linux-work-clean/drivers/scsi/ips.c	2006-08-12 01:51:16.000000000 +0200
+++ linux-work/drivers/scsi/ips.c	2006-08-12 21:52:02.000000000 +0200
@@ -185,11 +185,7 @@

 #include "scsi.h"

-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-#include "hosts.h"
-#else
 #include <scsi/scsi_host.h>
-#endif

 #include "ips.h"

@@ -217,18 +213,8 @@ module_param(ips, charp, 0);
 #warning "This driver has only been tested on the x86/ia64/x86_64 platforms"
 #endif

-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-#include <linux/blk.h>
-#include "sd.h"
-#define IPS_LOCK_SAVE(lock,flags) spin_lock_irqsave(&io_request_lock,flags)
-#define IPS_UNLOCK_RESTORE(lock,flags) spin_unlock_irqrestore(&io_request_lock,flags)
-#ifndef __devexit_p
-#define __devexit_p(x) x
-#endif
-#else
 #define IPS_LOCK_SAVE(lock,flags) do{spin_lock(lock);(void)flags;}while(0)
 #define IPS_UNLOCK_RESTORE(lock,flags) do{spin_unlock(lock);(void)flags;}while(0)
-#endif

 #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \
                          DMA_NONE == scb->scsi_cmd->sc_data_direction) ? \
@@ -385,24 +371,13 @@ static struct scsi_host_template ips_dri
 	.eh_abort_handler	= ips_eh_abort,
 	.eh_host_reset_handler	= ips_eh_reset,
 	.proc_name		= "ips",
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 	.proc_info		= ips_proc_info,
 	.slave_configure	= ips_slave_configure,
-#else
-	.proc_info		= ips_proc24_info,
-	.select_queue_depths	= ips_select_queue_depth,
-#endif
 	.bios_param		= ips_biosparam,
 	.this_id		= -1,
 	.sg_tablesize		= IPS_MAX_SG,
 	.cmd_per_lun		= 3,
 	.use_clustering		= ENABLE_CLUSTERING,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-	.use_new_eh_code	= 1,
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20)  &&  LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-    .highmem_io          = 1,
-#endif
 };


@@ -1185,17 +1160,10 @@ ips_queue(Scsi_Cmnd * SC, void (*done) (
 /*                                                                          */
 /****************************************************************************/
 static int
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-ips_biosparam(Disk * disk, kdev_t dev, int geom[])
-{
-	ips_ha_t *ha = (ips_ha_t *) disk->device->host->hostdata;
-	unsigned long capacity = disk->capacity;
-#else
 ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
 	      sector_t capacity, int geom[])
 {
 	ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata;
-#endif
 	int heads;
 	int sectors;
 	int cylinders;
@@ -1233,70 +1201,6 @@ ips_biosparam(struct scsi_device *sdev,
 	return (0);
 }

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-
-/* ips_proc24_info is a wrapper around ips_proc_info *
- * for compatibility with the 2.4 scsi parameters    */
-static int
-ips_proc24_info(char *buffer, char **start, off_t offset, int length,
-		              int hostno, int func)
-{
-	int i;
-
-	for (i = 0; i < ips_next_controller; i++) {
-		if (ips_sh[i] && ips_sh[i]->host_no == hostno) {
-			return ips_proc_info(ips_sh[i], buffer, start,
-					     offset, length, func);
-		}
-	}
-	return -EINVAL;	
-}
-
-/****************************************************************************/
-/*                                                                          */
-/* Routine Name: ips_select_queue_depth                                     */
-/*                                                                          */
-/* Routine Description:                                                     */
-/*                                                                          */
-/*   Select queue depths for the devices on the contoller                   */
-/*                                                                          */
-/****************************************************************************/
-static void
-ips_select_queue_depth(struct Scsi_Host *host, struct scsi_device * scsi_devs)
-{
-	struct scsi_device *device;
-	ips_ha_t *ha;
-	int count = 0;
-	int min;
-
-	ha = IPS_HA(host);
-	min = ha->max_cmds / 4;
-
-	for (device = scsi_devs; device; device = device->next) {
-		if (device->host == host) {
-			if ((device->channel == 0) && (device->type == 0))
-				count++;
-		}
-	}
-
-	for (device = scsi_devs; device; device = device->next) {
-		if (device->host == host) {
-			if ((device->channel == 0) && (device->type == 0)) {
-				device->queue_depth =
-				    (ha->max_cmds - 1) / count;
-				if (device->queue_depth < min)
-					device->queue_depth = min;
-			} else {
-				device->queue_depth = 2;
-			}
-
-			if (device->queue_depth < 2)
-				device->queue_depth = 2;
-		}
-	}
-}
-
-#else
 /****************************************************************************/
 /*                                                                          */
 /* Routine Name: ips_slave_configure                                        */
@@ -1324,7 +1228,6 @@ ips_slave_configure(struct scsi_device *
 	SDptr->skip_ms_page_3f = 1;
 	return 0;
 }
-#endif

 /****************************************************************************/
 /*                                                                          */
@@ -7029,11 +6932,7 @@ ips_register_scsi(int index)
 	sh->cmd_per_lun = sh->hostt->cmd_per_lun;
 	sh->unchecked_isa_dma = sh->hostt->unchecked_isa_dma;
 	sh->use_clustering = sh->hostt->use_clustering;
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,7)
 	sh->max_sectors = 128;
-#endif
-
 	sh->max_id = ha->ntargets;
 	sh->max_lun = ha->nlun;
 	sh->max_channel = ha->nbus - 1;
@@ -7456,10 +7355,7 @@ ips_init_phase2(int index)
 	return SUCCESS;
 }

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,9)
 MODULE_LICENSE("GPL");
-#endif
-
 MODULE_DESCRIPTION("IBM ServeRAID Adapter Driver " IPS_VER_STRING);

 #ifdef MODULE_VERSION


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 6/9] drivers/scsi/ips.h Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
                   ` (4 preceding siblings ...)
  2006-08-12 21:02 ` [RFC] [PATCH 5/9] drivers/scsi/ips.c " Michal Piotrowski
@ 2006-08-12 21:02 ` Michal Piotrowski
  2006-08-12 21:03 ` [RFC] [PATCH 7/9] drivers/scsi/nsp32.c " Michal Piotrowski
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:02 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, ipslinux

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/ips.h linux-work/drivers/scsi/ips.h
--- linux-work-clean/drivers/scsi/ips.h	2006-03-20 06:53:29.000000000 +0100
+++ linux-work/drivers/scsi/ips.h	2006-08-12 22:02:54.000000000 +0200
@@ -57,9 +57,7 @@
    /*
     * Some handy macros
     */
-   #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined CONFIG_HIGHIO
-      #define IPS_HIGHIO
-   #endif
+    #define IPS_HIGHIO

    #define IPS_HA(x)                   ((ips_ha_t *) x->hostdata)
    #define IPS_COMMAND_ID(ha, scb)     (int) (scb - ha->scbs)
@@ -83,11 +81,6 @@
     #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
@@ -95,18 +88,6 @@
       #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)
@@ -114,7 +95,6 @@
       #define IPS_SCSI_SET_DEVICE(sh,ha)   do { } while (0)
       #define IPS_PRINTK(level, pcidev, format, arg...)                 \
             dev_printk(level , &((pcidev)->dev) , format , ## arg)
-   #endif

    #ifndef MDELAY
       #define MDELAY mdelay
@@ -448,16 +428,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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 7/9] drivers/scsi/nsp32.c Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
                   ` (5 preceding siblings ...)
  2006-08-12 21:02 ` [RFC] [PATCH 6/9] drivers/scsi/ips.h " Michal Piotrowski
@ 2006-08-12 21:03 ` Michal Piotrowski
  2006-08-12 21:03 ` [RFC] [PATCH 8/9] drivers/scsi/nsp32.h " Michal Piotrowski
  2006-08-12 21:03 ` [RFC] [PATCH 9/9] drivers/scsi/pcmcia/nsp_cs.h " Michal Piotrowski
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:03 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, GOTO Masanori

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/nsp32.c linux-work/drivers/scsi/nsp32.c
--- linux-work-clean/drivers/scsi/nsp32.c	2006-08-12 02:15:32.000000000 +0200
+++ linux-work/drivers/scsi/nsp32.c	2006-08-12 20:43:46.000000000 +0200
@@ -50,10 +50,6 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>

-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
-# include <linux/blk.h>
-#endif
-
 #include "nsp32.h"


@@ -200,17 +196,9 @@ static int  __init    init_nsp32  (void)
 static void __exit    exit_nsp32  (void);

 /* struct struct scsi_host_template */
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 static int         nsp32_proc_info   (struct Scsi_Host *, char *, char **, off_t, int, int);
-#else
-static int         nsp32_proc_info   (char *, char **, off_t, int, int, int);
-#endif

-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 static int         nsp32_detect      (struct pci_dev *pdev);
-#else
-static int         nsp32_detect      (struct scsi_host_template *);
-#endif
 static int         nsp32_queuecommand(struct scsi_cmnd *,
 		void (*done)(struct scsi_cmnd *));
 static const char *nsp32_info        (struct Scsi_Host *);
@@ -297,15 +285,7 @@ static struct scsi_host_template nsp32_t
 	.eh_abort_handler       	= nsp32_eh_abort,
 	.eh_bus_reset_handler		= nsp32_eh_bus_reset,
 	.eh_host_reset_handler		= nsp32_eh_host_reset,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74))
-	.detect				= nsp32_detect,
-	.release			= nsp32_release,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,2))
-	.use_new_eh_code        	= 1,
-#else
 /*	.highmem_io			= 1, */
-#endif
 };

 #include "nsp32_io.h"
@@ -1212,12 +1192,8 @@ static irqreturn_t do_nsp32_isr(int irq,
 	int ret;
 	int handled = 0;

-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 	struct Scsi_Host *host = data->Host;
 	spin_lock_irqsave(host->host_lock, flags);
-#else
-	spin_lock_irqsave(&io_request_lock, flags);
-#endif

 	/*
 	 * IRQ check, then enable IRQ mask
@@ -1481,11 +1457,7 @@ static irqreturn_t do_nsp32_isr(int irq,
 	nsp32_write2(base, IRQ_CONTROL, 0);

  out2:
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 	spin_unlock_irqrestore(host->host_lock, flags);
-#else
-	spin_unlock_irqrestore(&io_request_lock, flags);
-#endif

 	nsp32_dbg(NSP32_DEBUG_INTR, "exit");

@@ -1501,27 +1473,18 @@ static irqreturn_t do_nsp32_isr(int irq,
 		} \
 	} while(0)
 static int nsp32_proc_info(
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	struct Scsi_Host *host,
-#endif
 	char             *buffer,
 	char            **start,
 	off_t             offset,
 	int               length,
-#if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
-	int               hostno,
-#endif
 	int               inout)
 {
 	char             *pos = buffer;
 	int               thislength;
 	unsigned long     flags;
 	nsp32_hw_data    *data;
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	int               hostno;
-#else
-	struct Scsi_Host *host;
-#endif
 	unsigned int      base;
 	unsigned char     mode_reg;
 	int               id, speed;
@@ -1532,15 +1495,7 @@ static int nsp32_proc_info(
 		return -EINVAL;
 	}

-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	hostno = host->host_no;
-#else
-	/* search this HBA host */
-	host = scsi_host_hn_get(hostno);
-	if (host == NULL) {
-		return -ESRCH;
-	}
-#endif
 	data = (nsp32_hw_data *)host->hostdata;
 	base = host->io_port;

@@ -2675,17 +2630,11 @@ static void nsp32_sack_negate(nsp32_hw_d
  *	0x900-0xbff: (map same 0x800-0x8ff I/O port image repeatedly)
  *	0xc00-0xfff: CardBus status registers
  */
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
+
 #define DETECT_OK 0
 #define DETECT_NG 1
 #define PCIDEV    pdev
 static int nsp32_detect(struct pci_dev *pdev)
-#else
-#define DETECT_OK 1
-#define DETECT_NG 0
-#define PCIDEV    (data->Pci)
-static int nsp32_detect(struct scsi_host_template *sht)
-#endif
 {
 	struct Scsi_Host *host;	/* registered host structure */
 	struct resource  *res;
@@ -2698,11 +2647,8 @@ static int nsp32_detect(struct scsi_host
 	/*
 	 * register this HBA as SCSI device
 	 */
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	host = scsi_host_alloc(&nsp32_template, sizeof(nsp32_hw_data));
-#else
-	host = scsi_register(sht, sizeof(nsp32_hw_data));
-#endif
+
 	if (host == NULL) {
 		nsp32_msg (KERN_ERR, "failed to scsi register");
 		goto err;
@@ -2720,9 +2666,6 @@ static int nsp32_detect(struct scsi_host
 	host->unique_id = data->BaseAddress;
 	host->n_io_port	= data->NumAddress;
 	host->base      = (unsigned long)data->MmioAddress;
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,63))
-	scsi_set_pci_device(host, PCIDEV);
-#endif

 	data->Host      = host;
 	spin_lock_init(&(data->Lock));
@@ -2884,14 +2827,13 @@ static int nsp32_detect(struct scsi_host
 		goto free_irq;
         }

-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	ret = scsi_add_host(host, &PCIDEV->dev);
 	if (ret) {
 		nsp32_msg(KERN_ERR, "failed to add scsi host");
 		goto free_region;
 	}
 	scsi_scan_host(host);
-#endif
+
 	pci_set_drvdata(PCIDEV, host);
 	return DETECT_OK;

@@ -3525,12 +3467,7 @@ static int __devinit nsp32_probe(struct
 	data->MmioLength  = pci_resource_len  (pdev, 1);

 	pci_set_master(pdev);
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	ret = nsp32_detect(pdev);
-#else
-	ret = scsi_register_host(&nsp32_template);
-#endif

 	nsp32_msg(KERN_INFO, "irq: %i mmio: %p+0x%lx slot: %s model: %s",
 		  pdev->irq,
@@ -3545,21 +3482,15 @@ static int __devinit nsp32_probe(struct

 static void __devexit nsp32_remove(struct pci_dev *pdev)
 {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	struct Scsi_Host *host = pci_get_drvdata(pdev);
-#endif

 	nsp32_dbg(NSP32_DEBUG_REGISTER, "enter");

-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
         scsi_remove_host(host);

 	nsp32_release(host);

 	scsi_host_put(host);
-#else
-	scsi_unregister_host(&nsp32_template);	
-#endif
 }




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 8/9] drivers/scsi/nsp32.h Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
                   ` (6 preceding siblings ...)
  2006-08-12 21:03 ` [RFC] [PATCH 7/9] drivers/scsi/nsp32.c " Michal Piotrowski
@ 2006-08-12 21:03 ` Michal Piotrowski
  2006-08-12 21:03 ` [RFC] [PATCH 9/9] drivers/scsi/pcmcia/nsp_cs.h " Michal Piotrowski
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:03 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, GOTO Masanori

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/nsp32.h linux-work/drivers/scsi/nsp32.h
--- linux-work-clean/drivers/scsi/nsp32.h	2006-03-20 06:53:29.000000000 +0100
+++ linux-work/drivers/scsi/nsp32.h	2006-08-12 20:40:00.000000000 +0200
@@ -619,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 */


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC] [PATCH 9/9] drivers/scsi/pcmcia/nsp_cs.h Removal of old scsi code
       [not found] <44DE3E5E.3020605@gmail.com>
                   ` (7 preceding siblings ...)
  2006-08-12 21:03 ` [RFC] [PATCH 8/9] drivers/scsi/nsp32.h " Michal Piotrowski
@ 2006-08-12 21:03 ` Michal Piotrowski
  8 siblings, 0 replies; 9+ messages in thread
From: Michal Piotrowski @ 2006-08-12 21:03 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, James Bottomley, linux-scsi, LKML, GOTO Masanori

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/scsi/pcmcia/nsp_cs.h linux-work/drivers/scsi/pcmcia/nsp_cs.h
--- linux-work-clean/drivers/scsi/pcmcia/nsp_cs.h	2006-08-12 01:50:53.000000000 +0200
+++ linux-work/drivers/scsi/pcmcia/nsp_cs.h	2006-08-12 20:31:31.000000000 +0200
@@ -290,7 +290,6 @@ typedef struct _nsp_hw_data {
 #endif
 } nsp_hw_data;

-
 /****************************************************************************
  *
  */
@@ -302,22 +301,13 @@ static int        nsp_cs_config (struct

 /* Linux SCSI subsystem specific functions */
 static struct Scsi_Host *nsp_detect     (struct scsi_host_template *sht);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-static        int        nsp_detect_old (struct scsi_host_template *sht);
-static        int        nsp_release_old(struct Scsi_Host *shpnt);
-#endif
 static const  char      *nsp_info       (struct Scsi_Host *shpnt);
 static        int        nsp_proc_info  (
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
 	                                 struct Scsi_Host *host,
-#endif
 					 char   *buffer,
 					 char  **start,
 					 off_t   offset,
 					 int     length,
-#if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
-					 int     hostno,
-#endif
 					 int     inout);
 static        int        nsp_queuecommand(Scsi_Cmnd *SCpnt, void (* done)(Scsi_Cmnd *SCpnt));

@@ -352,7 +342,6 @@ static struct Scsi_Host *nsp_detect(stru
 static int  __init nsp_cs_init(void);
 static void __exit nsp_cs_exit(void);

-
 /* Debug */
 #ifdef NSP_DEBUG
 static void show_command (Scsi_Cmnd *SCpnt);
@@ -397,7 +386,6 @@ enum _burst_mode {
 	BURST_MEM32 = 2,
 };

-
 /**************************************************************************
  * SCSI messaage
  */
@@ -409,62 +397,8 @@ enum _burst_mode {

 #define MSG_EXT_SDTR         0x01

-
-/**************************************************************************
- * 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)
-
-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;
-}
-
-static void cs_error(struct pcmcia_device *handle, int func, int ret)
-{
-	error_info_t err = { func, ret };
-	pcmcia_report_error(handle, &err);
-}
-
-/* scatter-gather table */
-#  define BUFFER_ADDR (SCpnt->SCp.buffer->address)
-#endif
-
-/* for Kernel 2.6 */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
 /* scatter-gather table */
 #  define BUFFER_ADDR ((char *)((unsigned int)(SCpnt->SCp.buffer->page) + SCpnt->SCp.buffer->offset))
-#endif

 #endif  /*__nsp_cs__*/
 /* end */


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-08-12 21:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <44DE3E5E.3020605@gmail.com>
2006-08-12 21:01 ` [RFC] [PATCH 1/9] drivers/scsi/dpt/dpti_i2o.h Removal of old scsi code Michal Piotrowski
2006-08-12 21:02 ` [RFC] [PATCH 2/9] drivers/scsi/gdth.c " Michal Piotrowski
2006-08-12 21:02 ` [RFC] [PATCH 3/9] drivers/scsi/gdth.h " Michal Piotrowski
2006-08-12 21:02 ` [RFC] [PATCH 4/9] drivers/scsi/gdth_proc.c " Michal Piotrowski
2006-08-12 21:02 ` [RFC] [PATCH 5/9] drivers/scsi/ips.c " Michal Piotrowski
2006-08-12 21:02 ` [RFC] [PATCH 6/9] drivers/scsi/ips.h " Michal Piotrowski
2006-08-12 21:03 ` [RFC] [PATCH 7/9] drivers/scsi/nsp32.c " Michal Piotrowski
2006-08-12 21:03 ` [RFC] [PATCH 8/9] drivers/scsi/nsp32.h " Michal Piotrowski
2006-08-12 21:03 ` [RFC] [PATCH 9/9] drivers/scsi/pcmcia/nsp_cs.h " Michal Piotrowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox