This is an MFC candidate.

Add the AAC_DEBUG option to enable debugging in the aac driver.

Correct a race condition in the interrupt handler where the
controller may queue a fib to a response queue after the driver
has serviced the queue but before the interrupt is cleared.
This could leave a completed fib stranded in the response queue
unless another I/O completed and generated another interrupt.

Reviewed by:	msmith
This commit is contained in:
Justin T. Gibbs 2001-03-17 00:12:15 +00:00
parent acf1b64c89
commit da4c1ce305
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74374
3 changed files with 6 additions and 2 deletions

View file

@ -483,14 +483,14 @@ aac_intr(void *arg)
/* controller has a message for us? */
if (reason & AAC_DB_COMMAND_READY) {
aac_host_command(sc);
AAC_CLEAR_ISTATUS(sc, AAC_DB_COMMAND_READY);
aac_host_command(sc);
}
/* controller has a response for us? */
if (reason & AAC_DB_RESPONSE_READY) {
aac_host_response(sc);
AAC_CLEAR_ISTATUS(sc, AAC_DB_RESPONSE_READY);
aac_host_response(sc);
}
/* spurious interrupts that we don't use - reset the mask and clear the interrupts */

View file

@ -47,6 +47,7 @@
#include <dev/aac/aac_ioctl.h>
#include <dev/aac/aacvar.h>
#ifdef AAC_DEBUG
void aac_printstate0(void);
void aac_intr0(void);
@ -434,3 +435,4 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif)
break;
}
}
#endif

View file

@ -95,6 +95,8 @@
********************************************************************************
********************************************************************************/
#include "opt_aac.h"
#if __FreeBSD_version >= 500005
# include <sys/taskqueue.h>
#endif