Skip to content

Commit 689dc7e

Browse files
committed
Merge branch 'fixes' into next
2 parents 906d5ff + 99c14fc commit 689dc7e

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

drivers/mmc/core/block.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ static void mmc_blk_issue_drv_op(struct mmc_queue *mq, struct request *req)
12231223
break;
12241224
}
12251225
mq_rq->drv_op_result = ret;
1226-
blk_end_request_all(req, ret);
1226+
blk_end_request_all(req, ret ? BLK_STS_IOERR : BLK_STS_OK);
12271227
}
12281228

12291229
static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
@@ -1728,9 +1728,9 @@ static bool mmc_blk_rw_cmd_err(struct mmc_blk_data *md, struct mmc_card *card,
17281728
if (err)
17291729
req_pending = old_req_pending;
17301730
else
1731-
req_pending = blk_end_request(req, 0, blocks << 9);
1731+
req_pending = blk_end_request(req, BLK_STS_OK, blocks << 9);
17321732
} else {
1733-
req_pending = blk_end_request(req, 0, brq->data.bytes_xfered);
1733+
req_pending = blk_end_request(req, BLK_STS_OK, brq->data.bytes_xfered);
17341734
}
17351735
return req_pending;
17361736
}

drivers/mmc/host/sdhci-xenon.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,27 @@ static void xenon_set_uhs_signaling(struct sdhci_host *host,
210210
sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
211211
}
212212

213+
static 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+
213231
static const struct sdhci_ops sdhci_xenon_ops = {
214232
.set_clock = sdhci_set_clock,
233+
.set_power = xenon_set_power,
215234
.set_bus_width = sdhci_set_bus_width,
216235
.reset = xenon_reset,
217236
.set_uhs_signaling = xenon_set_uhs_signaling,

0 commit comments

Comments
 (0)