mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] mpt2sas:  Fixes so driver works on 32 bit powerpc with > 32 bit pci space
@ 2011-07-13 20:04 Ayman Elkhashab
  0 siblings, 0 replies; only message in thread
From: Ayman Elkhashab @ 2011-07-13 20:04 UTC (permalink / raw)
  To: James E.J. Bottomley, Kashyap Desai, Greg Kroah-Hartman,
	Eric Moore, Nick Cheng, Martin Petersen, linux-scsi,
	linux-kernel
  Cc: Ayman El-Khashab

From: Ayman El-Khashab <ayman@elkhashab.com>

Changed the type of chip_phys from a u64 to a phys_addr_t.  Changed ifdef
from BITS_PER_LONG to CONFIG_ARCH_DMA_ADDR_T_64BIT so that it works on
32 bit systems that have pci address spaces larger than 32 bits.

Tested on powerpc 44x with 36 bit pci space

Signed-off-by: Ayman El-Khashab <ayman@elkhashab.com>
---
 drivers/scsi/mpt2sas/mpt2sas_base.c |    4 ++--
 drivers/scsi/mpt2sas/mpt2sas_base.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index efa0255..e5bbd0c 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1251,7 +1251,7 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
 	u32 pio_sz;
 	int i, r = 0;
 	u64 pio_chip = 0;
-	u64 chip_phys = 0;
+	phys_addr_t chip_phys = 0;
 
 	dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n",
 	    ioc->name, __func__));
@@ -3243,7 +3243,7 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
 	mpi_request.ReplyFreeQueueDepth =
 	    cpu_to_le16(ioc->reply_free_queue_depth);
 
-#if BITS_PER_LONG > 32
+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
 	mpi_request.SenseBufferAddressHigh =
 	    cpu_to_le32(ioc->sense_dma >> 32);
 	mpi_request.SystemReplyAddressHigh =
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index dcc289c..d5f9ed8 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -682,7 +682,7 @@ struct MPT2SAS_ADAPTER {
 	char		tmp_string[MPT_STRING_LENGTH];
 	struct pci_dev	*pdev;
 	Mpi2SystemInterfaceRegs_t __iomem *chip;
-	resource_size_t	chip_phys;
+	phys_addr_t	chip_phys;
 	int		logging_level;
 	int		fwfault_debug;
 	u8		ir_firmware;
-- 
1.7.4.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-13 20:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 20:04 [PATCH 1/1] mpt2sas: Fixes so driver works on 32 bit powerpc with > 32 bit pci space Ayman Elkhashab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®