[SCSI] fix aic7xxx coupled parameter problem
For setting coupled parameters, we need to be comparing against the goal settings, not the current ones. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
521314c122
commit
597487b9ba
@@ -2552,9 +2552,9 @@ static void ahc_linux_set_period(struct scsi_target *starget, int period)
|
|||||||
starget->channel + 'A',
|
starget->channel + 'A',
|
||||||
shost->this_id, starget->id, &tstate);
|
shost->this_id, starget->id, &tstate);
|
||||||
struct ahc_devinfo devinfo;
|
struct ahc_devinfo devinfo;
|
||||||
unsigned int ppr_options = tinfo->curr.ppr_options;
|
unsigned int ppr_options = tinfo->goal.ppr_options;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned long offset = tinfo->curr.offset;
|
unsigned long offset = tinfo->goal.offset;
|
||||||
struct ahc_syncrate *syncrate;
|
struct ahc_syncrate *syncrate;
|
||||||
|
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
@@ -2600,8 +2600,8 @@ static void ahc_linux_set_offset(struct scsi_target *starget, int offset)
|
|||||||
starget->channel + 'A', ROLE_INITIATOR);
|
starget->channel + 'A', ROLE_INITIATOR);
|
||||||
if (offset != 0) {
|
if (offset != 0) {
|
||||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
||||||
period = tinfo->curr.period;
|
period = tinfo->goal.period;
|
||||||
ppr_options = tinfo->curr.ppr_options;
|
ppr_options = tinfo->goal.ppr_options;
|
||||||
}
|
}
|
||||||
ahc_lock(ahc, &flags);
|
ahc_lock(ahc, &flags);
|
||||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset,
|
ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset,
|
||||||
@@ -2619,9 +2619,9 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
|
|||||||
starget->channel + 'A',
|
starget->channel + 'A',
|
||||||
shost->this_id, starget->id, &tstate);
|
shost->this_id, starget->id, &tstate);
|
||||||
struct ahc_devinfo devinfo;
|
struct ahc_devinfo devinfo;
|
||||||
unsigned int ppr_options = tinfo->curr.ppr_options
|
unsigned int ppr_options = tinfo->goal.ppr_options
|
||||||
& ~MSG_EXT_PPR_DT_REQ;
|
& ~MSG_EXT_PPR_DT_REQ;
|
||||||
unsigned int period = tinfo->curr.period;
|
unsigned int period = tinfo->goal.period;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct ahc_syncrate *syncrate;
|
struct ahc_syncrate *syncrate;
|
||||||
|
|
||||||
@@ -2635,7 +2635,7 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
|
|||||||
starget->channel + 'A', ROLE_INITIATOR);
|
starget->channel + 'A', ROLE_INITIATOR);
|
||||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);
|
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);
|
||||||
ahc_lock(ahc, &flags);
|
ahc_lock(ahc, &flags);
|
||||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset,
|
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
|
||||||
ppr_options, AHC_TRANS_GOAL, FALSE);
|
ppr_options, AHC_TRANS_GOAL, FALSE);
|
||||||
ahc_unlock(ahc, &flags);
|
ahc_unlock(ahc, &flags);
|
||||||
}
|
}
|
||||||
@@ -2650,9 +2650,9 @@ static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
|
|||||||
starget->channel + 'A',
|
starget->channel + 'A',
|
||||||
shost->this_id, starget->id, &tstate);
|
shost->this_id, starget->id, &tstate);
|
||||||
struct ahc_devinfo devinfo;
|
struct ahc_devinfo devinfo;
|
||||||
unsigned int ppr_options = tinfo->curr.ppr_options
|
unsigned int ppr_options = tinfo->goal.ppr_options
|
||||||
& ~MSG_EXT_PPR_QAS_REQ;
|
& ~MSG_EXT_PPR_QAS_REQ;
|
||||||
unsigned int period = tinfo->curr.period;
|
unsigned int period = tinfo->goal.period;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct ahc_syncrate *syncrate;
|
struct ahc_syncrate *syncrate;
|
||||||
|
|
||||||
@@ -2663,7 +2663,7 @@ static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
|
|||||||
starget->channel + 'A', ROLE_INITIATOR);
|
starget->channel + 'A', ROLE_INITIATOR);
|
||||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
||||||
ahc_lock(ahc, &flags);
|
ahc_lock(ahc, &flags);
|
||||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset,
|
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
|
||||||
ppr_options, AHC_TRANS_GOAL, FALSE);
|
ppr_options, AHC_TRANS_GOAL, FALSE);
|
||||||
ahc_unlock(ahc, &flags);
|
ahc_unlock(ahc, &flags);
|
||||||
}
|
}
|
||||||
@@ -2678,9 +2678,9 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
|
|||||||
starget->channel + 'A',
|
starget->channel + 'A',
|
||||||
shost->this_id, starget->id, &tstate);
|
shost->this_id, starget->id, &tstate);
|
||||||
struct ahc_devinfo devinfo;
|
struct ahc_devinfo devinfo;
|
||||||
unsigned int ppr_options = tinfo->curr.ppr_options
|
unsigned int ppr_options = tinfo->goal.ppr_options
|
||||||
& ~MSG_EXT_PPR_IU_REQ;
|
& ~MSG_EXT_PPR_IU_REQ;
|
||||||
unsigned int period = tinfo->curr.period;
|
unsigned int period = tinfo->goal.period;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct ahc_syncrate *syncrate;
|
struct ahc_syncrate *syncrate;
|
||||||
|
|
||||||
@@ -2691,7 +2691,7 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
|
|||||||
starget->channel + 'A', ROLE_INITIATOR);
|
starget->channel + 'A', ROLE_INITIATOR);
|
||||||
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
|
||||||
ahc_lock(ahc, &flags);
|
ahc_lock(ahc, &flags);
|
||||||
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset,
|
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset,
|
||||||
ppr_options, AHC_TRANS_GOAL, FALSE);
|
ppr_options, AHC_TRANS_GOAL, FALSE);
|
||||||
ahc_unlock(ahc, &flags);
|
ahc_unlock(ahc, &flags);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user