mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: Skip I/O merges when disabled block: add large command support block: replace sizeof(rq->cmd) with BLK_MAX_CDB ide: use blk_rq_init() to initialize the request block: use blk_rq_init() to initialize the request block: rename and export rq_init() block: no need to initialize rq->cmd with blk_get_request block: no need to initialize rq->cmd in prepare_flush_fn hook block/blk-barrier.c:blk_ordered_cur_seq() mustn't be inline block/elevator.c:elv_rq_merge_ok() mustn't be inline block: make queue flags non-atomic block: add dma alignment and padding support to blk_rq_map_kern unexport blk_max_pfn ps3disk: Remove superfluous cast block: make rq_init() do a full memset() relay: fix splice problem
This commit is contained in:
commit
bd5d435a96
38 changed files with 275 additions and 120 deletions
|
|
@ -1773,7 +1773,7 @@ static int scsi_debug_slave_alloc(struct scsi_device *sdp)
|
|||
if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
|
||||
printk(KERN_INFO "scsi_debug: slave_alloc <%u %u %u %u>\n",
|
||||
sdp->host->host_no, sdp->channel, sdp->id, sdp->lun);
|
||||
set_bit(QUEUE_FLAG_BIDI, &sdp->request_queue->queue_flags);
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_BIDI, sdp->request_queue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1771,6 +1771,7 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
|
|||
unsigned long flags;
|
||||
int rtn;
|
||||
|
||||
blk_rq_init(NULL, &req);
|
||||
scmd->request = &req;
|
||||
memset(&scmd->eh_timeout, 0, sizeof(scmd->eh_timeout));
|
||||
|
||||
|
|
|
|||
|
|
@ -536,6 +536,9 @@ static void scsi_run_queue(struct request_queue *q)
|
|||
!shost->host_blocked && !shost->host_self_blocked &&
|
||||
!((shost->can_queue > 0) &&
|
||||
(shost->host_busy >= shost->can_queue))) {
|
||||
|
||||
int flagset;
|
||||
|
||||
/*
|
||||
* As long as shost is accepting commands and we have
|
||||
* starved queues, call blk_run_queue. scsi_request_fn
|
||||
|
|
@ -549,19 +552,20 @@ static void scsi_run_queue(struct request_queue *q)
|
|||
sdev = list_entry(shost->starved_list.next,
|
||||
struct scsi_device, starved_entry);
|
||||
list_del_init(&sdev->starved_entry);
|
||||
spin_unlock_irqrestore(shost->host_lock, flags);
|
||||
spin_unlock(shost->host_lock);
|
||||
|
||||
spin_lock(sdev->request_queue->queue_lock);
|
||||
flagset = test_bit(QUEUE_FLAG_REENTER, &q->queue_flags) &&
|
||||
!test_bit(QUEUE_FLAG_REENTER,
|
||||
&sdev->request_queue->queue_flags);
|
||||
if (flagset)
|
||||
queue_flag_set(QUEUE_FLAG_REENTER, sdev->request_queue);
|
||||
__blk_run_queue(sdev->request_queue);
|
||||
if (flagset)
|
||||
queue_flag_clear(QUEUE_FLAG_REENTER, sdev->request_queue);
|
||||
spin_unlock(sdev->request_queue->queue_lock);
|
||||
|
||||
if (test_bit(QUEUE_FLAG_REENTER, &q->queue_flags) &&
|
||||
!test_and_set_bit(QUEUE_FLAG_REENTER,
|
||||
&sdev->request_queue->queue_flags)) {
|
||||
blk_run_queue(sdev->request_queue);
|
||||
clear_bit(QUEUE_FLAG_REENTER,
|
||||
&sdev->request_queue->queue_flags);
|
||||
} else
|
||||
blk_run_queue(sdev->request_queue);
|
||||
|
||||
spin_lock_irqsave(shost->host_lock, flags);
|
||||
spin_lock(shost->host_lock);
|
||||
if (unlikely(!list_empty(&sdev->starved_entry)))
|
||||
/*
|
||||
* sdev lost a race, and was put back on the
|
||||
|
|
@ -1585,8 +1589,9 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
|
|||
|
||||
blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
|
||||
|
||||
/* New queue, no concurrency on queue_flags */
|
||||
if (!shost->use_clustering)
|
||||
clear_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
|
||||
queue_flag_clear_unlocked(QUEUE_FLAG_CLUSTER, q);
|
||||
|
||||
/*
|
||||
* set a reasonable default alignment on word boundaries: the
|
||||
|
|
|
|||
|
|
@ -248,8 +248,7 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy)
|
|||
else
|
||||
q->queuedata = shost;
|
||||
|
||||
set_bit(QUEUE_FLAG_BIDI, &q->queue_flags);
|
||||
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -860,7 +860,6 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
|
|||
|
||||
static void sd_prepare_flush(struct request_queue *q, struct request *rq)
|
||||
{
|
||||
memset(rq->cmd, 0, sizeof(rq->cmd));
|
||||
rq->cmd_type = REQ_TYPE_BLOCK_PC;
|
||||
rq->timeout = SD_TIMEOUT;
|
||||
rq->cmd[0] = SYNCHRONIZE_CACHE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue