Commit 6f6eb3cc authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: ips: use lower_32_bits and upper_32_bits instead of reinventing them

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b03f3c3e
...@@ -1801,13 +1801,13 @@ ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr, ...@@ -1801,13 +1801,13 @@ ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr,
} }
if (IPS_USE_ENH_SGLIST(ha)) { if (IPS_USE_ENH_SGLIST(ha)) {
scb->sg_list.enh_list[indx].address_lo = scb->sg_list.enh_list[indx].address_lo =
cpu_to_le32(pci_dma_lo32(busaddr)); cpu_to_le32(lower_32_bits(busaddr));
scb->sg_list.enh_list[indx].address_hi = scb->sg_list.enh_list[indx].address_hi =
cpu_to_le32(pci_dma_hi32(busaddr)); cpu_to_le32(upper_32_bits(busaddr));
scb->sg_list.enh_list[indx].length = cpu_to_le32(e_len); scb->sg_list.enh_list[indx].length = cpu_to_le32(e_len);
} else { } else {
scb->sg_list.std_list[indx].address = scb->sg_list.std_list[indx].address =
cpu_to_le32(pci_dma_lo32(busaddr)); cpu_to_le32(lower_32_bits(busaddr));
scb->sg_list.std_list[indx].length = cpu_to_le32(e_len); scb->sg_list.std_list[indx].length = cpu_to_le32(e_len);
} }
......
...@@ -96,9 +96,6 @@ ...@@ -96,9 +96,6 @@
#define __iomem #define __iomem
#endif #endif
#define pci_dma_hi32(a) ((a >> 16) >> 16)
#define pci_dma_lo32(a) (a & 0xffffffff)
#if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G) #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
#define IPS_ENABLE_DMA64 (1) #define IPS_ENABLE_DMA64 (1)
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment