__dw_mci_start_request(host, cmd);
}
-/* must be called with host->lock held */
-static void dw_mci_queue_request(struct dw_mci *host, struct mmc_request *mrq)
-{
- dev_vdbg(&host->mmc->class_dev, "queue request: state=%d\n",
- host->state);
-
- host->mrq = mrq;
-
- if (host->state == STATE_WAITING_CMD11_DONE) {
- dev_warn(&host->mmc->class_dev,
- "Voltage change didn't complete\n");
- /*
- * this case isn't expected to happen, so we can
- * either crash here or just try to continue on
- * in the closest possible state
- */
- host->state = STATE_IDLE;
- }
-
- if (host->state == STATE_IDLE) {
- host->state = STATE_SENDING_CMD;
- dw_mci_start_request(host);
- }
-}
-
static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
struct dw_mci *host = mmc_priv(mmc);
* atomic, otherwise the card could be removed in between and the
* request wouldn't fail until another card was inserted.
*/
-
if (!dw_mci_get_cd(mmc)) {
mrq->cmd->error = -ENOMEDIUM;
mmc_request_done(mmc, mrq);
spin_lock_bh(&host->lock);
- dw_mci_queue_request(host, mrq);
+ dev_vdbg(&host->mmc->class_dev, "request: state=%d\n",
+ host->state);
+
+ host->mrq = mrq;
+ if (host->state == STATE_WAITING_CMD11_DONE) {
+ dev_warn(&host->mmc->class_dev,
+ "Voltage change didn't complete\n");
+ /*
+ * this case isn't expected to happen, so we can
+ * either crash here or just try to continue on
+ * in the closest possible state
+ */
+ host->state = STATE_IDLE;
+ }
+
+ if (host->state == STATE_IDLE) {
+ host->state = STATE_SENDING_CMD;
+ dw_mci_start_request(host);
+ }
spin_unlock_bh(&host->lock);
}