linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi/imm.c compile errors in 2.5.60
@ 2003-02-11  6:07 Randy.Dunlap
  2003-02-11  8:34 ` Mike Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2003-02-11  6:07 UTC (permalink / raw)
  To: linux-kernel, andmike, james.bottomley

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

Hi,

I think this patch takes care of scsi/imm.c build errors
in 2.5.60.

Please review and apply if correct.

For kernel bugzilla #330.

Thanks,
~Randy

[-- Attachment #2: scsi-imm-2560.patch --]
[-- Type: text/plain, Size: 3364 bytes --]

patch_name:	scsi-imm-2560.patch
patch_version:	2003-02-10.22:00:51
author:		Randy.Dunlap <rddunlap@osdl.org>
description:	fix compile errors in scsi/imm.c
product:	Linux
product_versions: linux-2560
changelog:	_
URL:		_
requires:	_
conflicts:	_
diffstat:	=
 imm.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)


diff -Naur ./drivers/scsi/imm.c%BUILD ./drivers/scsi/imm.c
--- ./drivers/scsi/imm.c%BUILD	Mon Feb 10 10:39:00 2003
+++ ./drivers/scsi/imm.c	Mon Feb 10 21:58:34 2003
@@ -733,7 +733,7 @@
 
 static inline int imm_send_command(Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     int k;
 
     /* NOTE: IMM uses byte pairs */
@@ -758,7 +758,7 @@
      *  0     Told to schedule
      *  1     Finished data transfer
      */
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     unsigned short ppb = IMM_BASE(host_no);
     unsigned long start_jiffies = jiffies;
 
@@ -845,7 +845,7 @@
 int imm_command(Scsi_Cmnd * cmd)
 {
     static int first_pass = 1;
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
 
     if (first_pass) {
 	printk("imm: using non-queuing interface\n");
@@ -867,7 +867,7 @@
 	schedule();
 
     if (cmd->SCp.phase)		/* Only disconnect if we have connected */
-	imm_disconnect(cmd->host->unique_id);
+	imm_disconnect(cmd->device->host->unique_id);
 
     imm_pb_release(host_no);
     imm_hosts[host_no].cur_cmd = 0;
@@ -883,7 +883,7 @@
 {
     imm_struct *tmp = (imm_struct *) data;
     Scsi_Cmnd *cmd = tmp->cur_cmd;
-    struct Scsi_Host *host = cmd->host;
+    struct Scsi_Host *host = cmd->device->host;
     unsigned long flags;
 
     if (!cmd) {
@@ -930,9 +930,9 @@
 #endif
 
     if (cmd->SCp.phase > 1)
-	imm_disconnect(cmd->host->unique_id);
+	imm_disconnect(cmd->device->host->unique_id);
     if (cmd->SCp.phase > 0)
-	imm_pb_release(cmd->host->unique_id);
+	imm_pb_release(cmd->device->host->unique_id);
 
     spin_lock_irqsave(host->host_lock, flags);
     tmp->cur_cmd = 0;
@@ -943,7 +943,7 @@
 
 static int imm_engine(imm_struct * tmp, Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     unsigned short ppb = IMM_BASE(host_no);
     unsigned char l = 0, h = 0;
     int retv, x;
@@ -972,7 +972,7 @@
 
 	/* Phase 2 - We are now talking to the scsi bus */
     case 2:
-	if (!imm_select(host_no, cmd->target)) {
+	if (!imm_select(host_no, cmd->device->id)) {
 	    imm_fail(host_no, DID_NO_CONNECT);
 	    return 0;
 	}
@@ -1082,7 +1082,7 @@
 
 int imm_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
 
     if (imm_hosts[host_no].cur_cmd) {
 	printk("IMM: bug in imm_queuecommand\n");
@@ -1125,7 +1125,7 @@
 
 int imm_abort(Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     /*
      * There is no method for aborting commands since Iomega
      * have tied the SCSI_MESSAGE line high in the interface
@@ -1157,7 +1157,7 @@
 
 int imm_reset(Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
 
     if (cmd->SCp.phase)
 	imm_disconnect(host_no);

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

* Re: [PATCH] scsi/imm.c compile errors in 2.5.60
  2003-02-11  6:07 [PATCH] scsi/imm.c compile errors in 2.5.60 Randy.Dunlap
@ 2003-02-11  8:34 ` Mike Anderson
  2003-02-11 12:52   ` James H. Cloos Jr.
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Anderson @ 2003-02-11  8:34 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel, james.bottomley, campbell

Randy,

It looks good. I cc'd David Campbell the listed maintainer
of the driver just to let him know of the update.

Randy.Dunlap [randy.dunlap@verizon.net] wrote:
> Hi,
> 
> I think this patch takes care of scsi/imm.c build errors
> in 2.5.60.
> 
> Please review and apply if correct.
> 
> For kernel bugzilla #330.
> 
> Thanks,
> ~Randy
> patch_name:	scsi-imm-2560.patch
> patch_version:	2003-02-10.22:00:51
> author:		Randy.Dunlap <rddunlap@osdl.org>
> description:	fix compile errors in scsi/imm.c
> product:	Linux
> product_versions: linux-2560
> changelog:	_
> URL:		_
> requires:	_
> conflicts:	_
> diffstat:	=
>  imm.c |   24 ++++++++++++------------
>  1 files changed, 12 insertions(+), 12 deletions(-)
> 
> 
> diff -Naur ./drivers/scsi/imm.c%BUILD ./drivers/scsi/imm.c
> --- ./drivers/scsi/imm.c%BUILD	Mon Feb 10 10:39:00 2003
> +++ ./drivers/scsi/imm.c	Mon Feb 10 21:58:34 2003
> @@ -733,7 +733,7 @@
>  
>  static inline int imm_send_command(Scsi_Cmnd * cmd)
>  {
> -    int host_no = cmd->host->unique_id;
> +    int host_no = cmd->device->host->unique_id;
>      int k;
>  
>      /* NOTE: IMM uses byte pairs */
> @@ -758,7 +758,7 @@
>       *  0     Told to schedule
>       *  1     Finished data transfer
>       */
> -    int host_no = cmd->host->unique_id;
> +    int host_no = cmd->device->host->unique_id;
>      unsigned short ppb = IMM_BASE(host_no);
>      unsigned long start_jiffies = jiffies;
>  
> @@ -845,7 +845,7 @@
>  int imm_command(Scsi_Cmnd * cmd)
>  {
>      static int first_pass = 1;
> -    int host_no = cmd->host->unique_id;
> +    int host_no = cmd->device->host->unique_id;
>  
>      if (first_pass) {
>  	printk("imm: using non-queuing interface\n");
> @@ -867,7 +867,7 @@
>  	schedule();
>  
>      if (cmd->SCp.phase)		/* Only disconnect if we have connected */
> -	imm_disconnect(cmd->host->unique_id);
> +	imm_disconnect(cmd->device->host->unique_id);
>  
>      imm_pb_release(host_no);
>      imm_hosts[host_no].cur_cmd = 0;
> @@ -883,7 +883,7 @@
>  {
>      imm_struct *tmp = (imm_struct *) data;
>      Scsi_Cmnd *cmd = tmp->cur_cmd;
> -    struct Scsi_Host *host = cmd->host;
> +    struct Scsi_Host *host = cmd->device->host;
>      unsigned long flags;
>  
>      if (!cmd) {
> @@ -930,9 +930,9 @@
>  #endif
>  
>      if (cmd->SCp.phase > 1)
> -	imm_disconnect(cmd->host->unique_id);
> +	imm_disconnect(cmd->device->host->unique_id);
>      if (cmd->SCp.phase > 0)
> -	imm_pb_release(cmd->host->unique_id);
> +	imm_pb_release(cmd->device->host->unique_id);
>  
>      spin_lock_irqsave(host->host_lock, flags);
>      tmp->cur_cmd = 0;
> @@ -943,7 +943,7 @@
>  
>  static int imm_engine(imm_struct * tmp, Scsi_Cmnd * cmd)
>  {
> -    int host_no = cmd->host->unique_id;
> +    int host_no = cmd->device->host->unique_id;
>      unsigned short ppb = IMM_BASE(host_no);
>      unsigned char l = 0, h = 0;
>      int retv, x;
> @@ -972,7 +972,7 @@
>  
>  	/* Phase 2 - We are now talking to the scsi bus */
>      case 2:
> -	if (!imm_select(host_no, cmd->target)) {
> +	if (!imm_select(host_no, cmd->device->id)) {
>  	    imm_fail(host_no, DID_NO_CONNECT);
>  	    return 0;
>  	}
> @@ -1082,7 +1082,7 @@
>  
>  int imm_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
>  {
> -    int host_no = cmd->host->unique_id;
> +    int host_no = cmd->device->host->unique_id;
>  
>      if (imm_hosts[host_no].cur_cmd) {
>  	printk("IMM: bug in imm_queuecommand\n");
> @@ -1125,7 +1125,7 @@
>  
>  int imm_abort(Scsi_Cmnd * cmd)
>  {
> -    int host_no = cmd->host->unique_id;
> +    int host_no = cmd->device->host->unique_id;
>      /*
>       * There is no method for aborting commands since Iomega
>       * have tied the SCSI_MESSAGE line high in the interface
> @@ -1157,7 +1157,7 @@
>  
>  int imm_reset(Scsi_Cmnd * cmd)
>  {
> -    int host_no = cmd->host->unique_id;
> +    int host_no = cmd->device->host->unique_id;
>  
>      if (cmd->SCp.phase)
>  	imm_disconnect(host_no);

-andmike
--
Michael Anderson
andmike@us.ibm.com


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

* Re: [PATCH] scsi/imm.c compile errors in 2.5.60
  2003-02-11  8:34 ` Mike Anderson
@ 2003-02-11 12:52   ` James H. Cloos Jr.
  2003-02-11 15:54     ` Randy.Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: James H. Cloos Jr. @ 2003-02-11 12:52 UTC (permalink / raw)
  To: Mike Anderson; +Cc: Randy.Dunlap, linux-kernel, james.bottomley, campbell

Mike> Randy, It looks good. I cc'd David Campbell the listed
Mike> maintainer of the driver just to let him know of the update.

scsi/ppa.c (iomega's other scsi-over-parallel protocol) probably needs
the same fix.

-JimC


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

* Re: [PATCH] scsi/imm.c compile errors in 2.5.60
  2003-02-11 12:52   ` James H. Cloos Jr.
@ 2003-02-11 15:54     ` Randy.Dunlap
  2003-02-11 16:55       ` Mike Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2003-02-11 15:54 UTC (permalink / raw)
  To: James H. Cloos Jr.
  Cc: andmike, randy.dunlap, linux-kernel, james.bottomley, campbell

On 11 Feb 2003 07:52:00 -0500
"James H. Cloos Jr." <cloos@jhcloos.com> wrote:

| Mike> Randy, It looks good. I cc'd David Campbell the listed
| Mike> maintainer of the driver just to let him know of the update.
| 
| scsi/ppa.c (iomega's other scsi-over-parallel protocol) probably needs
| the same fix.

Yes, I was planning to go thru drivers/scsi/ looking for others
that need this repair.

--
~Randy

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

* Re: [PATCH] scsi/imm.c compile errors in 2.5.60
  2003-02-11 15:54     ` Randy.Dunlap
@ 2003-02-11 16:55       ` Mike Anderson
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Anderson @ 2003-02-11 16:55 UTC (permalink / raw)
  To: Randy.Dunlap
  Cc: James H. Cloos Jr.,
	randy.dunlap, linux-kernel, james.bottomley, campbell

Randy.Dunlap [rddunlap@osdl.org] wrote:
> On 11 Feb 2003 07:52:00 -0500
> "James H. Cloos Jr." <cloos@jhcloos.com> wrote:
> 
> | Mike> Randy, It looks good. I cc'd David Campbell the listed
> | Mike> maintainer of the driver just to let him know of the update.
> | 
> | scsi/ppa.c (iomega's other scsi-over-parallel protocol) probably needs
> | the same fix.
> 
> Yes, I was planning to go thru drivers/scsi/ looking for others
> that need this repair.
> 
> --
> ~Randy

Here is ppa.c. It has only been compiled, not tested.

-andmike
--
Michael Anderson
andmike@us.ibm.com

 ppa.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
------

===== drivers/scsi/ppa.c 1.17 vs edited =====
--- 1.17/drivers/scsi/ppa.c	Mon Nov 18 11:07:55 2002
+++ edited/drivers/scsi/ppa.c	Tue Feb 11 08:53:21 2003
@@ -106,7 +106,7 @@
 
 int ppa_detect(Scsi_Host_Template * host)
 {
-    struct Scsi_Host *hreg;
+    struct Scsi_Host *hreg = NULL;
     int ports;
     int i, nhosts, try_again;
     struct parport *pb;
@@ -148,7 +148,7 @@
 		      "pardevice is owning the port for too longtime!\n",
 			   i);
 		    parport_unregister_device(ppa_hosts[i].dev);
-		    spin_lock_irq(ppa_hosts[i].cur_cmd->host->host_lock);
+		    spin_lock_irq(ppa_hosts[i].cur_cmd->device->host->host_lock);
 		    return 0;
 		}
 	    }
@@ -635,7 +635,7 @@
 
 static inline int ppa_send_command(Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     int k;
 
     w_ctr(PPA_BASE(host_no), 0x0c);
@@ -661,7 +661,7 @@
      *  0     Told to schedule
      *  1     Finished data transfer
      */
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     unsigned short ppb = PPA_BASE(host_no);
     unsigned long start_jiffies = jiffies;
 
@@ -752,7 +752,7 @@
 int ppa_command(Scsi_Cmnd * cmd)
 {
     static int first_pass = 1;
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
 
     if (first_pass) {
 	printk("ppa: using non-queuing interface\n");
@@ -774,7 +774,7 @@
 	schedule();
 
     if (cmd->SCp.phase)		/* Only disconnect if we have connected */
-	ppa_disconnect(cmd->host->unique_id);
+	ppa_disconnect(cmd->device->host->unique_id);
 
     ppa_pb_release(host_no);
     ppa_hosts[host_no].cur_cmd = 0;
@@ -836,21 +836,21 @@
 #endif
 
     if (cmd->SCp.phase > 1)
-	ppa_disconnect(cmd->host->unique_id);
+	ppa_disconnect(cmd->device->host->unique_id);
     if (cmd->SCp.phase > 0)
-	ppa_pb_release(cmd->host->unique_id);
+	ppa_pb_release(cmd->device->host->unique_id);
 
     tmp->cur_cmd = 0;
     
-    spin_lock_irqsave(cmd->host->host_lock, flags);
+    spin_lock_irqsave(cmd->device->host->host_lock, flags);
     cmd->scsi_done(cmd);
-    spin_unlock_irqrestore(cmd->host->host_lock, flags);
+    spin_unlock_irqrestore(cmd->device->host->host_lock, flags);
     return;
 }
 
 static int ppa_engine(ppa_struct * tmp, Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     unsigned short ppb = PPA_BASE(host_no);
     unsigned char l = 0, h = 0;
     int retv;
@@ -900,7 +900,7 @@
 	}
 
     case 2:			/* Phase 2 - We are now talking to the scsi bus */
-	if (!ppa_select(host_no, cmd->target)) {
+	if (!ppa_select(host_no, cmd->device->id)) {
 	    ppa_fail(host_no, DID_NO_CONNECT);
 	    return 0;
 	}
@@ -966,7 +966,7 @@
 
 int ppa_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
 
     if (ppa_hosts[host_no].cur_cmd) {
 	printk("PPA: bug in ppa_queuecommand\n");
@@ -1011,7 +1011,7 @@
 
 int ppa_abort(Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
     /*
      * There is no method for aborting commands since Iomega
      * have tied the SCSI_MESSAGE line high in the interface
@@ -1039,7 +1039,7 @@
 
 int ppa_reset(Scsi_Cmnd * cmd)
 {
-    int host_no = cmd->host->unique_id;
+    int host_no = cmd->device->host->unique_id;
 
     if (cmd->SCp.phase)
 	ppa_disconnect(host_no);

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

end of thread, other threads:[~2003-02-11 16:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11  6:07 [PATCH] scsi/imm.c compile errors in 2.5.60 Randy.Dunlap
2003-02-11  8:34 ` Mike Anderson
2003-02-11 12:52   ` James H. Cloos Jr.
2003-02-11 15:54     ` Randy.Dunlap
2003-02-11 16:55       ` Mike Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).