From f842b64e0ffbcc9ce48a3bf799d0b005094107c1 Mon Sep 17 00:00:00 2001 From: Boaz Harrosh Date: Tue, 2 Oct 2007 23:16:01 +0200 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/gdth_proc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/scsi/gdth_proc.c') 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) ulong flags; int i; Scsi_Cmnd *scp; + struct gdth_cmndinfo *cmndinfo; unchar b, t; spin_lock_irqsave(&ha->smp_lock, flags); for (i = 0; i < GDTH_MAXCMDS; ++i) { scp = ha->cmd_tab[i].cmnd; + cmndinfo = gdth_cmnd_priv(scp); b = scp->device->channel; t = scp->device->id; if (!SPECIAL_SCP(scp) && t == (unchar)id && b == (unchar)busnum) { - scp->SCp.have_data_in = 0; + cmndinfo->wait_for_completion = 0; spin_unlock_irqrestore(&ha->smp_lock, flags); - while (!scp->SCp.have_data_in) + while (!cmndinfo->wait_for_completion) barrier(); spin_lock_irqsave(&ha->smp_lock, flags); } @@ -764,7 +766,7 @@ static void gdth_stop_timeout(gdth_ha_str *ha, int busnum, int id) t = scp->device->id; if (t == (unchar)id && b == (unchar)busnum) { TRACE2(("gdth_stop_timeout(): update_timeout()\n")); - scp->SCp.buffers_residual = gdth_update_timeout(scp, 0); + cmndinfo->timeout = gdth_update_timeout(scp, 0); } } } @@ -786,7 +788,7 @@ static void gdth_start_timeout(gdth_ha_str *ha, int busnum, int id) t = scp->device->id; if (t == (unchar)id && b == (unchar)busnum) { TRACE2(("gdth_start_timeout(): update_timeout()\n")); - gdth_update_timeout(scp, scp->SCp.buffers_residual); + gdth_update_timeout(scp, cmndinfo->timeout); } } } -- cgit v1.2.3-59-g8ed1b