diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2008-04-17 00:09:29 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:09:29 -0400 |
commit | 9355fb6a064723c71e80e9c78de3140b43bfb52d (patch) | |
tree | dd0fffeb6633aed6cb2c946a05bf33e05f2e9436 /drivers/infiniband/hw/ipath/ipath_common.h | |
parent | 2ba3f56eb402672ff83601b5990b219d39577636 (diff) |
IB/ipath: Add support for 7220 receive queue changes
Newer HCAs have a HW option to write a sequence number to each receive
queue entry and avoid a separate DMA of the tail register to memory.
This patch adds support for these changes.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_common.h')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_common.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h index 591901aab6b7..edd4183c3a28 100644 --- a/drivers/infiniband/hw/ipath/ipath_common.h +++ b/drivers/infiniband/hw/ipath/ipath_common.h | |||
@@ -198,7 +198,7 @@ typedef enum _ipath_ureg { | |||
198 | #define IPATH_RUNTIME_FORCE_WC_ORDER 0x4 | 198 | #define IPATH_RUNTIME_FORCE_WC_ORDER 0x4 |
199 | #define IPATH_RUNTIME_RCVHDR_COPY 0x8 | 199 | #define IPATH_RUNTIME_RCVHDR_COPY 0x8 |
200 | #define IPATH_RUNTIME_MASTER 0x10 | 200 | #define IPATH_RUNTIME_MASTER 0x10 |
201 | /* 0x20 and 0x40 are no longer used, but are reserved for ABI compatibility */ | 201 | #define IPATH_RUNTIME_NODMA_RTAIL 0x80 |
202 | #define IPATH_RUNTIME_FORCE_PIOAVAIL 0x400 | 202 | #define IPATH_RUNTIME_FORCE_PIOAVAIL 0x400 |
203 | #define IPATH_RUNTIME_PIO_REGSWAPPED 0x800 | 203 | #define IPATH_RUNTIME_PIO_REGSWAPPED 0x800 |
204 | 204 | ||
@@ -662,8 +662,12 @@ struct infinipath_counters { | |||
662 | #define INFINIPATH_RHF_LENGTH_SHIFT 0 | 662 | #define INFINIPATH_RHF_LENGTH_SHIFT 0 |
663 | #define INFINIPATH_RHF_RCVTYPE_MASK 0x7 | 663 | #define INFINIPATH_RHF_RCVTYPE_MASK 0x7 |
664 | #define INFINIPATH_RHF_RCVTYPE_SHIFT 11 | 664 | #define INFINIPATH_RHF_RCVTYPE_SHIFT 11 |
665 | #define INFINIPATH_RHF_EGRINDEX_MASK 0x7FF | 665 | #define INFINIPATH_RHF_EGRINDEX_MASK 0xFFF |
666 | #define INFINIPATH_RHF_EGRINDEX_SHIFT 16 | 666 | #define INFINIPATH_RHF_EGRINDEX_SHIFT 16 |
667 | #define INFINIPATH_RHF_SEQ_MASK 0xF | ||
668 | #define INFINIPATH_RHF_SEQ_SHIFT 0 | ||
669 | #define INFINIPATH_RHF_HDRQ_OFFSET_MASK 0x7FF | ||
670 | #define INFINIPATH_RHF_HDRQ_OFFSET_SHIFT 4 | ||
667 | #define INFINIPATH_RHF_H_ICRCERR 0x80000000 | 671 | #define INFINIPATH_RHF_H_ICRCERR 0x80000000 |
668 | #define INFINIPATH_RHF_H_VCRCERR 0x40000000 | 672 | #define INFINIPATH_RHF_H_VCRCERR 0x40000000 |
669 | #define INFINIPATH_RHF_H_PARITYERR 0x20000000 | 673 | #define INFINIPATH_RHF_H_PARITYERR 0x20000000 |
@@ -673,6 +677,8 @@ struct infinipath_counters { | |||
673 | #define INFINIPATH_RHF_H_TIDERR 0x02000000 | 677 | #define INFINIPATH_RHF_H_TIDERR 0x02000000 |
674 | #define INFINIPATH_RHF_H_MKERR 0x01000000 | 678 | #define INFINIPATH_RHF_H_MKERR 0x01000000 |
675 | #define INFINIPATH_RHF_H_IBERR 0x00800000 | 679 | #define INFINIPATH_RHF_H_IBERR 0x00800000 |
680 | #define INFINIPATH_RHF_H_ERR_MASK 0xFF800000 | ||
681 | #define INFINIPATH_RHF_L_USE_EGR 0x80000000 | ||
676 | #define INFINIPATH_RHF_L_SWA 0x00008000 | 682 | #define INFINIPATH_RHF_L_SWA 0x00008000 |
677 | #define INFINIPATH_RHF_L_SWB 0x00004000 | 683 | #define INFINIPATH_RHF_L_SWB 0x00004000 |
678 | 684 | ||
@@ -696,6 +702,7 @@ struct infinipath_counters { | |||
696 | /* SendPIO per-buffer control */ | 702 | /* SendPIO per-buffer control */ |
697 | #define INFINIPATH_SP_TEST 0x40 | 703 | #define INFINIPATH_SP_TEST 0x40 |
698 | #define INFINIPATH_SP_TESTEBP 0x20 | 704 | #define INFINIPATH_SP_TESTEBP 0x20 |
705 | #define INFINIPATH_SP_TRIGGER_SHIFT 15 | ||
699 | 706 | ||
700 | /* SendPIOAvail bits */ | 707 | /* SendPIOAvail bits */ |
701 | #define INFINIPATH_SENDPIOAVAIL_BUSY_SHIFT 1 | 708 | #define INFINIPATH_SENDPIOAVAIL_BUSY_SHIFT 1 |
@@ -762,6 +769,7 @@ struct ether_header { | |||
762 | #define IPATH_MSN_MASK 0xFFFFFF | 769 | #define IPATH_MSN_MASK 0xFFFFFF |
763 | #define IPATH_QPN_MASK 0xFFFFFF | 770 | #define IPATH_QPN_MASK 0xFFFFFF |
764 | #define IPATH_MULTICAST_LID_BASE 0xC000 | 771 | #define IPATH_MULTICAST_LID_BASE 0xC000 |
772 | #define IPATH_EAGER_TID_ID INFINIPATH_I_TID_MASK | ||
765 | #define IPATH_MULTICAST_QPN 0xFFFFFF | 773 | #define IPATH_MULTICAST_QPN 0xFFFFFF |
766 | 774 | ||
767 | /* Receive Header Queue: receive type (from infinipath) */ | 775 | /* Receive Header Queue: receive type (from infinipath) */ |
@@ -781,7 +789,7 @@ struct ether_header { | |||
781 | */ | 789 | */ |
782 | static inline __u32 ipath_hdrget_err_flags(const __le32 * rbuf) | 790 | static inline __u32 ipath_hdrget_err_flags(const __le32 * rbuf) |
783 | { | 791 | { |
784 | return __le32_to_cpu(rbuf[1]); | 792 | return __le32_to_cpu(rbuf[1]) & INFINIPATH_RHF_H_ERR_MASK; |
785 | } | 793 | } |
786 | 794 | ||
787 | static inline __u32 ipath_hdrget_rcv_type(const __le32 * rbuf) | 795 | static inline __u32 ipath_hdrget_rcv_type(const __le32 * rbuf) |
@@ -802,6 +810,23 @@ static inline __u32 ipath_hdrget_index(const __le32 * rbuf) | |||
802 | & INFINIPATH_RHF_EGRINDEX_MASK; | 810 | & INFINIPATH_RHF_EGRINDEX_MASK; |
803 | } | 811 | } |
804 | 812 | ||
813 | static inline __u32 ipath_hdrget_seq(const __le32 *rbuf) | ||
814 | { | ||
815 | return (__le32_to_cpu(rbuf[1]) >> INFINIPATH_RHF_SEQ_SHIFT) | ||
816 | & INFINIPATH_RHF_SEQ_MASK; | ||
817 | } | ||
818 | |||
819 | static inline __u32 ipath_hdrget_offset(const __le32 *rbuf) | ||
820 | { | ||
821 | return (__le32_to_cpu(rbuf[1]) >> INFINIPATH_RHF_HDRQ_OFFSET_SHIFT) | ||
822 | & INFINIPATH_RHF_HDRQ_OFFSET_MASK; | ||
823 | } | ||
824 | |||
825 | static inline __u32 ipath_hdrget_use_egr_buf(const __le32 *rbuf) | ||
826 | { | ||
827 | return __le32_to_cpu(rbuf[0]) & INFINIPATH_RHF_L_USE_EGR; | ||
828 | } | ||
829 | |||
805 | static inline __u32 ipath_hdrget_ipath_ver(__le32 hdrword) | 830 | static inline __u32 ipath_hdrget_ipath_ver(__le32 hdrword) |
806 | { | 831 | { |
807 | return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT) | 832 | return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT) |