diff options
author | Alexander Motin <mav@FreeBSD.org> | 2008-10-29 20:01:26 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2008-10-29 20:01:26 +0000 |
commit | 3a4a255741a05b1759e370f4999a0f8bcb336a84 (patch) | |
tree | 10739783292b47e8ea27ad741ab455c62044c192 /sys/dev/mmc/mmcsd.c | |
parent | 0df76605cfd60d7a9b6ee578e46784c955f7cede (diff) | |
download | src-3a4a255741a05b1759e370f4999a0f8bcb336a84.tar.gz src-3a4a255741a05b1759e370f4999a0f8bcb336a84.zip |
Allow card reader bridge driver to report maximum supported transfer size.
sdhci supports up to 65535 blocks transfers, at91_mci - one block.
Enable multiblock operations disabled before to follow at91_mci driver
limitations.
Reviewed by: imp@
Notes
Notes:
svn path=/head/; revision=184452
Diffstat (limited to 'sys/dev/mmc/mmcsd.c')
-rw-r--r-- | sys/dev/mmc/mmcsd.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c index 5e6440bd6df1..428d21530093 100644 --- a/sys/dev/mmc/mmcsd.c +++ b/sys/dev/mmc/mmcsd.c @@ -81,8 +81,6 @@ struct mmcsd_softc { int running; }; -#define MULTI_BLOCK_BROKEN - /* bus entry points */ static int mmcsd_probe(device_t dev); static int mmcsd_attach(device_t dev); @@ -235,12 +233,7 @@ mmcsd_rw(struct mmcsd_softc *sc, struct bio *bp) while (block < end) { char *vaddr = bp->bio_data + (block - bp->bio_pblkno) * sz; - int numblocks; -#ifdef MULTI_BLOCK - numblocks = end - block; -#else - numblocks = 1; -#endif + int numblocks = min(end - block, mmc_get_max_data(dev)); memset(&req, 0, sizeof(req)); memset(&cmd, 0, sizeof(cmd)); memset(&stop, 0, sizeof(stop)); |