Commit c17ac748 authored by David Jeffery's avatar David Jeffery Committed by Linus Torvalds

[PATCH] ips: 2.4 compatability code

This adds a few bits of code and couple #ifdefs that are needed to
enable this driver to work for 2.4 as well as 2.5.
parent 4fe30ab2
...@@ -1136,17 +1136,21 @@ ips_queue(Scsi_Cmnd *SC, void (*done) (Scsi_Cmnd *)) { ...@@ -1136,17 +1136,21 @@ ips_queue(Scsi_Cmnd *SC, void (*done) (Scsi_Cmnd *)) {
/* */ /* */
/****************************************************************************/ /****************************************************************************/
static int static int
#if LINUX_VERSION_CODE < LinuxVersionCode(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, ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int geom[]) { sector_t capacity, int geom[]) {
ips_ha_t *ha; ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata;
#endif
int heads; int heads;
int sectors; int sectors;
int cylinders; int cylinders;
METHOD_TRACE("ips_biosparam", 1); METHOD_TRACE("ips_biosparam", 1);
ha = (ips_ha_t *) sdev->host->hostdata;
if (!ha) if (!ha)
/* ?!?! host adater info invalid */ /* ?!?! host adater info invalid */
return (0); return (0);
...@@ -1178,7 +1182,7 @@ ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, ...@@ -1178,7 +1182,7 @@ ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
return (0); return (0);
} }
#if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0)
/****************************************************************************/ /****************************************************************************/
/* */ /* */
/* Routine Name: ips_select_queue_depth */ /* Routine Name: ips_select_queue_depth */
...@@ -1188,7 +1192,7 @@ ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, ...@@ -1188,7 +1192,7 @@ ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
/* Select queue depths for the devices on the contoller */ /* Select queue depths for the devices on the contoller */
/* */ /* */
/****************************************************************************/ /****************************************************************************/
/*static void static void
ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs) { ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs) {
Scsi_Device *device; Scsi_Device *device;
ips_ha_t *ha; ips_ha_t *ha;
...@@ -1221,8 +1225,8 @@ ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs) { ...@@ -1221,8 +1225,8 @@ ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs) {
} }
} }
} }
*/
#else
/****************************************************************************/ /****************************************************************************/
/* */ /* */
/* Routine Name: ips_slave_configure */ /* Routine Name: ips_slave_configure */
...@@ -1247,6 +1251,7 @@ ips_slave_configure(Scsi_Device *SDptr) ...@@ -1247,6 +1251,7 @@ ips_slave_configure(Scsi_Device *SDptr)
} }
return 0; return 0;
} }
#endif
/****************************************************************************/ /****************************************************************************/
/* */ /* */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment