Lines Matching +full:enum +full:- +full:as +full:- +full:flags
2 * Copyright (c) 2012-2016 VMware, Inc. All rights reserved.
6 * version 2 as published by the Free Software Foundation or the BSD
7 * 2-Clause License. This program is distributed in the hope that it
11 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.
17 * The BSD 2-Clause License
23 * - Redistributions of source code must retain the above
27 * - Redistributions in binary form must reproduce the above
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
58 #include <rdma/vmw_pvrdma-abi.h>
64 /* NOT the same as BIT_MASK(). */
65 #define PVRDMA_MASK(n) ((n << 1) - 1)
194 u32 flags; member
204 /* PCI device-related information. */
212 unsigned long flags; member
222 /* RDMA-related device information. */
301 writel(cpu_to_le32(val), dev->regs + reg); in pvrdma_write_reg()
306 return le32_to_cpu(readl(dev->regs + reg)); in pvrdma_read_reg()
311 writel(cpu_to_le32(val), dev->driver_uar.map + PVRDMA_UAR_CQ_OFFSET); in pvrdma_write_uar_cq()
316 writel(cpu_to_le32(val), dev->driver_uar.map + PVRDMA_UAR_QP_OFFSET); in pvrdma_write_uar_qp()
322 return pdir->pages[offset / PAGE_SIZE] + (offset % PAGE_SIZE); in pvrdma_page_dir_get_ptr()
325 static inline enum pvrdma_mtu ib_mtu_to_pvrdma(enum ib_mtu mtu) in ib_mtu_to_pvrdma()
327 return (enum pvrdma_mtu)mtu; in ib_mtu_to_pvrdma()
330 static inline enum ib_mtu pvrdma_mtu_to_ib(enum pvrdma_mtu mtu) in pvrdma_mtu_to_ib()
332 return (enum ib_mtu)mtu; in pvrdma_mtu_to_ib()
335 static inline enum pvrdma_port_state ib_port_state_to_pvrdma( in ib_port_state_to_pvrdma()
336 enum ib_port_state state) in ib_port_state_to_pvrdma()
338 return (enum pvrdma_port_state)state; in ib_port_state_to_pvrdma()
341 static inline enum ib_port_state pvrdma_port_state_to_ib( in pvrdma_port_state_to_ib()
342 enum pvrdma_port_state state) in pvrdma_port_state_to_ib()
344 return (enum ib_port_state)state; in pvrdma_port_state_to_ib()
347 static inline int pvrdma_port_cap_flags_to_ib(int flags) in pvrdma_port_cap_flags_to_ib() argument
349 return flags; in pvrdma_port_cap_flags_to_ib()
352 static inline enum pvrdma_port_width ib_port_width_to_pvrdma( in ib_port_width_to_pvrdma()
353 enum ib_port_width width) in ib_port_width_to_pvrdma()
355 return (enum pvrdma_port_width)width; in ib_port_width_to_pvrdma()
358 static inline enum ib_port_width pvrdma_port_width_to_ib( in pvrdma_port_width_to_ib()
359 enum pvrdma_port_width width) in pvrdma_port_width_to_ib()
361 return (enum ib_port_width)width; in pvrdma_port_width_to_ib()
364 static inline enum pvrdma_port_speed ib_port_speed_to_pvrdma( in ib_port_speed_to_pvrdma()
365 enum ib_port_speed speed) in ib_port_speed_to_pvrdma()
367 return (enum pvrdma_port_speed)speed; in ib_port_speed_to_pvrdma()
370 static inline enum ib_port_speed pvrdma_port_speed_to_ib( in pvrdma_port_speed_to_ib()
371 enum pvrdma_port_speed speed) in pvrdma_port_speed_to_ib()
373 return (enum ib_port_speed)speed; in pvrdma_port_speed_to_ib()
381 static inline enum pvrdma_mig_state ib_mig_state_to_pvrdma( in ib_mig_state_to_pvrdma()
382 enum ib_mig_state state) in ib_mig_state_to_pvrdma()
384 return (enum pvrdma_mig_state)state; in ib_mig_state_to_pvrdma()
387 static inline enum ib_mig_state pvrdma_mig_state_to_ib( in pvrdma_mig_state_to_ib()
388 enum pvrdma_mig_state state) in pvrdma_mig_state_to_ib()
390 return (enum ib_mig_state)state; in pvrdma_mig_state_to_ib()
393 static inline int ib_access_flags_to_pvrdma(int flags) in ib_access_flags_to_pvrdma() argument
395 return flags; in ib_access_flags_to_pvrdma()
398 static inline int pvrdma_access_flags_to_ib(int flags) in pvrdma_access_flags_to_ib() argument
400 return flags & PVRDMA_MASK(PVRDMA_ACCESS_FLAGS_MAX); in pvrdma_access_flags_to_ib()
403 static inline enum pvrdma_qp_type ib_qp_type_to_pvrdma(enum ib_qp_type type) in ib_qp_type_to_pvrdma()
405 return (enum pvrdma_qp_type)type; in ib_qp_type_to_pvrdma()
408 static inline enum pvrdma_qp_state ib_qp_state_to_pvrdma(enum ib_qp_state state) in ib_qp_state_to_pvrdma()
410 return (enum pvrdma_qp_state)state; in ib_qp_state_to_pvrdma()
413 static inline enum ib_qp_state pvrdma_qp_state_to_ib(enum pvrdma_qp_state state) in pvrdma_qp_state_to_ib()
415 return (enum ib_qp_state)state; in pvrdma_qp_state_to_ib()
418 static inline enum pvrdma_wr_opcode ib_wr_opcode_to_pvrdma(enum ib_wr_opcode op) in ib_wr_opcode_to_pvrdma()
456 static inline enum ib_wc_status pvrdma_wc_status_to_ib( in pvrdma_wc_status_to_ib()
457 enum pvrdma_wc_status status) in pvrdma_wc_status_to_ib()
459 return (enum ib_wc_status)status; in pvrdma_wc_status_to_ib()
492 static inline int pvrdma_wc_flags_to_ib(int flags) in pvrdma_wc_flags_to_ib() argument
494 return flags; in pvrdma_wc_flags_to_ib()
497 static inline int ib_send_flags_to_pvrdma(int flags) in ib_send_flags_to_pvrdma() argument
499 return flags & PVRDMA_MASK(PVRDMA_SEND_FLAGS_MAX); in ib_send_flags_to_pvrdma()
502 static inline int pvrdma_network_type_to_ib(enum pvrdma_network_type type) in pvrdma_network_type_to_ib()
530 u8 ib_gid_type_to_pvrdma(enum ib_gid_type gid_type);