diff options
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_nx.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index e1085edd177..fdfe27b3869 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c | |||
@@ -655,6 +655,27 @@ static int qla4_8xxx_pci_is_same_window(struct scsi_qla_host *ha, | |||
655 | return 0; | 655 | return 0; |
656 | } | 656 | } |
657 | 657 | ||
658 | #ifndef readq | ||
659 | static inline __u64 readq(const volatile void __iomem *addr) | ||
660 | { | ||
661 | const volatile u32 __iomem *p = addr; | ||
662 | u32 low, high; | ||
663 | |||
664 | low = readl(p); | ||
665 | high = readl(p + 1); | ||
666 | |||
667 | return low + ((u64)high << 32); | ||
668 | } | ||
669 | #endif | ||
670 | |||
671 | #ifndef writeq | ||
672 | static inline void writeq(__u64 val, volatile void __iomem *addr) | ||
673 | { | ||
674 | writel(val, addr); | ||
675 | writel(val >> 32, addr+4); | ||
676 | } | ||
677 | #endif | ||
678 | |||
658 | static int qla4_8xxx_pci_mem_read_direct(struct scsi_qla_host *ha, | 679 | static int qla4_8xxx_pci_mem_read_direct(struct scsi_qla_host *ha, |
659 | u64 off, void *data, int size) | 680 | u64 off, void *data, int size) |
660 | { | 681 | { |