Subject: 'ahc' diff for ordered writes -- correct?
To: None <tech-kern@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 06/01/2000 13:48:05
The logic by which tags get put into SCBs in aic7xxx.c is rather, um,
twisty.  I'd like it if someone else could confirm my impression that
the enclosed diff is correct, and is all that's necessary to ensure
that synchronous writes get done with ordered tags.


Index: aic7xxx.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/ic/aic7xxx.c,v
retrieving revision 1.54
diff -c -r1.54 aic7xxx.c
*** aic7xxx.c	2000/05/29 20:13:53	1.54
--- aic7xxx.c	2000/06/01 17:30:37
***************
*** 4014,4020 ****
  	hscb->tcl = tcl;
  
  	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);
  
-- 
Thor Lancelot Simon	                                      tls@rek.tjls.com
	"And where do all these highways go, now that we are free?"