Subject: Re: 'ahc' diff for ordered writes -- correct?
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 06/01/2000 11:18:14
On Thu, Jun 01, 2000 at 01:48:05PM -0400, Thor Lancelot Simon wrote:
> if (ahc_istagged_device(ahc, xs, 0))
> ! scb->hscb->control |= MSG_SIMPLE_Q_TAG;
> else
> ahc_busy_tcl(ahc, scb);
>
> --- 4014,4023 ----
> hscb->tcl = tcl;
>
> if (ahc_istagged_device(ahc, xs, 0))
> ! if(xs->bp->b_flags & B_ASYNC)
> ! scb->hscb->control |= MSG_SIMPLE_Q_TAG;
> ! else
> ! scb->hscb->control |= MSG_ORDERED_Q_TAG;
> else
> ahc_busy_tcl(ahc, scb);
You'd better make sure there's a "bp" there. I would write it like:
/* If no buf, not async by definition. */
if (xs->bp != NULL && xs->bp->b_flags & B_ASYNC)
scb->hscb->control |= MSG_SIMPLE_Q_TAG;
else
scb->hscb->control |= MSG_ORDERED_Q_TAG;
--
-- Jason R. Thorpe <thorpej@zembu.com>