Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 89877e42827f16fa5f86b1df0c2860b1 > files > 2255

kernel-2.6.18-128.1.10.el5.src.rpm

From: Mike Christie <mchristi@redhat.com>
Subject: [PATCH RHEL5] update scsi structs for future known features and fixes  take 2
Date: Fri, 15 Dec 2006 15:07:04 -0600
Bugzilla: 220458
Message-Id: <45830E78.9040005@redhat.com>
Changelog: scsi structs for future known features and fixes


This patch adds the async scanning and target fields to the
scsi_host_template and scsi_host.

Changes from take1:
- Dropped scsi_cmnd->offset field.
- Changed target callbacks to take pointers to void instead of
scsi_cmnds in anticipation that this will change upstream.

diff -aurp linux-2.6.18.noarch.orig/include/scsi/scsi_host.h linux-2.6.18.noarch.work/include/scsi/scsi_host.h
--- linux-2.6.18.noarch.orig/include/scsi/scsi_host.h	2006-12-11 06:02:32.000000000 -0600
+++ linux-2.6.18.noarch.work/include/scsi/scsi_host.h	2006-12-12 07:00:58.000000000 -0600
@@ -7,6 +7,7 @@
 #include <linux/workqueue.h>
 #include <linux/mutex.h>
 
+struct request_queue;
 struct block_device;
 struct completion;
 struct module;
@@ -240,6 +241,10 @@ struct scsi_host_template {
 	 */
 	void (* target_destroy)(struct scsi_target *);
 
+	/* For future async scanning use */
+	int (* scan_finished)(struct Scsi_Host *, unsigned long);
+	void (* scan_start)(struct Scsi_Host *);
+
 	/*
 	 * fill in this function to allow the queue depth of this host
 	 * to be changeable (on a per device basis).  returns either
@@ -387,6 +392,11 @@ struct scsi_host_template {
 	 */
 	unsigned ordered_tag:1;
 
+	/* for future target use */
+	int (* transfer_response)(void *, void (*done)(void *));
+	int (* transfer_data)(void *, void (*done)(void *));
+	int (* tsk_mgmt_response)(u64 mid, int result);
+
 	/*
 	 * Countdown for host blocking with no commands outstanding
 	 */
@@ -552,6 +562,9 @@ struct Scsi_Host {
 	/* task mgmt function in progress */
 	unsigned tmf_in_progress:1;
 
+	/* For future use */
+	unsigned async_scan:1;
+
 	/*
 	 * Optional work queue to be utilized by the transport
 	 */
@@ -568,6 +581,9 @@ struct Scsi_Host {
 	 */
 	unsigned int max_host_blocked;
 
+	/* for future target use */
+	struct request_queue *uspace_req_q;
+
 	/* legacy crap */
 	unsigned long base;
 	unsigned long io_port;