Skip to contentSkip to conversation

MMC: card test driver should not be builtin with other card support

PATCH [email protected] 3 participants 3 messages Jun 20, 2008 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

The mmc test driver and mmc block driver will attempt to bind to any card present in the system, which means only one of these drivers will end up with the card. If either one of these is selected as builtin, ensure the other does not get built.

drivers/mmc/card/Kconfig +2 -1
Index: linux-2.6.26-rc6-sdmmc3/drivers/mmc/card/Kconfig
===================================================================
@@ -6,7 +6,7 @@ comment "MMC/SD Card Drivers"
 
 config MMC_BLOCK
 	tristate "MMC block device driver"
-	depends on BLOCK
+	depends on BLOCK && MMC_TEST != y
 	default y
 	help
 	  Say Y here to enable the MMC block device driver support.
@@ -42,6 +42,7 @@ config SDIO_UART
 config MMC_TEST
 	tristate "MMC host test driver"
 	default n
+	depends on MMC_BLOCK != y
 	help
 	  Development driver that performs a series of reads and writes
 	  to a memory card in order to expose certain well known bugs
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
#1 lore raw
Quoted 21 lines · On Fri, Jun 20, 2008 at 11:58:02AM +0100, [email protected] wrote:

The mmc test driver and mmc block driver will attempt to bind to any card present in the system, which means only one of these drivers will end up with the card. If either one of these is selected as builtin, ensure the other does not get built.

Index: linux-2.6.26-rc6-sdmmc3/drivers/mmc/card/Kconfig
===================================================================

drivers/mmc/card/Kconfig +1 -1
@@ -6,7 +6,7 @@ comment "MMC/SD Card Drivers"
 
 config MMC_BLOCK
 	tristate "MMC block device driver"
-	depends on BLOCK
+	depends on BLOCK && MMC_TEST != y
 	default y
 	help
 	  Say Y here to enable the MMC block device driver support.

drivers/mmc/card/Kconfig config SDIO_UART · line 48

Quoted 7 lines
drivers/mmc/card/Kconfig +1 -0
@@ -42,6 +42,7 @@ config SDIO_UART
 config MMC_TEST
 	tristate "MMC host test driver"
 	default n
+	depends on MMC_BLOCK != y
 	help
 	  Development driver that performs a series of reads and writes
 	  to a memory card in order to expose certain well known bugs

This is what I would have liked to have done in Kconfig, but of course the system fails with a circular dependency error. Is there any way to get this done without some horrible hacks?

Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
#2 lore raw
Quoted 11 lines · On Fri, 20 Jun 2008 12:01:15 +0100 Ben Dooks <[email protected]> wrote:
Quoted 5 lines · On Fri, Jun 20, 2008 at 11:58:02AM +0100, [email protected] wrote:

The mmc test driver and mmc block driver will attempt to bind to any card present in the system, which means only one of these drivers will end up with the card. If either one of these is selected as builtin, ensure the other does not get built.

This is what I would have liked to have done in Kconfig, but of course the system fails with a circular dependency error. Is there any way to get this done without some horrible hacks?

AFAIK, you can manually control the driver binding using sysfs. Should be solvable for the rootfs case using an initrd.

Rgds

Signature · 8 lines
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Use end-to-end encryption where
  possible.