aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth_proc.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-10-02 17:14:39 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:56:05 -0400
commit3058d5de47ce09ac0e531290566937c7d94d0653 (patch)
treec8a6a5326370b492bdb45f9c698aa6cba7342763 /drivers/scsi/gdth_proc.c
parent884f7fba09646714f94d945162e698f0822a6fdd (diff)
[SCSI] gdth: Setup proper per-command private data
- scsi_cmnd and specifically ->SCp of, where heavily abused with internal meaning members and flags. So introduce a new struct gdth_cmndinfo, put it on ->host_scribble and define a gdth_cmnd_priv() accessor to retrieve it from a scsi_cmnd. - The structure now holds two members: internal_command - replaces the IS_GDTH_INTERNAL_CMD() croft. sense_paddr - which was a 64-bit spanning on 2 32-bit members of SCp. More overloaded members from SCp and scsi_cmnd will be moved in a later patch (For easy review). - Split up gdth_queuecommand to an additional internal_function. The later is the one called by gdth_execute(). This will be more evident later in the scsi accessors patch, but it also facilitates in the differentiation between internal_command and external. And the setup of gdth_cmndinfo of each command. 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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c
index fe070ab991a0..ad1b60dbcf9c 100644
--- a/drivers/scsi/gdth_proc.c
+++ b/drivers/scsi/gdth_proc.c
@@ -758,7 +758,8 @@ static void gdth_stop_timeout(gdth_ha_str *ha, int busnum, int id)
758 spin_lock_irqsave(&ha->smp_lock, flags); 758 spin_lock_irqsave(&ha->smp_lock, flags);
759 759
760 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) { 760 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) {
761 if (!IS_GDTH_INTERNAL_CMD(scp)) { 761 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
762 if (!cmndinfo->internal_command) {
762 b = scp->device->channel; 763 b = scp->device->channel;
763 t = scp->device->id; 764 t = scp->device->id;
764 if (t == (unchar)id && b == (unchar)busnum) { 765 if (t == (unchar)id && b == (unchar)busnum) {
@@ -779,7 +780,8 @@ static void gdth_start_timeout(gdth_ha_str *ha, int busnum, int id)
779 spin_lock_irqsave(&ha->smp_lock, flags); 780 spin_lock_irqsave(&ha->smp_lock, flags);
780 781
781 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) { 782 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) {
782 if (!IS_GDTH_INTERNAL_CMD(scp)) { 783 struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
784 if (!cmndinfo->internal_command) {
783 b = scp->device->channel; 785 b = scp->device->channel;
784 t = scp->device->id; 786 t = scp->device->id;
785 if (t == (unchar)id && b == (unchar)busnum) { 787 if (t == (unchar)id && b == (unchar)busnum) {