提交 e4862fed 编写于 作者: J James Bottomley 提交者: James Bottomley

[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: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 949bf797
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册