diff options
author | mav <mav@FreeBSD.org> | 2008-10-08 18:13:14 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2008-10-08 18:13:14 +0000 |
commit | 74aa2a1a28909f21f618cf4e14fc450b15e080a2 (patch) | |
tree | 7c82bfa174cd4805c0ef46ba9bbe8fb5df76b4b1 /sys/dev/mmc | |
parent | a13e6527d9b011fa8f68ff1bb023e518a7bb8a04 (diff) | |
download | FreeBSD-src-74aa2a1a28909f21f618cf4e14fc450b15e080a2.zip FreeBSD-src-74aa2a1a28909f21f618cf4e14fc450b15e080a2.tar.gz |
Fix bit offset in mmc_sd_switch().
Diffstat (limited to 'sys/dev/mmc')
-rw-r--r-- | sys/dev/mmc/mmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index d8e74e6..b0bdfea 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -555,8 +555,8 @@ mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, uint8_t value, ui cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; cmd.arg = mode << 31; cmd.arg |= 0x00FFFFFF; - cmd.arg &= ~(0xF << grp); - cmd.arg |= value << grp; + cmd.arg &= ~(0xF << (grp * 4)); + cmd.arg |= value << (grp * 4); cmd.data = &data; data.data = res; |