|
@@ -1172,7 +1172,10 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
|
if (mrq->data && !is_power_of_2(mrq->data->blksz)) {
|
|
if (mrq->data && !is_power_of_2(mrq->data->blksz)) {
|
|
dev_err(dev, "unsupported block size (%d bytes)\n",
|
|
dev_err(dev, "unsupported block size (%d bytes)\n",
|
|
mrq->data->blksz);
|
|
mrq->data->blksz);
|
|
- mrq->cmd->error = -EINVAL;
|
|
|
|
|
|
+
|
|
|
|
+ if (mrq->cmd)
|
|
|
|
+ mrq->cmd->error = -EINVAL;
|
|
|
|
+
|
|
mmc_request_done(mmc, mrq);
|
|
mmc_request_done(mmc, mrq);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -1194,7 +1197,10 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
|
readl(host->ioaddr + SDCMD) & SDCMD_CMD_MASK,
|
|
readl(host->ioaddr + SDCMD) & SDCMD_CMD_MASK,
|
|
edm);
|
|
edm);
|
|
bcm2835_dumpregs(host);
|
|
bcm2835_dumpregs(host);
|
|
- mrq->cmd->error = -EILSEQ;
|
|
|
|
|
|
+
|
|
|
|
+ if (mrq->cmd)
|
|
|
|
+ mrq->cmd->error = -EILSEQ;
|
|
|
|
+
|
|
bcm2835_finish_request(host);
|
|
bcm2835_finish_request(host);
|
|
mutex_unlock(&host->mutex);
|
|
mutex_unlock(&host->mutex);
|
|
return;
|
|
return;
|
|
@@ -1207,7 +1213,7 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
|
if (!host->use_busy)
|
|
if (!host->use_busy)
|
|
bcm2835_finish_command(host);
|
|
bcm2835_finish_command(host);
|
|
}
|
|
}
|
|
- } else if (bcm2835_send_command(host, mrq->cmd)) {
|
|
|
|
|
|
+ } else if (mrq->cmd && bcm2835_send_command(host, mrq->cmd)) {
|
|
if (host->data && host->dma_desc) {
|
|
if (host->data && host->dma_desc) {
|
|
/* DMA transfer starts now, PIO starts after irq */
|
|
/* DMA transfer starts now, PIO starts after irq */
|
|
bcm2835_start_dma(host);
|
|
bcm2835_start_dma(host);
|