Commit f7ff898a authored by James Bottomley's avatar James Bottomley Committed by James Bottomley

[SCSI] aic7xxx: fix bug in DT handing

Basically DT isn't reported or handled at all.  The problem is that
lines of code like this:

spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ;

don't do what you think they do when spi_dt is a single bit variable.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e572f7cc
...@@ -1635,9 +1635,9 @@ ahc_send_async(struct ahc_softc *ahc, char channel, ...@@ -1635,9 +1635,9 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
spi_period(starget) = tinfo->curr.period; spi_period(starget) = tinfo->curr.period;
spi_width(starget) = tinfo->curr.width; spi_width(starget) = tinfo->curr.width;
spi_offset(starget) = tinfo->curr.offset; spi_offset(starget) = tinfo->curr.offset;
spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ; spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0;
spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ; spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0;
spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ; spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
spi_display_xfer_agreement(starget); spi_display_xfer_agreement(starget);
break; break;
} }
...@@ -2435,8 +2435,10 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt) ...@@ -2435,8 +2435,10 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
if (dt) { if (dt) {
period = 9; /* 12.5ns is the only period valid for DT */ period = 9; /* 12.5ns is the only period valid for DT */
ppr_options |= MSG_EXT_PPR_DT_REQ; ppr_options |= MSG_EXT_PPR_DT_REQ;
} else if (period == 9) } else if (period == 9) {
period = 10; /* if resetting DT, period must be >= 25ns */ period = 10; /* if resetting DT, period must be >= 25ns */
ppr_options &= ~MSG_EXT_PPR_DT_REQ;
}
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR); starget->channel + 'A', ROLE_INITIATOR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment