mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] mmc_core: fix the use of hard coded timeout value.
@ 2008-06-30  7:50 Tomas Winkler
  2008-06-30  7:50 ` [PATCH 2/3] mmc: wbsd.c fix shadowing of 'dma' variable Tomas Winkler
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tomas Winkler @ 2008-06-30  7:50 UTC (permalink / raw)
  To: drzeus-list; +Cc: linux-kernel, Benzi Zbit

From: Benzi Zbit <Benzi.Zbit@intel.com>

Signed-off-by: Benzi Zbit <Benzi.Zbit@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/mmc/core/sdio_cis.c   |    2 ++
 drivers/mmc/core/sdio_io.c    |    7 ++-----
 include/linux/mmc/sdio_func.h |    1 +
 3 files changed, 5 insertions(+), 5 deletions(-)
 mode change 100644 => 100755 drivers/mmc/core/sdio_cis.c
 mode change 100644 => 100755 drivers/mmc/core/sdio_io.c
 mode change 100644 => 100755 include/linux/mmc/sdio_func.h

diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
old mode 100644
new mode 100755
index d5e51b1..e3a9797
--- a/drivers/mmc/core/sdio_cis.c
+++ b/drivers/mmc/core/sdio_cis.c
@@ -129,6 +129,8 @@ static int cistpl_funce_func(struct sdio_func *func,
 	/* TPLFE_MAX_BLK_SIZE */
 	func->max_blksize = buf[12] | (buf[13] << 8);
 
+	/* TPLFE_ENABLE_TIMEOUT_VAL */
+	func->enable_timeout = buf[28] | (buf[29] << 8);
 	return 0;
 }
 
diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
old mode 100644
new mode 100755
index 625b92c..252c4fd
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -76,11 +76,8 @@ int sdio_enable_func(struct sdio_func *func)
 	if (ret)
 		goto err;
 
-	/*
-	 * FIXME: This should timeout based on information in the CIS,
-	 * but we don't have card to parse that yet.
-	 */
-	timeout = jiffies + HZ;
+	/* max enable timeout is in units of 10mS */
+	timeout = jiffies + msecs_to_jiffies(func->enable_timeout * 10);
 
 	while (1) {
 		ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, &reg);
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
old mode 100644
new mode 100755
index b050f4d..8de40f1
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -46,6 +46,7 @@ struct sdio_func {
 	unsigned		max_blksize;	/* maximum block size */
 	unsigned		cur_blksize;	/* current block size */
 
+	unsigned		enable_timeout;	/* max enable timeout in units of 10mS steps */
 	unsigned int		state;		/* function state */
 #define SDIO_STATE_PRESENT	(1<<0)		/* present in sysfs */
 
-- 
1.5.4.1

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-07-04 17:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-30  7:50 [PATCH 1/3] mmc_core: fix the use of hard coded timeout value Tomas Winkler
2008-06-30  7:50 ` [PATCH 2/3] mmc: wbsd.c fix shadowing of 'dma' variable Tomas Winkler
2008-06-30  7:50   ` [PATCH 3/3] mmc: fix sdio_io sparse errors Tomas Winkler
2008-06-30  9:01     ` Marcel Holtmann
2008-06-30 11:48       ` Winkler, Tomas
2008-07-04 17:38     ` Pierre Ossman
2008-06-30  8:57   ` [PATCH 2/3] mmc: wbsd.c fix shadowing of 'dma' variable Marcel Holtmann
2008-07-04 17:14   ` Pierre Ossman
2008-06-30  8:58 ` [PATCH 1/3] mmc_core: fix the use of hard coded timeout value Marcel Holtmann
2008-06-30 11:45   ` Winkler, Tomas
2008-07-04 17:13 ` Pierre Ossman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome