summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-07-30 10:37:55 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-30 10:44:38 -0500
commitf7ff898ad3971cd36967453d331c57d97d407007 (patch)
tree825bf8e4bd9f6eb3c3e5edf69f4dab84033e946e /drivers/scsi/aic7xxx/aic7xxx_osm.c
parente572f7cc28a0b01b96ede3f78f448ad55c5e67ad (diff)
downloadblackbird-op-linux-f7ff898ad3971cd36967453d331c57d97d407007.tar.gz
blackbird-op-linux-f7ff898ad3971cd36967453d331c57d97d407007.zip
[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: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 116d0f51ca2c..d0d0b84a31f4 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1635,9 +1635,9 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
spi_period(starget) = tinfo->curr.period;
spi_width(starget) = tinfo->curr.width;
spi_offset(starget) = tinfo->curr.offset;
- spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ;
- spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ;
- spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_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 ? 1 : 0;
+ spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
spi_display_xfer_agreement(starget);
break;
}
@@ -2435,8 +2435,10 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
if (dt) {
period = 9; /* 12.5ns is the only period valid for DT */
ppr_options |= MSG_EXT_PPR_DT_REQ;
- } else if (period == 9)
+ } else if (period == 9) {
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,
starget->channel + 'A', ROLE_INITIATOR);
OpenPOWER on IntegriCloud