/* Stop the block request queue, and wait for our thread to complete any outstanding requests. This ensures that we won't suspend while a request is being processed.  */
void mmc_queue_suspend(struct mmc_queue *mq)
/* Stop the block request queue, and wait for our thread to complete any outstanding requests. This ensures that we won't suspend while a request is being processed.  */
void mmc_queue_suspend(struct mmc_queue *mq)
{
	struct request_queue *q = mq->queue;
	unsigned long flags;
	if (!(mq->flags & MMC_QUEUE_SUSPENDED)) {
		mq->flags |= MMC_QUEUE_SUSPENDED;
		spin_lock_irqsave(q->queue_lock, flags);
		blk_stop_queue(q);
		spin_unlock_irqrestore(q->queue_lock, flags);
		down(&mq->thread_sem);
	}
}