MFP4 (driver change only):

Change 231100 by brooks@brooks_zenith on 2013/07/12 21:01:31

	Add a new option ALTERA_SDCARD_FAST_SIM which checks immediatly
	for success of I/O operations rather than queuing a task.

MFC after:	3 days
Sponsored by:	DARPA/AFRL
This commit is contained in:
Brooks Davis 2013-10-18 15:27:11 +00:00
parent 1818891c93
commit e908804339
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256744
2 changed files with 15 additions and 4 deletions

View File

@ -68,6 +68,7 @@ TEXTDUMP_VERBOSE opt_ddb.h
# Miscellaneous options.
ADAPTIVE_LOCKMGRS
ALQ
ALTERA_SDCARD_FAST_SIM opt_altera_sdcard.h
AUDIT opt_global.h
BOOTHOWTO opt_global.h
BOOTVERBOSE opt_global.h

View File

@ -31,6 +31,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_altera_sdcard.h"
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/condvar.h>
@ -258,6 +260,9 @@ altera_sdcard_task_io(struct altera_sdcard_softc *sc)
ALTERA_SDCARD_LOCK_ASSERT(sc);
KASSERT(sc->as_currentbio != NULL, ("%s: no current I/O", __func__));
#ifdef ALTERA_SDCARD_FAST_SIM
recheck:
#endif
asr = altera_sdcard_read_asr(sc);
/*
@ -299,9 +304,12 @@ altera_sdcard_task_io(struct altera_sdcard_softc *sc)
/*
* Finally, either start the next I/O or transition to the IDLE state.
*/
if (bioq_first(&sc->as_bioq) != NULL)
if (bioq_first(&sc->as_bioq) != NULL) {
altera_sdcard_nextio(sc);
else
#ifdef ALTERA_SDCARD_FAST_SIM
goto recheck;
#endif
} else
sc->as_state = ALTERA_SDCARD_STATE_IDLE;
}
@ -398,6 +406,8 @@ altera_sdcard_start(struct altera_sdcard_softc *sc)
taskqueue_cancel_timeout(sc->as_taskqueue, &sc->as_task, NULL);
altera_sdcard_nextio(sc);
taskqueue_enqueue_timeout(sc->as_taskqueue, &sc->as_task,
ALTERA_SDCARD_TIMEOUT_IO);
#ifdef ALTERA_SDCARD_FAST_SIM
altera_sdcard_task_io(sc);
#endif
altera_sdcard_task_rechedule(sc);
}