~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to drivers/infiniband/hw/qib/qib_mad.h

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 * SOFTWARE.
33
33
 */
34
34
 
 
35
#include <rdma/ib_pma.h>
 
36
 
35
37
#define IB_SMP_UNSUP_VERSION    cpu_to_be16(0x0004)
36
38
#define IB_SMP_UNSUP_METHOD     cpu_to_be16(0x0008)
37
39
#define IB_SMP_UNSUP_METH_ATTR  cpu_to_be16(0x000C)
180
182
#define IB_VLARB_HIGHPRI_0_31   3
181
183
#define IB_VLARB_HIGHPRI_32_63  4
182
184
 
183
 
/*
184
 
 * PMA class portinfo capability mask bits
185
 
 */
186
 
#define IB_PMA_CLASS_CAP_ALLPORTSELECT  cpu_to_be16(1 << 8)
187
 
#define IB_PMA_CLASS_CAP_EXT_WIDTH      cpu_to_be16(1 << 9)
188
 
#define IB_PMA_CLASS_CAP_XMIT_WAIT      cpu_to_be16(1 << 12)
189
 
 
190
 
#define IB_PMA_CLASS_PORT_INFO          cpu_to_be16(0x0001)
191
 
#define IB_PMA_PORT_SAMPLES_CONTROL     cpu_to_be16(0x0010)
192
 
#define IB_PMA_PORT_SAMPLES_RESULT      cpu_to_be16(0x0011)
193
 
#define IB_PMA_PORT_COUNTERS            cpu_to_be16(0x0012)
194
 
#define IB_PMA_PORT_COUNTERS_EXT        cpu_to_be16(0x001D)
195
 
#define IB_PMA_PORT_SAMPLES_RESULT_EXT  cpu_to_be16(0x001E)
196
185
#define IB_PMA_PORT_COUNTERS_CONG       cpu_to_be16(0xFF00)
197
186
 
198
 
struct ib_perf {
199
 
        u8 base_version;
200
 
        u8 mgmt_class;
201
 
        u8 class_version;
202
 
        u8 method;
203
 
        __be16 status;
204
 
        __be16 unused;
205
 
        __be64 tid;
206
 
        __be16 attr_id;
207
 
        __be16 resv;
208
 
        __be32 attr_mod;
209
 
        u8 reserved[40];
210
 
        u8 data[192];
211
 
} __attribute__ ((packed));
212
 
 
213
 
struct ib_pma_classportinfo {
214
 
        u8 base_version;
215
 
        u8 class_version;
216
 
        __be16 cap_mask;
217
 
        u8 reserved[3];
218
 
        u8 resp_time_value;     /* only lower 5 bits */
219
 
        union ib_gid redirect_gid;
220
 
        __be32 redirect_tc_sl_fl;       /* 8, 4, 20 bits respectively */
221
 
        __be16 redirect_lid;
222
 
        __be16 redirect_pkey;
223
 
        __be32 redirect_qp;     /* only lower 24 bits */
224
 
        __be32 redirect_qkey;
225
 
        union ib_gid trap_gid;
226
 
        __be32 trap_tc_sl_fl;   /* 8, 4, 20 bits respectively */
227
 
        __be16 trap_lid;
228
 
        __be16 trap_pkey;
229
 
        __be32 trap_hl_qp;      /* 8, 24 bits respectively */
230
 
        __be32 trap_qkey;
231
 
} __attribute__ ((packed));
232
 
 
233
 
struct ib_pma_portsamplescontrol {
234
 
        u8 opcode;
235
 
        u8 port_select;
236
 
        u8 tick;
237
 
        u8 counter_width;       /* only lower 3 bits */
238
 
        __be32 counter_mask0_9; /* 2, 10 * 3, bits */
239
 
        __be16 counter_mask10_14;       /* 1, 5 * 3, bits */
240
 
        u8 sample_mechanisms;
241
 
        u8 sample_status;       /* only lower 2 bits */
242
 
        __be64 option_mask;
243
 
        __be64 vendor_mask;
244
 
        __be32 sample_start;
245
 
        __be32 sample_interval;
246
 
        __be16 tag;
247
 
        __be16 counter_select[15];
248
 
} __attribute__ ((packed));
249
 
 
250
 
struct ib_pma_portsamplesresult {
251
 
        __be16 tag;
252
 
        __be16 sample_status;   /* only lower 2 bits */
253
 
        __be32 counter[15];
254
 
} __attribute__ ((packed));
255
 
 
256
 
struct ib_pma_portsamplesresult_ext {
257
 
        __be16 tag;
258
 
        __be16 sample_status;   /* only lower 2 bits */
259
 
        __be32 extended_width;  /* only upper 2 bits */
260
 
        __be64 counter[15];
261
 
} __attribute__ ((packed));
262
 
 
263
 
struct ib_pma_portcounters {
264
 
        u8 reserved;
265
 
        u8 port_select;
266
 
        __be16 counter_select;
267
 
        __be16 symbol_error_counter;
268
 
        u8 link_error_recovery_counter;
269
 
        u8 link_downed_counter;
270
 
        __be16 port_rcv_errors;
271
 
        __be16 port_rcv_remphys_errors;
272
 
        __be16 port_rcv_switch_relay_errors;
273
 
        __be16 port_xmit_discards;
274
 
        u8 port_xmit_constraint_errors;
275
 
        u8 port_rcv_constraint_errors;
276
 
        u8 reserved1;
277
 
        u8 lli_ebor_errors;     /* 4, 4, bits */
278
 
        __be16 reserved2;
279
 
        __be16 vl15_dropped;
280
 
        __be32 port_xmit_data;
281
 
        __be32 port_rcv_data;
282
 
        __be32 port_xmit_packets;
283
 
        __be32 port_rcv_packets;
284
 
} __attribute__ ((packed));
285
 
 
286
187
struct ib_pma_portcounters_cong {
287
188
        u8 reserved;
288
189
        u8 reserved1;
297
198
        u8 port_xmit_constraint_errors;
298
199
        u8 port_rcv_constraint_errors;
299
200
        u8 reserved2;
300
 
        u8 lli_ebor_errors;    /* 4, 4, bits */
 
201
        u8 link_overrun_errors; /* LocalLink: 7:4, BufferOverrun: 3:0 */
301
202
        __be16 reserved3;
302
203
        __be16 vl15_dropped;
303
204
        __be64 port_xmit_data;
316
217
/* number of 4nsec cycles equaling 2secs */
317
218
#define QIB_CONG_TIMER_PSINTERVAL               0x1DCD64EC
318
219
 
319
 
#define IB_PMA_SEL_SYMBOL_ERROR                 cpu_to_be16(0x0001)
320
 
#define IB_PMA_SEL_LINK_ERROR_RECOVERY          cpu_to_be16(0x0002)
321
 
#define IB_PMA_SEL_LINK_DOWNED                  cpu_to_be16(0x0004)
322
 
#define IB_PMA_SEL_PORT_RCV_ERRORS              cpu_to_be16(0x0008)
323
 
#define IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS      cpu_to_be16(0x0010)
324
 
#define IB_PMA_SEL_PORT_XMIT_DISCARDS           cpu_to_be16(0x0040)
325
 
#define IB_PMA_SEL_LOCAL_LINK_INTEGRITY_ERRORS  cpu_to_be16(0x0200)
326
 
#define IB_PMA_SEL_EXCESSIVE_BUFFER_OVERRUNS    cpu_to_be16(0x0400)
327
 
#define IB_PMA_SEL_PORT_VL15_DROPPED            cpu_to_be16(0x0800)
328
 
#define IB_PMA_SEL_PORT_XMIT_DATA               cpu_to_be16(0x1000)
329
 
#define IB_PMA_SEL_PORT_RCV_DATA                cpu_to_be16(0x2000)
330
 
#define IB_PMA_SEL_PORT_XMIT_PACKETS            cpu_to_be16(0x4000)
331
 
#define IB_PMA_SEL_PORT_RCV_PACKETS             cpu_to_be16(0x8000)
332
 
 
333
220
#define IB_PMA_SEL_CONG_ALL                     0x01
334
221
#define IB_PMA_SEL_CONG_PORT_DATA               0x02
335
222
#define IB_PMA_SEL_CONG_XMIT                    0x04
336
223
#define IB_PMA_SEL_CONG_ROUTING                 0x08
337
224
 
338
 
struct ib_pma_portcounters_ext {
339
 
        u8 reserved;
340
 
        u8 port_select;
341
 
        __be16 counter_select;
342
 
        __be32 reserved1;
343
 
        __be64 port_xmit_data;
344
 
        __be64 port_rcv_data;
345
 
        __be64 port_xmit_packets;
346
 
        __be64 port_rcv_packets;
347
 
        __be64 port_unicast_xmit_packets;
348
 
        __be64 port_unicast_rcv_packets;
349
 
        __be64 port_multicast_xmit_packets;
350
 
        __be64 port_multicast_rcv_packets;
351
 
} __attribute__ ((packed));
352
 
 
353
 
#define IB_PMA_SELX_PORT_XMIT_DATA              cpu_to_be16(0x0001)
354
 
#define IB_PMA_SELX_PORT_RCV_DATA               cpu_to_be16(0x0002)
355
 
#define IB_PMA_SELX_PORT_XMIT_PACKETS           cpu_to_be16(0x0004)
356
 
#define IB_PMA_SELX_PORT_RCV_PACKETS            cpu_to_be16(0x0008)
357
 
#define IB_PMA_SELX_PORT_UNI_XMIT_PACKETS       cpu_to_be16(0x0010)
358
 
#define IB_PMA_SELX_PORT_UNI_RCV_PACKETS        cpu_to_be16(0x0020)
359
 
#define IB_PMA_SELX_PORT_MULTI_XMIT_PACKETS     cpu_to_be16(0x0040)
360
 
#define IB_PMA_SELX_PORT_MULTI_RCV_PACKETS      cpu_to_be16(0x0080)
361
 
 
362
225
/*
363
226
 * The PortSamplesControl.CounterMasks field is an array of 3 bit fields
364
227
 * which specify the N'th counter's capabilities. See ch. 16.1.3.2.