scsi: ips: properly handle 64-bit DMA
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Oct 2018 13:03:34 +0000 (15:03 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Nov 2018 02:31:28 +0000 (21:31 -0500)
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>
drivers/scsi/ips.c
drivers/scsi/ips.h

index 679321e96a868d643cc7b0682b78dffc198d2d25..70a776dc0a028cf7013babb027e7a2cddd259f85 100644 (file)
@@ -6926,7 +6926,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
         * it!  Also, don't use 64bit addressing if dma addresses
         * are guaranteed to be < 4G.
         */
-       if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) &&
+       if (sizeof(dma_addr_t) > 4 && IPS_HAS_ENH_SGLIST(ha) &&
            !dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(64))) {
                (ha)->flags |= IPS_HA_ENH_SG;
        } else {
index 42c180e3938bec3036a22ad55be55a06e44b59ec..6c0678fb9a670cca19ba3a787050971d3a853391 100644 (file)
       #define __iomem
    #endif
 
-   #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
-      #define IPS_ENABLE_DMA64        (1)
-   #else
-      #define IPS_ENABLE_DMA64        (0)
-   #endif
-
    /*
     * Adapter address map equates
     */