Module Name:    src
Committed By:   skrll
Date:           Mon Jul 27 07:53:46 UTC 2015

Modified Files:
        src/sys/dev/sdmmc: ld_sdmmc.c

Log Message:
Don't timeout waiting for ld_sdmmc_dobio in the IO thread to start.

XXX why does it take >1s to get scheduled?


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sdmmc/ld_sdmmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sdmmc/ld_sdmmc.c
diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.16 src/sys/dev/sdmmc/ld_sdmmc.c:1.17
--- src/sys/dev/sdmmc/ld_sdmmc.c:1.16	Wed May 20 13:09:34 2015
+++ src/sys/dev/sdmmc/ld_sdmmc.c	Mon Jul 27 07:53:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_sdmmc.c,v 1.16 2015/05/20 13:09:34 jmcneill Exp $	*/
+/*	$NetBSD: ld_sdmmc.c,v 1.17 2015/07/27 07:53:46 skrll Exp $	*/
 
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.16 2015/05/20 13:09:34 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.17 2015/07/27 07:53:46 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -41,7 +41,6 @@ __KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v
 #include <sys/buf.h>
 #include <sys/bufq.h>
 #include <sys/bus.h>
-#include <sys/callout.h>
 #include <sys/endian.h>
 #include <sys/dkio.h>
 #include <sys/disk.h>
@@ -65,7 +64,6 @@ struct ld_sdmmc_task {
 
 	struct ld_sdmmc_softc *task_sc;
 	struct buf *task_bp;
-	callout_t task_callout;
 };
 
 struct ld_sdmmc_softc {
@@ -85,7 +83,6 @@ static int ld_sdmmc_start(struct ld_soft
 
 static void ld_sdmmc_doattach(void *);
 static void ld_sdmmc_dobio(void *);
-static void ld_sdmmc_timeout(void *);
 
 CFATTACH_DECL_NEW(ld_sdmmc, sizeof(struct ld_sdmmc_softc),
     ld_sdmmc_match, ld_sdmmc_attach, ld_sdmmc_detach, NULL);
@@ -118,8 +115,6 @@ ld_sdmmc_attach(device_t parent, device_
 	    sa->sf->cid.rev, sa->sf->cid.psn, sa->sf->cid.mdt);
 	aprint_naive("\n");
 
-	callout_init(&sc->sc_task.task_callout, 0);
-
 	sc->sc_hwunit = 0;	/* always 0? */
 	sc->sc_sf = sa->sf;
 
@@ -185,7 +180,6 @@ ld_sdmmc_start(struct ld_softc *ld, stru
 	task->task_bp = bp;
 	sdmmc_init_task(&task->task, ld_sdmmc_dobio, task);
 
-	callout_reset(&task->task_callout, hz, ld_sdmmc_timeout, task);
 	sdmmc_add_task(sc->sc_sf->sc, &task->task);
 
 	return 0;
@@ -199,8 +193,6 @@ ld_sdmmc_dobio(void *arg)
 	struct buf *bp = task->task_bp;
 	int error, s;
 
-	callout_stop(&task->task_callout);
-
 	/*
 	 * I/O operation
 	 */
@@ -242,29 +234,6 @@ ld_sdmmc_dobio(void *arg)
 	splx(s);
 }
 
-static void
-ld_sdmmc_timeout(void *arg)
-{
-	struct ld_sdmmc_task *task = (struct ld_sdmmc_task *)arg;
-	struct ld_sdmmc_softc *sc = task->task_sc;
-	struct buf *bp = task->task_bp;
-	int s;
-
-	s = splbio();
-	if (!sdmmc_task_pending(&task->task)) {
-		splx(s);
-		return;
-	}
-	bp->b_error = EIO;	/* XXXX */
-	bp->b_resid = bp->b_bcount;
-	sdmmc_del_task(&task->task);
-
-	aprint_error_dev(sc->sc_ld.sc_dv, "task timeout");
-
-	lddone(&sc->sc_ld, bp);
-	splx(s);
-}
-
 static int
 ld_sdmmc_dump(struct ld_softc *ld, void *data, int blkno, int blkcnt)
 {

Reply via email to