aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth_proc.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-10-02 17:16:01 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:56:09 -0400
commitf842b64e0ffbcc9ce48a3bf799d0b005094107c1 (patch)
tree30f1d9fa5024d647886d651be0009eba728bbbfa /drivers/scsi/gdth_proc.c
parent3058d5de47ce09ac0e531290566937c7d94d0653 (diff)
[SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2
- Cleanup the rest of the scsi_cmnd->SCp members and move them to gdth_cmndinfo: SCp.this_residual => priority SCp.buffers_residual => timeout SCp.Status => status and dma_dir SCp.Message => info SCp.have_data_in => volatile wait_for_completion SCp.sent_command => OpCode SCp.phase => phase - Two more members will be naturally removed in the !use_sg cleanup TODO: What is the meaning of gdth_cmndinfo.phase? (rhetorically) Signed-off-by Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/gdth_proc.c')
-rw-r--r--drivers/scsi/gdth_proc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c
index ad1b60dbcf9c..de5773443c62 100644
--- a/drivers/scsi/gdth_proc.c
+++ b/drivers/scsi/gdth_proc.c
@@ -728,20 +728,22 @@ static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id)
728 ulong flags; 728 ulong flags;
729 int i; 729 int i;
730 Scsi_Cmnd *scp; 730 Scsi_Cmnd *scp;
731 struct gdth_cmndinfo *cmndinfo;
731 unchar b, t; 732 unchar b, t;
732 733
733 spin_lock_irqsave(&ha->smp_lock, flags); 734 spin_lock_irqsave(&ha->smp_lock, flags);
734 735
735 for (i = 0; i < GDTH_MAXCMDS; ++i) { 736 for (i = 0; i < GDTH_MAXCMDS; ++i) {
736 scp = ha->cmd_tab[i].cmnd; 737 scp = ha->cmd_tab[i].cmnd;
738 cmndinfo = gdth_cmnd_priv(scp);
737 739
738 b = scp->device->channel; 740 b = scp->device->channel;
739 t = scp->device->id; 741 t = scp->device->id;
740 if (!SPECIAL_SCP(scp) && t == (unchar)id && 742 if (!SPECIAL_SCP(scp) && t == (unchar)id &&
741 b == (unchar)busnum) { 743 b == (unchar)busnum) {
742 scp->SCp.have_data_in = 0; 744 cmndinfo->wait_for_completion = 0;
743 spin_unlock_irqrestore(&ha->smp_lock, flags); 745 spin_unlock_irqrestore(&ha->smp_lock, flags);
744 while (!scp->SCp.have_data_in) 746 while (!cmndinfo->wait_for_completion)
745 barrier(); 747 barrier();
746 spin_lock_irqsave(&ha->smp_lock, flags); 748 spin_lock_irqsave(&ha->smp_lock, flags);
747 } 749 }
@@ -764,7 +766,7 @@ static void gdth_stop_timeout(gdth_ha_str *ha, int busnum, int id)
764 t = scp->device->id; 766 t = scp->device->id;
765 if (t == (unchar)id && b == (unchar)busnum) { 767 if (t == (unchar)id && b == (unchar)busnum) {
766 TRACE2(("gdth_stop_timeout(): update_timeout()\n")); 768 TRACE2(("gdth_stop_timeout(): update_timeout()\n"));
767 scp->SCp.buffers_residual = gdth_update_timeout(scp, 0); 769 cmndinfo->timeout = gdth_update_timeout(scp, 0);
768 } 770 }
769 } 771 }
770 } 772 }
@@ -786,7 +788,7 @@ static void gdth_start_timeout(gdth_ha_str *ha, int busnum, int id)
786 t = scp->device->id; 788 t = scp->device->id;
787 if (t == (unchar)id && b == (unchar)busnum) { 789 if (t == (unchar)id && b == (unchar)busnum) {
788 TRACE2(("gdth_start_timeout(): update_timeout()\n")); 790 TRACE2(("gdth_start_timeout(): update_timeout()\n"));
789 gdth_update_timeout(scp, scp->SCp.buffers_residual); 791 gdth_update_timeout(scp, cmndinfo->timeout);
790 } 792 }
791 } 793 }
792 } 794 }