svn commit: r360008 - head/sys/dev/mmc

Emmanuel Vadot manu at FreeBSD.org
Thu Apr 16 12:32:29 UTC 2020


Author: manu
Date: Thu Apr 16 12:32:28 2020
New Revision: 360008
URL: https://svnweb.freebsd.org/changeset/base/360008

Log:
  mmc_fdt_helpers: Always init the timout
  
  We use the taskqueue to schedule card detection so always init it.
  This is a proper solution instead of r359965.
  
  MFC after:	1 month
  MFH:		r359924

Modified:
  head/sys/dev/mmc/mmc_fdt_helpers.c

Modified: head/sys/dev/mmc/mmc_fdt_helpers.c
==============================================================================
--- head/sys/dev/mmc/mmc_fdt_helpers.c	Thu Apr 16 12:31:12 2020	(r360007)
+++ head/sys/dev/mmc/mmc_fdt_helpers.c	Thu Apr 16 12:32:28 2020	(r360008)
@@ -225,6 +225,10 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node
 	const char *cd_mode_str;
 
 	dev = helper->dev;
+
+	TIMEOUT_TASK_INIT(taskqueue_swi_giant, &helper->cd_delayed_task, 0,
+	    cd_card_task, helper);
+
 	/*
 	 * If the device is flagged as non-removable, set that slot option, and
 	 * set a flag to make sdhci_fdt_gpio_get_present() always return true.
@@ -294,9 +298,6 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node
 	}
 
 without_interrupts:
-	TIMEOUT_TASK_INIT(taskqueue_swi_giant, &helper->cd_delayed_task, 0,
-	    cd_card_task, helper);
-
 	/*
 	 * If we have a readable gpio pin, but didn't successfully configure
 	 * gpio interrupts, setup a timeout task to poll the pin


More information about the svn-src-all mailing list