From owner-svn-src-head@FreeBSD.ORG Fri Oct 18 15:27:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D2B9193; Fri, 18 Oct 2013 15:27:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30E9B2B0D; Fri, 18 Oct 2013 15:27:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9IFRC6A031317; Fri, 18 Oct 2013 15:27:12 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9IFRBEA031315; Fri, 18 Oct 2013 15:27:11 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201310181527.r9IFRBEA031315@svn.freebsd.org> From: Brooks Davis Date: Fri, 18 Oct 2013 15:27:11 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Oct 2013 15:27:12 -0000 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 __FBSDID("$FreeBSD$"); +#include "opt_altera_sdcard.h" + #include #include #include @@ -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); }