aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_kernel.h')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_kernel.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h
index 159d0aed31a5..5d92d57b6f54 100644
--- a/drivers/infiniband/hw/ipath/ipath_kernel.h
+++ b/drivers/infiniband/hw/ipath/ipath_kernel.h
@@ -528,7 +528,6 @@ extern spinlock_t ipath_devs_lock;
528extern struct ipath_devdata *ipath_lookup(int unit); 528extern struct ipath_devdata *ipath_lookup(int unit);
529 529
530extern u16 ipath_layer_rcv_opcode; 530extern u16 ipath_layer_rcv_opcode;
531extern int ipath_verbs_registered;
532extern int __ipath_layer_intr(struct ipath_devdata *, u32); 531extern int __ipath_layer_intr(struct ipath_devdata *, u32);
533extern int ipath_layer_intr(struct ipath_devdata *, u32); 532extern int ipath_layer_intr(struct ipath_devdata *, u32);
534extern int __ipath_layer_rcv(struct ipath_devdata *, void *, 533extern int __ipath_layer_rcv(struct ipath_devdata *, void *,
@@ -651,7 +650,7 @@ u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32 *);
651void ipath_init_pe800_funcs(struct ipath_devdata *); 650void ipath_init_pe800_funcs(struct ipath_devdata *);
652/* init HT-400-specific func */ 651/* init HT-400-specific func */
653void ipath_init_ht400_funcs(struct ipath_devdata *); 652void ipath_init_ht400_funcs(struct ipath_devdata *);
654void ipath_get_guid(struct ipath_devdata *); 653void ipath_get_eeprom_info(struct ipath_devdata *);
655u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg); 654u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg);
656 655
657/* 656/*
@@ -732,7 +731,7 @@ u64 ipath_read_kreg64_port(const struct ipath_devdata *, ipath_kreg,
732static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd, 731static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd,
733 ipath_ureg regno, int port) 732 ipath_ureg regno, int port)
734{ 733{
735 if (!dd->ipath_kregbase) 734 if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT))
736 return 0; 735 return 0;
737 736
738 return readl(regno + (u64 __iomem *) 737 return readl(regno + (u64 __iomem *)
@@ -763,7 +762,7 @@ static inline void ipath_write_ureg(const struct ipath_devdata *dd,
763static inline u32 ipath_read_kreg32(const struct ipath_devdata *dd, 762static inline u32 ipath_read_kreg32(const struct ipath_devdata *dd,
764 ipath_kreg regno) 763 ipath_kreg regno)
765{ 764{
766 if (!dd->ipath_kregbase) 765 if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT))
767 return -1; 766 return -1;
768 return readl((u32 __iomem *) & dd->ipath_kregbase[regno]); 767 return readl((u32 __iomem *) & dd->ipath_kregbase[regno]);
769} 768}
@@ -771,7 +770,7 @@ static inline u32 ipath_read_kreg32(const struct ipath_devdata *dd,
771static inline u64 ipath_read_kreg64(const struct ipath_devdata *dd, 770static inline u64 ipath_read_kreg64(const struct ipath_devdata *dd,
772 ipath_kreg regno) 771 ipath_kreg regno)
773{ 772{
774 if (!dd->ipath_kregbase) 773 if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT))
775 return -1; 774 return -1;
776 775
777 return readq(&dd->ipath_kregbase[regno]); 776 return readq(&dd->ipath_kregbase[regno]);
@@ -787,7 +786,7 @@ static inline void ipath_write_kreg(const struct ipath_devdata *dd,
787static inline u64 ipath_read_creg(const struct ipath_devdata *dd, 786static inline u64 ipath_read_creg(const struct ipath_devdata *dd,
788 ipath_sreg regno) 787 ipath_sreg regno)
789{ 788{
790 if (!dd->ipath_kregbase) 789 if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT))
791 return 0; 790 return 0;
792 791
793 return readq(regno + (u64 __iomem *) 792 return readq(regno + (u64 __iomem *)
@@ -798,7 +797,7 @@ static inline u64 ipath_read_creg(const struct ipath_devdata *dd,
798static inline u32 ipath_read_creg32(const struct ipath_devdata *dd, 797static inline u32 ipath_read_creg32(const struct ipath_devdata *dd,
799 ipath_sreg regno) 798 ipath_sreg regno)
800{ 799{
801 if (!dd->ipath_kregbase) 800 if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT))
802 return 0; 801 return 0;
803 return readl(regno + (u64 __iomem *) 802 return readl(regno + (u64 __iomem *)
804 (dd->ipath_cregbase + 803 (dd->ipath_cregbase +