]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mmc/core/sdio_bus.c
sdio: set the functions' block size
[linux-2.6-omap-h63xx.git] / drivers / mmc / core / sdio_bus.c
index d229020db4a2cd5852fd2063bd01702898d67a37..fcb13fb0daad3ff97700ac09cb80d9ef6fcb1e95 100644 (file)
@@ -128,11 +128,20 @@ static int sdio_bus_probe(struct device *dev)
        struct sdio_driver *drv = to_sdio_driver(dev->driver);
        struct sdio_func *func = dev_to_sdio_func(dev);
        const struct sdio_device_id *id;
+       int ret;
 
        id = sdio_match_device(func, drv);
        if (!id)
                return -ENODEV;
 
+       /* Set the default block size so the driver is sure it's something
+        * sensible. */
+       sdio_claim_host(func);
+       ret = sdio_set_block_size(func, 0);
+       sdio_release_host(func);
+       if (ret)
+               return ret;
+
        return drv->probe(func, id);
 }