public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@wildopensource.com>
To: linux-scsi@vger.kernel.org
Cc: James.Bottomley@steeleye.com, Christoph Hellwig <hch@lst.de>
Subject: qla1280 v 3.23.35
Date: Thu, 14 Aug 2003 11:41:51 -0400	[thread overview]
Message-ID: <16187.44479.878515.830263@trained-monkey.org> (raw)

Hi,

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 ;-)

Cheers,
Jes

--- drivers/scsi/qla1280.c~	Wed Jul 23 13:06:31 2003
+++ drivers/scsi/qla1280.c	Thu Aug 14 11:34:19 2003
@@ -16,9 +16,11 @@
 * General Public License for more details.
 *
 ******************************************************************************/
-#define QLA1280_VERSION      "3.23.34"
+#define QLA1280_VERSION      "3.23.35"
 /*****************************************************************************
     Revision History:
+    Rev  3.23.35 August 14, 2003, Jes Sorensen
+	- Build against 2.6
     Rev  3.23.34 July 23, 2003, Jes Sorensen
 	- Remove pointless TRUE/FALSE macros
 	- Clean up vchan handling
@@ -296,14 +298,12 @@
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/proc_fs.h>
-#include <linux/blk.h>
 #include <linux/stat.h>
 #include <linux/slab.h>
 #include <linux/pci_ids.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
 
-
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/byteorder.h>
@@ -312,7 +312,10 @@
 #include <asm/system.h>
 
 #if LINUX_VERSION_CODE < 0x020545
+#include <linux/blk.h>
 #include "sd.h"
+#else
+#include <scsi/scsi_host.h>
 #endif
 #include "scsi.h"
 #include "hosts.h"
@@ -646,11 +649,14 @@
  *************************************************************************/
 #define	PROC_BUF	&qla1280_buffer[len]
 
-int
-qla1280_proc_info(char *buffer, char **start, off_t offset, int length,
-		  int hostno, int inout)
+#if LINUX_VERSION_CODE < 0x020600
+int qla1280_proc_info(char *buffer, char **start, off_t offset, int length,
+		      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;
 	int size = 0;
 	int len = 0;
@@ -659,7 +665,10 @@
 	struct scsi_lu *up;
 	uint32_t b, t, l;
 #endif
-
+#if LINUX_VERSION_CODE >= 0x020600
+	ha = (struct scsi_qla_host *)host->hostdata;
+#else
+	struct Scsi_Host *host;
 	/* Find the host that was specified */
 	for (ha = qla1280_hostlist; (ha != NULL)
 		     && ha->host->host_no != hostno; ha = ha->next) ;
@@ -676,6 +685,7 @@
 	}
 
 	host = ha->host;
+#endif
 
 	if (inout)
 		return -ENOSYS;
@@ -1026,11 +1036,6 @@
 		qla1280_setup(qla1280);
 #endif
 
-	if (!pci_present()) {
-		printk(KERN_INFO "scsi: PCI not present\n");
-		return 0;
-	}
-
 	bdp = &ql1280_board_tbl[0];
 	qla1280_hostlist = NULL;
 	template->proc_name = "qla1280";
@@ -1845,7 +1850,7 @@
 		CMD_HANDLE(sp->cmd) = (unsigned char *)INVALID_HANDLE;
 		ha->actthreads--;
 
-#if LINUX_KERNEL_VERSION < 0x020500
+#if LINUX_VERSION_CODE < 0x020500
 		if (cmd->cmnd[0] == INQUIRY)
 			qla1280_get_target_options(cmd, ha);
 #endif
@@ -4514,7 +4519,7 @@
 }
 
 
-#if LINUX_KERNEL_VERSION < 0x020500
+#if LINUX_VERSION_CODE < 0x020500
 /*
  *
  */
--- drivers/scsi/qla1280.h~	Wed Jul 23 12:39:47 2003
+++ drivers/scsi/qla1280.h	Thu Aug 14 11:29:39 2003
@@ -1111,7 +1111,11 @@
 /*
  *  Linux - SCSI Driver Interface Function Prototypes.
  */
+#if LINUX_VERSION_CODE < 0x020600
 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);
 int qla1280_detect(Scsi_Host_Template *);
 int qla1280_release(struct Scsi_Host *);
@@ -1147,8 +1151,6 @@
 	.detect = qla1280_detect,				\
 	.release = qla1280_release,				\
 	.info = qla1280_info,					\
-	.ioctl = NULL,						\
-	.command = NULL,					\
 	.queuecommand = qla1280_queuecommand,			\
 	.eh_strategy_handler = NULL,				\
 	.eh_abort_handler = qla1280_eh_abort,			\

                 reply	other threads:[~2003-08-14 15:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16187.44479.878515.830263@trained-monkey.org \
    --to=jes@wildopensource.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox