Deleted Added
full compact
ib_pma.h (255932) ib_pma.h (291249)
1/*
2 * Copyright (c) 2006, 2007, 2008, 2009, 2010 QLogic Corporation.
3 * All rights reserved.
4 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 23 unchanged lines hidden (view full) ---

32 * SOFTWARE.
33 */
34
35#if !defined(IB_PMA_H)
36#define IB_PMA_H
37
38#include <rdma/ib_mad.h>
39
1/*
2 * Copyright (c) 2006, 2007, 2008, 2009, 2010 QLogic Corporation.
3 * All rights reserved.
4 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 23 unchanged lines hidden (view full) ---

32 * SOFTWARE.
33 */
34
35#if !defined(IB_PMA_H)
36#define IB_PMA_H
37
38#include <rdma/ib_mad.h>
39
40#define MAX_U32 0xffffffffULL
41#define MAX_U16 0xffffUL
42
43/* Counters should be saturate once they reach their maximum value */
44#define ASSIGN_32BIT_COUNTER(counter, value) do { \
45 if ((value) > MAX_U32) \
46 counter = cpu_to_be32(MAX_U32); \
47 else \
48 counter = cpu_to_be32(value); \
49} while (0)
50
51/* Counters should be saturate once they reach their maximum value */
52#define ASSIGN_16BIT_COUNTER(counter, value) do { \
53 if ((value) > MAX_U16) \
54 counter = cpu_to_be16(MAX_U16); \
55 else \
56 counter = cpu_to_be16(value); \
57} while (0)
58
40/*
41 * PMA class portinfo capability mask bits
42 */
43#define IB_PMA_CLASS_CAP_ALLPORTSELECT cpu_to_be16(1 << 8)
44#define IB_PMA_CLASS_CAP_EXT_WIDTH cpu_to_be16(1 << 9)
45#define IB_PMA_CLASS_CAP_XMIT_WAIT cpu_to_be16(1 << 12)
46
47#define IB_PMA_CLASS_PORT_INFO cpu_to_be16(0x0001)

--- 109 unchanged lines hidden ---
59/*
60 * PMA class portinfo capability mask bits
61 */
62#define IB_PMA_CLASS_CAP_ALLPORTSELECT cpu_to_be16(1 << 8)
63#define IB_PMA_CLASS_CAP_EXT_WIDTH cpu_to_be16(1 << 9)
64#define IB_PMA_CLASS_CAP_XMIT_WAIT cpu_to_be16(1 << 12)
65
66#define IB_PMA_CLASS_PORT_INFO cpu_to_be16(0x0001)

--- 109 unchanged lines hidden ---