Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: ips: properly handle 64-bit DMA

CONFIG_HIGHMEM64 is only one (and these days unusual) way to indicate
that > 32-bit dma address are possible. Replace it with a check of the
dma_addr_t size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christoph Hellwig and committed by
Martin K. Petersen
88693b3c 6f6eb3cc

+1 -7
+1 -1
drivers/scsi/ips.c
··· 6926 6926 * it! Also, don't use 64bit addressing if dma addresses 6927 6927 * are guaranteed to be < 4G. 6928 6928 */ 6929 - if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) && 6929 + if (sizeof(dma_addr_t) > 4 && IPS_HAS_ENH_SGLIST(ha) && 6930 6930 !dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(64))) { 6931 6931 (ha)->flags |= IPS_HA_ENH_SG; 6932 6932 } else {
-6
drivers/scsi/ips.h
··· 96 96 #define __iomem 97 97 #endif 98 98 99 - #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G) 100 - #define IPS_ENABLE_DMA64 (1) 101 - #else 102 - #define IPS_ENABLE_DMA64 (0) 103 - #endif 104 - 105 99 /* 106 100 * Adapter address map equates 107 101 */