Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=99c84dbdc73d158a1ab955a4a5f74c18074796a3
Commit:     99c84dbdc73d158a1ab955a4a5f74c18074796a3
Parent:     681cc5cd3efbeafca6386114070e0bfb5012e249
Author:     FUJITA Tomonori <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:28:17 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:12 2008 -0800

    iommu sg merging: call dma_set_seg_boundary in __scsi_alloc_queue()
    
    This is a one-line patch to add the following to __scsi_alloc_queue():
    
    dma_set_seg_boundary(dev, shost->dma_boundary);
    
    This is the simplest approach but the result looks odd,
    __scsi_alloc_queue() does:
    
    blk_queue_segment_boundary(q, shost->dma_boundary);
    dma_set_seg_boundary(dev, shost->dma_boundary);
    blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
    
    I think that it would be better to set up segment boundary in the same
    way as we did for the maximum segment size. That is, removing
    shost->dma_boundary and LLDs call pci_set_dma_seg_boundary (or its
    friends).
    
    Then __scsi_alloc_queue() can set up both limits in the same way:
    
    blk_queue_segment_boundary(q, dma_get_seg_boundary(dev));
    blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
    
    killing dma_boundary in scsi_host_template needs a large patch for
    libata (dma_boundary is used by only libata and sym53c8xx). I'll send
    a patch to do that if it is acceptable. James and Jeff?
    
    Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
    Cc: James Bottomley <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Cc: Greg KH <[EMAIL PROTECTED]>
    Cc: Jeff Garzik <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/scsi/scsi_lib.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 68e424f..f243fc3 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1584,6 +1584,7 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host 
*shost,
        blk_queue_max_sectors(q, shost->max_sectors);
        blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
        blk_queue_segment_boundary(q, shost->dma_boundary);
+       dma_set_seg_boundary(dev, shost->dma_boundary);
 
        blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
 
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to