Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 2008 21:52:32 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185722 - head/sys/dev/sdhci
Message-ID:  <200812062152.mB6LqWW1006055@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Dec  6 21:52:32 2008
New Revision: 185722
URL: http://svn.freebsd.org/changeset/base/185722

Log:
  Cleanup msleep() arguments.
  Move wakeup() out of the lock.

Modified:
  head/sys/dev/sdhci/sdhci.c

Modified: head/sys/dev/sdhci/sdhci.c
==============================================================================
--- head/sys/dev/sdhci/sdhci.c	Sat Dec  6 21:41:27 2008	(r185721)
+++ head/sys/dev/sdhci/sdhci.c	Sat Dec  6 21:52:32 2008	(r185722)
@@ -1207,7 +1207,7 @@ sdhci_acquire_host(device_t brdev, devic
 
 	SDHCI_LOCK(slot);
 	while (slot->bus_busy)
-		msleep(slot, &slot->mtx, PZERO, "sdhciah", hz / 5);
+		msleep(slot, &slot->mtx, 0, "sdhciah", 0);
 	slot->bus_busy++;
 	/* Activate led. */
 	WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl |= SDHCI_CTRL_LED);
@@ -1224,8 +1224,8 @@ sdhci_release_host(device_t brdev, devic
 	/* Deactivate led. */
 	WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl &= ~SDHCI_CTRL_LED);
 	slot->bus_busy--;
-	wakeup(slot);
 	SDHCI_UNLOCK(slot);
+	wakeup(slot);
 	return (0);
 }
 



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