[PATCH 2/5] ips: properly handle 64-bit DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 drivers/scsi/ips.c | 2 +-
 drivers/scsi/ips.h | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 679321e96a86..70a776dc0a02 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -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 {
diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h
index 42c180e3938b..6c0678fb9a67 100644
--- a/drivers/scsi/ips.h
+++ b/drivers/scsi/ips.h
@@ -96,12 +96,6 @@
       #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
     */
-- 
2.19.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux