diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2005-05-06 22:14:48 +0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-05-07 00:12:02 +0400 |
commit | e4862fedbc37a2c242824b100101f8e6e8488748 (patch) | |
tree | 428cfeddc46cc3a7b695b65e34d8054494b55281 /drivers/scsi/sym53c8xx_2 | |
parent | 949bf797595fc99d4cadf9a294fe6fd32a4474e6 (diff) | |
download | linux-e4862fedbc37a2c242824b100101f8e6e8488748.tar.xz |
[SCSI] correct the sym2 period setting routines
There's a slight bug in the routines in that if the period requires dt,
then the routine will unconditionally set it. DT may only be set if
Wide is also set, so this turns back on the wide bit.
For domain validation to work correctly, we need to observe the wide bit
absolutely.
Acked by: Matthew Wilcox <willy@debian.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2')
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 5ff83d214f12..5b07c6ec3ecc 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -2038,8 +2038,9 @@ static void sym2_set_period(struct scsi_target *starget, int period) struct sym_hcb *np = sym_get_hcb(shost); struct sym_tcb *tp = &np->target[starget->id]; - /* have to have DT for these transfers */ - if (period <= np->minsync) + /* have to have DT for these transfers, but DT will also + * set width, so check that this is allowed */ + if (period <= np->minsync && spi_width(starget)) tp->tgoal.dt = 1; tp->tgoal.period = period; |