diff options
| author | Herbert Xu <herbert@lithui.me.apana.org.au> | 2017-12-22 20:00:50 +1100 |
|---|---|---|
| committer | Herbert Xu <herbert@lithui.me.apana.org.au> | 2017-12-22 20:00:50 +1100 |
| commit | 45fa9a324d0f5be9140ba2e0db9b8fb8a0b9b7e8 (patch) | |
| tree | a5e7c8428030ec0462b58133d6548ddff3802018 /drivers/scsi/scsi_lib.c | |
| parent | fc8517bf627c9b834f80274a1bc9ecd39b27231b (diff) | |
| parent | 2973633e9f09311e849f975d969737af81a521ff (diff) | |
| download | talos-op-linux-45fa9a324d0f5be9140ba2e0db9b8fb8a0b9b7e8.tar.gz talos-op-linux-45fa9a324d0f5be9140ba2e0db9b8fb8a0b9b7e8.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge the crypto tree to pick up inside-secure fixes.
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
| -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) q->limits.cluster = 0; /* - * set a reasonable default alignment on word boundaries: the - * host and device may alter it using - * blk_queue_update_dma_alignment() later. + * Set a reasonable default alignment: The larger of 32-byte (dword), + * which is a common minimum for HBAs, and the minimum DMA alignment, + * which is set by the platform. + * + * Devices that require a bigger alignment can increase it later. */ - blk_queue_dma_alignment(q, 0x03); + blk_queue_dma_alignment(q, max(4, dma_get_cache_alignment()) - 1); } EXPORT_SYMBOL_GPL(__scsi_init_queue); |

