Commit:     860ac568e825b623b0b335ca277dd47d1d7fd5d0
Parent:     d1b5163206769aa93271bc1029e877ea9f920a5d
Author:     FUJITA Tomonori <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:28:05 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:11 2008 -0800

    iommu sg merging: call blk_queue_segment_boundary in __scsi_alloc_queue
    request_queue and device struct must have the same value of a segment
    size limit. This patch adds blk_queue_segment_boundary in
    __scsi_alloc_queue so LLDs don't need to call both
    blk_queue_segment_boundary and set_dma_max_seg_size. A LLD can change
    the default value (64KB) can call device_dma_parameters accessors like
    pci_set_dma_max_seg_size when allocating scsi_host.
    Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
    Acked-by: Jeff Garzik <[EMAIL PROTECTED]>
    Cc: James Bottomley <[EMAIL PROTECTED]>
    Acked-by: Jens Axboe <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/scsi/scsi_lib.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index b12fb31..68e424f 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1569,6 +1569,7 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host 
                                         request_fn_proc *request_fn)
        struct request_queue *q;
+       struct device *dev = shost->shost_gendev.parent;
        q = blk_init_queue(request_fn, NULL);
        if (!q)
@@ -1584,6 +1585,8 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host 
        blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
        blk_queue_segment_boundary(q, shost->dma_boundary);
+       blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
        if (!shost->use_clustering)
                clear_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to