diff options
author | ian <ian@FreeBSD.org> | 2013-03-24 17:23:10 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2013-03-24 17:23:10 +0000 |
commit | 8846db53babaff05794e7b8d4b295e7603ee09ac (patch) | |
tree | ccfeead4fba05769ff59b183a5d405dbad6357ab /sys/dev | |
parent | 4486b85658149b8c532a276179c8743a442d8049 (diff) | |
download | FreeBSD-src-8846db53babaff05794e7b8d4b295e7603ee09ac.zip FreeBSD-src-8846db53babaff05794e7b8d4b295e7603ee09ac.tar.gz |
Set the backlink in mmc commands to the mmc request that contains them.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/mmc/mmc.c | 1 | ||||
-rw-r--r-- | sys/dev/mmc/mmcsd.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index e7f6648..dd4c5ef 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -412,6 +412,7 @@ mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, int retries) memset(&mreq, 0, sizeof(mreq)); memset(cmd->resp, 0, sizeof(cmd->resp)); cmd->retries = retries; + cmd->mrq = &mreq; mreq.cmd = cmd; mmc_wait_for_req(sc, &mreq); return (cmd->error); diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c index 52b23e4..888b61b 100644 --- a/sys/dev/mmc/mmcsd.c +++ b/sys/dev/mmc/mmcsd.c @@ -322,6 +322,7 @@ mmcsd_rw(struct mmcsd_softc *sc, struct bio *bp) memset(&req, 0, sizeof(req)); memset(&cmd, 0, sizeof(cmd)); memset(&stop, 0, sizeof(stop)); + cmd.mrq = &req; req.cmd = &cmd; cmd.data = &data; if (bp->bio_cmd == BIO_READ) { @@ -351,6 +352,7 @@ mmcsd_rw(struct mmcsd_softc *sc, struct bio *bp) stop.opcode = MMC_STOP_TRANSMISSION; stop.arg = 0; stop.flags = MMC_RSP_R1B | MMC_CMD_AC; + stop.mrq = &req; req.stop = &stop; } MMCBUS_WAIT_FOR_REQUEST(device_get_parent(dev), dev, @@ -398,6 +400,7 @@ mmcsd_delete(struct mmcsd_softc *sc, struct bio *bp) /* Set erase start position. */ memset(&req, 0, sizeof(req)); memset(&cmd, 0, sizeof(cmd)); + cmd.mrq = &req; req.cmd = &cmd; if (mmc_get_card_type(dev) == mode_sd) cmd.opcode = SD_ERASE_WR_BLK_START; |