diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2005-06-03 10:49:01 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-06-03 13:38:39 -0400 |
commit | 597487b9ba875785f3ee9bd541073e9edd2e700a (patch) | |
tree | f573d4cf734042b0424b653fdc5ae2602eb2eb2d /drivers | |
parent | 521314c122ea0cd58e5184443b8cc28f82ee2136 (diff) |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 57d22c4f0081..34e486aba46b 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -2552,9 +2552,9 @@ static void ahc_linux_set_period(struct scsi_target *starget, int period) | |||
2552 | starget->channel + 'A', | 2552 | starget->channel + 'A', |
2553 | shost->this_id, starget->id, &tstate); | 2553 | shost->this_id, starget->id, &tstate); |
2554 | struct ahc_devinfo devinfo; | 2554 | struct ahc_devinfo devinfo; |
2555 | unsigned int ppr_options = tinfo->curr.ppr_options; | 2555 | unsigned int ppr_options = tinfo->goal.ppr_options; |
2556 | unsigned long flags; | 2556 | unsigned long flags; |
2557 | unsigned long offset = tinfo->curr.offset; | 2557 | unsigned long offset = tinfo->goal.offset; |
2558 | struct ahc_syncrate *syncrate; | 2558 | struct ahc_syncrate *syncrate; |
2559 | 2559 | ||
2560 | if (offset == 0) | 2560 | if (offset == 0) |
@@ -2600,8 +2600,8 @@ static void ahc_linux_set_offset(struct scsi_target *starget, int offset) | |||
2600 | starget->channel + 'A', ROLE_INITIATOR); | 2600 | starget->channel + 'A', ROLE_INITIATOR); |
2601 | if (offset != 0) { | 2601 | if (offset != 0) { |
2602 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); | 2602 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); |
2603 | period = tinfo->curr.period; | 2603 | period = tinfo->goal.period; |
2604 | ppr_options = tinfo->curr.ppr_options; | 2604 | ppr_options = tinfo->goal.ppr_options; |
2605 | } | 2605 | } |
2606 | ahc_lock(ahc, &flags); | 2606 | ahc_lock(ahc, &flags); |
2607 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset, | 2607 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset, |
@@ -2619,9 +2619,9 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt) | |||
2619 | starget->channel + 'A', | 2619 | starget->channel + 'A', |
2620 | shost->this_id, starget->id, &tstate); | 2620 | shost->this_id, starget->id, &tstate); |
2621 | struct ahc_devinfo devinfo; | 2621 | struct ahc_devinfo devinfo; |
2622 | unsigned int ppr_options = tinfo->curr.ppr_options | 2622 | unsigned int ppr_options = tinfo->goal.ppr_options |
2623 | & ~MSG_EXT_PPR_DT_REQ; | 2623 | & ~MSG_EXT_PPR_DT_REQ; |
2624 | unsigned int period = tinfo->curr.period; | 2624 | unsigned int period = tinfo->goal.period; |
2625 | unsigned long flags; | 2625 | unsigned long flags; |
2626 | struct ahc_syncrate *syncrate; | 2626 | struct ahc_syncrate *syncrate; |
2627 | 2627 | ||
@@ -2635,7 +2635,7 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt) | |||
2635 | starget->channel + 'A', ROLE_INITIATOR); | 2635 | starget->channel + 'A', ROLE_INITIATOR); |
2636 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT); | 2636 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT); |
2637 | ahc_lock(ahc, &flags); | 2637 | ahc_lock(ahc, &flags); |
2638 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset, | 2638 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset, |
2639 | ppr_options, AHC_TRANS_GOAL, FALSE); | 2639 | ppr_options, AHC_TRANS_GOAL, FALSE); |
2640 | ahc_unlock(ahc, &flags); | 2640 | ahc_unlock(ahc, &flags); |
2641 | } | 2641 | } |
@@ -2650,9 +2650,9 @@ static void ahc_linux_set_qas(struct scsi_target *starget, int qas) | |||
2650 | starget->channel + 'A', | 2650 | starget->channel + 'A', |
2651 | shost->this_id, starget->id, &tstate); | 2651 | shost->this_id, starget->id, &tstate); |
2652 | struct ahc_devinfo devinfo; | 2652 | struct ahc_devinfo devinfo; |
2653 | unsigned int ppr_options = tinfo->curr.ppr_options | 2653 | unsigned int ppr_options = tinfo->goal.ppr_options |
2654 | & ~MSG_EXT_PPR_QAS_REQ; | 2654 | & ~MSG_EXT_PPR_QAS_REQ; |
2655 | unsigned int period = tinfo->curr.period; | 2655 | unsigned int period = tinfo->goal.period; |
2656 | unsigned long flags; | 2656 | unsigned long flags; |
2657 | struct ahc_syncrate *syncrate; | 2657 | struct ahc_syncrate *syncrate; |
2658 | 2658 | ||
@@ -2663,7 +2663,7 @@ static void ahc_linux_set_qas(struct scsi_target *starget, int qas) | |||
2663 | starget->channel + 'A', ROLE_INITIATOR); | 2663 | starget->channel + 'A', ROLE_INITIATOR); |
2664 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); | 2664 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); |
2665 | ahc_lock(ahc, &flags); | 2665 | ahc_lock(ahc, &flags); |
2666 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset, | 2666 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset, |
2667 | ppr_options, AHC_TRANS_GOAL, FALSE); | 2667 | ppr_options, AHC_TRANS_GOAL, FALSE); |
2668 | ahc_unlock(ahc, &flags); | 2668 | ahc_unlock(ahc, &flags); |
2669 | } | 2669 | } |
@@ -2678,9 +2678,9 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu) | |||
2678 | starget->channel + 'A', | 2678 | starget->channel + 'A', |
2679 | shost->this_id, starget->id, &tstate); | 2679 | shost->this_id, starget->id, &tstate); |
2680 | struct ahc_devinfo devinfo; | 2680 | struct ahc_devinfo devinfo; |
2681 | unsigned int ppr_options = tinfo->curr.ppr_options | 2681 | unsigned int ppr_options = tinfo->goal.ppr_options |
2682 | & ~MSG_EXT_PPR_IU_REQ; | 2682 | & ~MSG_EXT_PPR_IU_REQ; |
2683 | unsigned int period = tinfo->curr.period; | 2683 | unsigned int period = tinfo->goal.period; |
2684 | unsigned long flags; | 2684 | unsigned long flags; |
2685 | struct ahc_syncrate *syncrate; | 2685 | struct ahc_syncrate *syncrate; |
2686 | 2686 | ||
@@ -2691,7 +2691,7 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu) | |||
2691 | starget->channel + 'A', ROLE_INITIATOR); | 2691 | starget->channel + 'A', ROLE_INITIATOR); |
2692 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); | 2692 | syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT); |
2693 | ahc_lock(ahc, &flags); | 2693 | ahc_lock(ahc, &flags); |
2694 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset, | 2694 | ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->goal.offset, |
2695 | ppr_options, AHC_TRANS_GOAL, FALSE); | 2695 | ppr_options, AHC_TRANS_GOAL, FALSE); |
2696 | ahc_unlock(ahc, &flags); | 2696 | ahc_unlock(ahc, &flags); |
2697 | } | 2697 | } |