History

Merge tag 'mmc-v4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull two more MMC fixes from Ulf Hansson: "MMC core: - Fix block status codes MMC host: - sdhci-xenon: Fix SD bus voltage select" * tag 'mmc-v4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-xenon: add set_power callback mmc: block: Fix block status codes

Linus Torvalds committed 9 years ago

Commit d7e44b82 parents 381cce5 99c14fc2 files · +22 −3Browse files

Unified · Split

2 files
  1. drivers/mmc/core/block.c +3 −3
  2. drivers/mmc/host/sdhci-xenon.c +19 −0
drivers/mmc/core/block.c+3−3
@@ -1213,7 +1213,7 @@ static void mmc_blk_issue_drv_op(struct mmc_queue *mq, struct request *req) · 1212 unmodified lines
1213 break;1213 break;
1214 }1214 }
1215 mq_rq->drv_op_result = ret;1215 mq_rq->drv_op_result = ret;
1216 blk_end_request_all(req, ret);1216 blk_end_request_all(req, ret ? BLK_STS_IOERR : BLK_STS_OK);
1217}1217}
1218 1218
1219static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)1219static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
@@ -1718,9 +1718,9 @@ static bool mmc_blk_rw_cmd_err(struct mmc_blk_data *md, struct mmc_card *card, · 498 unmodified lines
1718 if (err)1718 if (err)
1719 req_pending = old_req_pending;1719 req_pending = old_req_pending;
1720 else1720 else
1721 req_pending = blk_end_request(req, 0, blocks << 9);1721 req_pending = blk_end_request(req, BLK_STS_OK, blocks << 9);
1722 } else {1722 } else {
1723 req_pending = blk_end_request(req, 0, brq->data.bytes_xfered);1723 req_pending = blk_end_request(req, BLK_STS_OK, brq->data.bytes_xfered);
1724 }1724 }
1725 return req_pending;1725 return req_pending;
1726}1726}
drivers/mmc/host/sdhci-xenon.c+19−0
@@ -210,8 +210,27 @@ static void xenon_set_uhs_signaling(struct sdhci_host *host, · 209 unmodified lines
210 sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);210 sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
211}211}
212 212
213static void xenon_set_power(struct sdhci_host *host, unsigned char mode,
214 unsigned short vdd)
215{
216 struct mmc_host *mmc = host->mmc;
217 u8 pwr = host->pwr;
218
219 sdhci_set_power_noreg(host, mode, vdd);
220
221 if (host->pwr == pwr)
222 return;
223
224 if (host->pwr == 0)
225 vdd = 0;
226
227 if (!IS_ERR(mmc->supply.vmmc))
228 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
229}
230
213static const struct sdhci_ops sdhci_xenon_ops = {231static const struct sdhci_ops sdhci_xenon_ops = {
214 .set_clock = sdhci_set_clock,232 .set_clock = sdhci_set_clock,
233 .set_power = xenon_set_power,
215 .set_bus_width = sdhci_set_bus_width,234 .set_bus_width = sdhci_set_bus_width,
216 .reset = xenon_reset,235 .reset = xenon_reset,
217 .set_uhs_signaling = xenon_set_uhs_signaling,236 .set_uhs_signaling = xenon_set_uhs_signaling,