diff options
-rw-r--r-- | drivers/scsi/scsi_lib.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 1cbc497e00bd..00742c50cd44 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -2148,11 +2148,13 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q) | |||
2148 | q->limits.cluster = 0; | 2148 | q->limits.cluster = 0; |
2149 | 2149 | ||
2150 | /* | 2150 | /* |
2151 | * set a reasonable default alignment on word boundaries: the | 2151 | * Set a reasonable default alignment: The larger of 32-byte (dword), |
2152 | * host and device may alter it using | 2152 | * which is a common minimum for HBAs, and the minimum DMA alignment, |
2153 | * blk_queue_update_dma_alignment() later. | 2153 | * which is set by the platform. |
2154 | * | ||
2155 | * Devices that require a bigger alignment can increase it later. | ||
2154 | */ | 2156 | */ |
2155 | blk_queue_dma_alignment(q, 0x03); | 2157 | blk_queue_dma_alignment(q, max(4, dma_get_cache_alignment()) - 1); |
2156 | } | 2158 | } |
2157 | EXPORT_SYMBOL_GPL(__scsi_init_queue); | 2159 | EXPORT_SYMBOL_GPL(__scsi_init_queue); |
2158 | 2160 | ||