mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Automatic merge of ../scsi-misc-2.6-old/
This commit is contained in:
commit
153b1e1fd9
97 changed files with 12281 additions and 17697 deletions
|
|
@ -290,6 +290,13 @@ void elv_requeue_request(request_queue_t *q, struct request *rq)
|
|||
rq = rq->end_io_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* the request is prepped and may have some resources allocated.
|
||||
* allowing unprepped requests to pass this one may cause resource
|
||||
* deadlock. turn on softbarrier.
|
||||
*/
|
||||
rq->flags |= REQ_SOFTBARRIER;
|
||||
|
||||
/*
|
||||
* if iosched has an explicit requeue hook, then use that. otherwise
|
||||
* just put the request at the front of the queue
|
||||
|
|
@ -386,6 +393,12 @@ struct request *elv_next_request(request_queue_t *q)
|
|||
if (ret == BLKPREP_OK) {
|
||||
break;
|
||||
} else if (ret == BLKPREP_DEFER) {
|
||||
/*
|
||||
* the request may have been (partially) prepped.
|
||||
* we need to keep this request in the front to
|
||||
* avoid resource deadlock. turn on softbarrier.
|
||||
*/
|
||||
rq->flags |= REQ_SOFTBARRIER;
|
||||
rq = NULL;
|
||||
break;
|
||||
} else if (ret == BLKPREP_KILL) {
|
||||
|
|
|
|||
|
|
@ -2038,7 +2038,6 @@ EXPORT_SYMBOL(blk_requeue_request);
|
|||
* @rq: request to be inserted
|
||||
* @at_head: insert request at head or tail of queue
|
||||
* @data: private data
|
||||
* @reinsert: true if request it a reinsertion of previously processed one
|
||||
*
|
||||
* Description:
|
||||
* Many block devices need to execute commands asynchronously, so they don't
|
||||
|
|
@ -2053,8 +2052,9 @@ EXPORT_SYMBOL(blk_requeue_request);
|
|||
* host that is unable to accept a particular command.
|
||||
*/
|
||||
void blk_insert_request(request_queue_t *q, struct request *rq,
|
||||
int at_head, void *data, int reinsert)
|
||||
int at_head, void *data)
|
||||
{
|
||||
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
|
|
@ -2071,20 +2071,12 @@ void blk_insert_request(request_queue_t *q, struct request *rq,
|
|||
/*
|
||||
* If command is tagged, release the tag
|
||||
*/
|
||||
if (reinsert)
|
||||
blk_requeue_request(q, rq);
|
||||
else {
|
||||
int where = ELEVATOR_INSERT_BACK;
|
||||
if (blk_rq_tagged(rq))
|
||||
blk_queue_end_tag(q, rq);
|
||||
|
||||
if (at_head)
|
||||
where = ELEVATOR_INSERT_FRONT;
|
||||
drive_stat_acct(rq, rq->nr_sectors, 1);
|
||||
__elv_add_request(q, rq, where, 0);
|
||||
|
||||
if (blk_rq_tagged(rq))
|
||||
blk_queue_end_tag(q, rq);
|
||||
|
||||
drive_stat_acct(rq, rq->nr_sectors, 1);
|
||||
__elv_add_request(q, rq, where, 0);
|
||||
}
|
||||
if (blk_queue_plugged(q))
|
||||
__generic_unplug_device(q);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -723,7 +723,7 @@ static int pd_special_command(struct pd_unit *disk,
|
|||
rq.ref_count = 1;
|
||||
rq.waiting = &wait;
|
||||
rq.end_io = blk_end_sync_rq;
|
||||
blk_insert_request(disk->gd->queue, &rq, 0, func, 0);
|
||||
blk_insert_request(disk->gd->queue, &rq, 0, func);
|
||||
wait_for_completion(&wait);
|
||||
rq.waiting = NULL;
|
||||
if (rq.errors)
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ static int carm_array_info (struct carm_host *host, unsigned int array_idx)
|
|||
spin_unlock_irq(&host->lock);
|
||||
|
||||
DPRINTK("blk_insert_request, tag == %u\n", idx);
|
||||
blk_insert_request(host->oob_q, crq->rq, 1, crq, 0);
|
||||
blk_insert_request(host->oob_q, crq->rq, 1, crq);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
@ -653,7 +653,7 @@ static int carm_send_special (struct carm_host *host, carm_sspc_t func)
|
|||
crq->msg_bucket = (u32) rc;
|
||||
|
||||
DPRINTK("blk_insert_request, tag == %u\n", idx);
|
||||
blk_insert_request(host->oob_q, crq->rq, 1, crq, 0);
|
||||
blk_insert_request(host->oob_q, crq->rq, 1, crq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue