Commit 6215ec4f authored by James Bottomley's avatar James Bottomley

Qla1280 update to 3.23.24

From: Jes Sorensen <jes@wildopensource.com>
with minor compile and rejection fixes

This patch might make the qla1280 driver build again in Linus' bk
tree. I don't have those sources here so I made the changes relative to
2.6.0-test2 and I am out of space on my laptop

Only compile tested, but if it works it works ;-)
parent 856c781e
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
* General Public License for more details. * General Public License for more details.
* *
******************************************************************************/ ******************************************************************************/
#define QLA1280_VERSION "3.23.34" #define QLA1280_VERSION "3.23.35"
/***************************************************************************** /*****************************************************************************
Revision History: Revision History:
Rev 3.23.35 August 14, 2003, Jes Sorensen
- Build against 2.6
Rev 3.23.34 July 23, 2003, Jes Sorensen Rev 3.23.34 July 23, 2003, Jes Sorensen
- Remove pointless TRUE/FALSE macros - Remove pointless TRUE/FALSE macros
- Clean up vchan handling - Clean up vchan handling
...@@ -296,14 +298,12 @@ ...@@ -296,14 +298,12 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/blk.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pci_ids.h> #include <linux/pci_ids.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
...@@ -312,7 +312,10 @@ ...@@ -312,7 +312,10 @@
#include <asm/system.h> #include <asm/system.h>
#if LINUX_VERSION_CODE < 0x020545 #if LINUX_VERSION_CODE < 0x020545
#include <linux/blk.h>
#include "sd.h" #include "sd.h"
#else
#include <scsi/scsi_host.h>
#endif #endif
#include "scsi.h" #include "scsi.h"
#include "hosts.h" #include "hosts.h"
...@@ -634,11 +637,14 @@ static int ql_debug_level = 1; ...@@ -634,11 +637,14 @@ static int ql_debug_level = 1;
*************************************************************************/ *************************************************************************/
#define PROC_BUF &qla1280_buffer[len] #define PROC_BUF &qla1280_buffer[len]
int #if LINUX_VERSION_CODE < 0x020600
qla1280_proc_info(char *buffer, char **start, off_t offset, int length, int qla1280_proc_info(char *buffer, char **start, off_t offset, int length,
int hostno, int inout) int hostno, int inout)
#else
int qla1280_proc_info(struct Scsi_Host *host, char *buffer, char **start,
off_t offset, int length, int inout)
#endif
{ {
struct Scsi_Host *host;
struct scsi_qla_host *ha; struct scsi_qla_host *ha;
int size = 0; int size = 0;
int len = 0; int len = 0;
...@@ -647,7 +653,10 @@ qla1280_proc_info(char *buffer, char **start, off_t offset, int length, ...@@ -647,7 +653,10 @@ qla1280_proc_info(char *buffer, char **start, off_t offset, int length,
struct scsi_lu *up; struct scsi_lu *up;
uint32_t b, t, l; uint32_t b, t, l;
#endif #endif
#if LINUX_VERSION_CODE >= 0x020600
ha = (struct scsi_qla_host *)host->hostdata;
#else
struct Scsi_Host *host;
/* Find the host that was specified */ /* Find the host that was specified */
for (ha = qla1280_hostlist; (ha != NULL) for (ha = qla1280_hostlist; (ha != NULL)
&& ha->host->host_no != hostno; ha = ha->next) ; && ha->host->host_no != hostno; ha = ha->next) ;
...@@ -664,6 +673,7 @@ qla1280_proc_info(char *buffer, char **start, off_t offset, int length, ...@@ -664,6 +673,7 @@ qla1280_proc_info(char *buffer, char **start, off_t offset, int length,
} }
host = ha->host; host = ha->host;
#endif
if (inout) if (inout)
return -ENOSYS; return -ENOSYS;
...@@ -1828,7 +1838,7 @@ qla1280_done(struct scsi_qla_host *ha, struct srb ** done_q_first, ...@@ -1828,7 +1838,7 @@ qla1280_done(struct scsi_qla_host *ha, struct srb ** done_q_first,
CMD_HANDLE(sp->cmd) = (unsigned char *)INVALID_HANDLE; CMD_HANDLE(sp->cmd) = (unsigned char *)INVALID_HANDLE;
ha->actthreads--; ha->actthreads--;
#if LINUX_KERNEL_VERSION < 0x020500 #if LINUX_VERSION_CODE < 0x020500
if (cmd->cmnd[0] == INQUIRY) if (cmd->cmnd[0] == INQUIRY)
qla1280_get_target_options(cmd, ha); qla1280_get_target_options(cmd, ha);
#endif #endif
...@@ -4497,7 +4507,7 @@ qla1280_rst_aen(struct scsi_qla_host *ha) ...@@ -4497,7 +4507,7 @@ qla1280_rst_aen(struct scsi_qla_host *ha)
} }
#if LINUX_KERNEL_VERSION < 0x020500 #if LINUX_VERSION_CODE < 0x020500
/* /*
* *
*/ */
......
...@@ -1111,7 +1111,11 @@ struct scsi_qla_host { ...@@ -1111,7 +1111,11 @@ struct scsi_qla_host {
/* /*
* Linux - SCSI Driver Interface Function Prototypes. * Linux - SCSI Driver Interface Function Prototypes.
*/ */
#if LINUX_VERSION_CODE < 0x020600
int qla1280_proc_info(char *, char **, off_t, int, int, int); int qla1280_proc_info(char *, char **, off_t, int, int, int);
#else
int qla1280_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
#endif
const char *qla1280_info(struct Scsi_Host *host); const char *qla1280_info(struct Scsi_Host *host);
int qla1280_detect(Scsi_Host_Template *); int qla1280_detect(Scsi_Host_Template *);
int qla1280_release(struct Scsi_Host *); int qla1280_release(struct Scsi_Host *);
...@@ -1147,8 +1151,6 @@ int qla1280_eh_adapter_reset(struct scsi_cmnd *cmd); ...@@ -1147,8 +1151,6 @@ int qla1280_eh_adapter_reset(struct scsi_cmnd *cmd);
.detect = qla1280_detect, \ .detect = qla1280_detect, \
.release = qla1280_release, \ .release = qla1280_release, \
.info = qla1280_info, \ .info = qla1280_info, \
.ioctl = NULL, \
.command = NULL, \
.queuecommand = qla1280_queuecommand, \ .queuecommand = qla1280_queuecommand, \
.eh_strategy_handler = NULL, \ .eh_strategy_handler = NULL, \
.eh_abort_handler = qla1280_eh_abort, \ .eh_abort_handler = qla1280_eh_abort, \
......
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