Skip to content

Commit 88693b3

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
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>
1 parent 6f6eb3c commit 88693b3

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

drivers/scsi/ips.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6926,7 +6926,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
69266926
* it! Also, don't use 64bit addressing if dma addresses
69276927
* are guaranteed to be < 4G.
69286928
*/
6929-
if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) &&
6929+
if (sizeof(dma_addr_t) > 4 && IPS_HAS_ENH_SGLIST(ha) &&
69306930
!dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(64))) {
69316931
(ha)->flags |= IPS_HA_ENH_SG;
69326932
} else {

drivers/scsi/ips.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@
9696
#define __iomem
9797
#endif
9898

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-
10599
/*
106100
* Adapter address map equates
107101
*/

0 commit comments

Comments
 (0)