Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2013 15:27:11 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256744 - in head/sys: conf dev/altera/sdcard
Message-ID:  <201310181527.r9IFRBEA031315@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Oct 18 15:27:11 2013
New Revision: 256744
URL: http://svnweb.freebsd.org/changeset/base/256744

Log:
  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

Modified:
  head/sys/conf/options
  head/sys/dev/altera/sdcard/altera_sdcard.c

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options	Fri Oct 18 15:24:18 2013	(r256743)
+++ head/sys/conf/options	Fri Oct 18 15:27:11 2013	(r256744)
@@ -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

Modified: head/sys/dev/altera/sdcard/altera_sdcard.c
==============================================================================
--- head/sys/dev/altera/sdcard/altera_sdcard.c	Fri Oct 18 15:24:18 2013	(r256743)
+++ head/sys/dev/altera/sdcard/altera_sdcard.c	Fri Oct 18 15:27:11 2013	(r256744)
@@ -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_sdca
 	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_sdca
 	/*
 	 * 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
 
 	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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310181527.r9IFRBEA031315>