public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] dw_mmc: didn't support multiple blocks of weird length?
@ 2011-02-25  7:35 Jaehoon Chung
  2011-02-25 17:55 ` Will Newton
  0 siblings, 1 reply; 7+ messages in thread
From: Jaehoon Chung @ 2011-02-25  7:35 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org; +Cc: will.newton, Kyungmin Park, Chris Ball

Hi..

I didn't understand this point..
Plz let me explain this code..
why need this function (dw_mci_queue_request(host, slot, mrq)?


static void dw_mci_queue_request(struct dw_mci *host, struct dw_mci_slot *slot,
				 struct mmc_request *mrq)
{
	dev_vdbg(&slot->mmc->class_dev, "queue request: state=%d\n",
		 host->state);

	spin_lock_bh(&host->lock);
	slot->mrq = mrq;

	if (host->state == STATE_IDLE) {
		host->state = STATE_SENDING_CMD;
		dw_mci_start_request(host, slot);
	} else {
		list_add_tail(&slot->queue_node, &host->queue);
	}

	spin_unlock_bh(&host->lock);
}

static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
	struct dw_mci_slot *slot = mmc_priv(mmc);
	struct dw_mci *host = slot->host;

	WARN_ON(slot->mrq);

	if (!test_bit(DW_MMC_CARD_PRESENT, &slot->flags)) {
		mrq->cmd->error = -ENOMEDIUM;
		mmc_request_done(mmc, mrq);
		return;
	}

	/* We don't support multiple blocks of weird lengths. */
	dw_mci_queue_request(host, slot, mrq);
}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-03-02  3:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25  7:35 [RFC] dw_mmc: didn't support multiple blocks of weird length? Jaehoon Chung
2011-02-25 17:55 ` Will Newton
2011-02-28  2:44   ` Jaehoon Chung
2011-02-28 10:45     ` Will Newton
2011-02-28 10:55       ` Jaehoon Chung
2011-02-28 12:48         ` Will Newton
2011-03-02  3:01           ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox