diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_common.h')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_common.h | 54 |
1 files changed, 43 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h index f577905e3aca..54139d398181 100644 --- a/drivers/infiniband/hw/ipath/ipath_common.h +++ b/drivers/infiniband/hw/ipath/ipath_common.h | |||
@@ -141,8 +141,9 @@ struct infinipath_stats { | |||
141 | * packets if ipath not configured, etc.) | 141 | * packets if ipath not configured, etc.) |
142 | */ | 142 | */ |
143 | __u64 sps_krdrops; | 143 | __u64 sps_krdrops; |
144 | __u64 sps_txeparity; /* PIO buffer parity error, recovered */ | ||
144 | /* pad for future growth */ | 145 | /* pad for future growth */ |
145 | __u64 __sps_pad[46]; | 146 | __u64 __sps_pad[45]; |
146 | }; | 147 | }; |
147 | 148 | ||
148 | /* | 149 | /* |
@@ -185,6 +186,9 @@ typedef enum _ipath_ureg { | |||
185 | #define IPATH_RUNTIME_PCIE 0x2 | 186 | #define IPATH_RUNTIME_PCIE 0x2 |
186 | #define IPATH_RUNTIME_FORCE_WC_ORDER 0x4 | 187 | #define IPATH_RUNTIME_FORCE_WC_ORDER 0x4 |
187 | #define IPATH_RUNTIME_RCVHDR_COPY 0x8 | 188 | #define IPATH_RUNTIME_RCVHDR_COPY 0x8 |
189 | #define IPATH_RUNTIME_MASTER 0x10 | ||
190 | #define IPATH_RUNTIME_PBC_REWRITE 0x20 | ||
191 | #define IPATH_RUNTIME_LOOSE_DMA_ALIGN 0x40 | ||
188 | 192 | ||
189 | /* | 193 | /* |
190 | * This structure is returned by ipath_userinit() immediately after | 194 | * This structure is returned by ipath_userinit() immediately after |
@@ -202,7 +206,8 @@ struct ipath_base_info { | |||
202 | /* version of software, for feature checking. */ | 206 | /* version of software, for feature checking. */ |
203 | __u32 spi_sw_version; | 207 | __u32 spi_sw_version; |
204 | /* InfiniPath port assigned, goes into sent packets */ | 208 | /* InfiniPath port assigned, goes into sent packets */ |
205 | __u32 spi_port; | 209 | __u16 spi_port; |
210 | __u16 spi_subport; | ||
206 | /* | 211 | /* |
207 | * IB MTU, packets IB data must be less than this. | 212 | * IB MTU, packets IB data must be less than this. |
208 | * The MTU is in bytes, and will be a multiple of 4 bytes. | 213 | * The MTU is in bytes, and will be a multiple of 4 bytes. |
@@ -218,7 +223,7 @@ struct ipath_base_info { | |||
218 | __u32 spi_tidcnt; | 223 | __u32 spi_tidcnt; |
219 | /* size of the TID Eager list in infinipath, in entries */ | 224 | /* size of the TID Eager list in infinipath, in entries */ |
220 | __u32 spi_tidegrcnt; | 225 | __u32 spi_tidegrcnt; |
221 | /* size of a single receive header queue entry. */ | 226 | /* size of a single receive header queue entry in words. */ |
222 | __u32 spi_rcvhdrent_size; | 227 | __u32 spi_rcvhdrent_size; |
223 | /* | 228 | /* |
224 | * Count of receive header queue entries allocated. | 229 | * Count of receive header queue entries allocated. |
@@ -310,6 +315,12 @@ struct ipath_base_info { | |||
310 | __u32 spi_filler_for_align; | 315 | __u32 spi_filler_for_align; |
311 | /* address of readonly memory copy of the rcvhdrq tail register. */ | 316 | /* address of readonly memory copy of the rcvhdrq tail register. */ |
312 | __u64 spi_rcvhdr_tailaddr; | 317 | __u64 spi_rcvhdr_tailaddr; |
318 | |||
319 | /* shared memory pages for subports if IPATH_RUNTIME_MASTER is set */ | ||
320 | __u64 spi_subport_uregbase; | ||
321 | __u64 spi_subport_rcvegrbuf; | ||
322 | __u64 spi_subport_rcvhdr_base; | ||
323 | |||
313 | } __attribute__ ((aligned(8))); | 324 | } __attribute__ ((aligned(8))); |
314 | 325 | ||
315 | 326 | ||
@@ -328,12 +339,12 @@ struct ipath_base_info { | |||
328 | 339 | ||
329 | /* | 340 | /* |
330 | * Minor version differences are always compatible | 341 | * Minor version differences are always compatible |
331 | * a within a major version, however if if user software is larger | 342 | * a within a major version, however if user software is larger |
332 | * than driver software, some new features and/or structure fields | 343 | * than driver software, some new features and/or structure fields |
333 | * may not be implemented; the user code must deal with this if it | 344 | * may not be implemented; the user code must deal with this if it |
334 | * cares, or it must abort after initialization reports the difference | 345 | * cares, or it must abort after initialization reports the difference. |
335 | */ | 346 | */ |
336 | #define IPATH_USER_SWMINOR 2 | 347 | #define IPATH_USER_SWMINOR 3 |
337 | 348 | ||
338 | #define IPATH_USER_SWVERSION ((IPATH_USER_SWMAJOR<<16) | IPATH_USER_SWMINOR) | 349 | #define IPATH_USER_SWVERSION ((IPATH_USER_SWMAJOR<<16) | IPATH_USER_SWMINOR) |
339 | 350 | ||
@@ -379,7 +390,16 @@ struct ipath_user_info { | |||
379 | */ | 390 | */ |
380 | __u32 spu_rcvhdrsize; | 391 | __u32 spu_rcvhdrsize; |
381 | 392 | ||
382 | __u64 spu_unused; /* kept for compatible layout */ | 393 | /* |
394 | * If two or more processes wish to share a port, each process | ||
395 | * must set the spu_subport_cnt and spu_subport_id to the same | ||
396 | * values. The only restriction on the spu_subport_id is that | ||
397 | * it be unique for a given node. | ||
398 | */ | ||
399 | __u16 spu_subport_cnt; | ||
400 | __u16 spu_subport_id; | ||
401 | |||
402 | __u32 spu_unused; /* kept for compatible layout */ | ||
383 | 403 | ||
384 | /* | 404 | /* |
385 | * address of struct base_info to write to | 405 | * address of struct base_info to write to |
@@ -392,19 +412,25 @@ struct ipath_user_info { | |||
392 | 412 | ||
393 | #define IPATH_CMD_MIN 16 | 413 | #define IPATH_CMD_MIN 16 |
394 | 414 | ||
395 | #define IPATH_CMD_USER_INIT 16 /* set up userspace */ | 415 | #define __IPATH_CMD_USER_INIT 16 /* old set up userspace (for old user code) */ |
396 | #define IPATH_CMD_PORT_INFO 17 /* find out what resources we got */ | 416 | #define IPATH_CMD_PORT_INFO 17 /* find out what resources we got */ |
397 | #define IPATH_CMD_RECV_CTRL 18 /* control receipt of packets */ | 417 | #define IPATH_CMD_RECV_CTRL 18 /* control receipt of packets */ |
398 | #define IPATH_CMD_TID_UPDATE 19 /* update expected TID entries */ | 418 | #define IPATH_CMD_TID_UPDATE 19 /* update expected TID entries */ |
399 | #define IPATH_CMD_TID_FREE 20 /* free expected TID entries */ | 419 | #define IPATH_CMD_TID_FREE 20 /* free expected TID entries */ |
400 | #define IPATH_CMD_SET_PART_KEY 21 /* add partition key */ | 420 | #define IPATH_CMD_SET_PART_KEY 21 /* add partition key */ |
421 | #define IPATH_CMD_SLAVE_INFO 22 /* return info on slave processes */ | ||
422 | #define IPATH_CMD_ASSIGN_PORT 23 /* allocate HCA and port */ | ||
423 | #define IPATH_CMD_USER_INIT 24 /* set up userspace */ | ||
401 | 424 | ||
402 | #define IPATH_CMD_MAX 21 | 425 | #define IPATH_CMD_MAX 24 |
403 | 426 | ||
404 | struct ipath_port_info { | 427 | struct ipath_port_info { |
405 | __u32 num_active; /* number of active units */ | 428 | __u32 num_active; /* number of active units */ |
406 | __u32 unit; /* unit (chip) assigned to caller */ | 429 | __u32 unit; /* unit (chip) assigned to caller */ |
407 | __u32 port; /* port on unit assigned to caller */ | 430 | __u16 port; /* port on unit assigned to caller */ |
431 | __u16 subport; /* subport on unit assigned to caller */ | ||
432 | __u16 num_ports; /* number of ports available on unit */ | ||
433 | __u16 num_subports; /* number of subport slaves opened on port */ | ||
408 | }; | 434 | }; |
409 | 435 | ||
410 | struct ipath_tid_info { | 436 | struct ipath_tid_info { |
@@ -435,6 +461,8 @@ struct ipath_cmd { | |||
435 | __u32 recv_ctrl; | 461 | __u32 recv_ctrl; |
436 | /* partition key to set */ | 462 | /* partition key to set */ |
437 | __u16 part_key; | 463 | __u16 part_key; |
464 | /* user address of __u32 bitmask of active slaves */ | ||
465 | __u64 slave_mask_addr; | ||
438 | } cmd; | 466 | } cmd; |
439 | }; | 467 | }; |
440 | 468 | ||
@@ -596,6 +624,10 @@ struct infinipath_counters { | |||
596 | 624 | ||
597 | /* K_PktFlags bits */ | 625 | /* K_PktFlags bits */ |
598 | #define INFINIPATH_KPF_INTR 0x1 | 626 | #define INFINIPATH_KPF_INTR 0x1 |
627 | #define INFINIPATH_KPF_SUBPORT_MASK 0x3 | ||
628 | #define INFINIPATH_KPF_SUBPORT_SHIFT 1 | ||
629 | |||
630 | #define INFINIPATH_MAX_SUBPORT 4 | ||
599 | 631 | ||
600 | /* SendPIO per-buffer control */ | 632 | /* SendPIO per-buffer control */ |
601 | #define INFINIPATH_SP_TEST 0x40 | 633 | #define INFINIPATH_SP_TEST 0x40 |
@@ -610,7 +642,7 @@ struct ipath_header { | |||
610 | /* | 642 | /* |
611 | * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset - | 643 | * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset - |
612 | * 14 bits before ECO change ~28 Dec 03. After that, Vers 4, | 644 | * 14 bits before ECO change ~28 Dec 03. After that, Vers 4, |
613 | * Port 3, TID 11, offset 14. | 645 | * Port 4, TID 11, offset 13. |
614 | */ | 646 | */ |
615 | __le32 ver_port_tid_offset; | 647 | __le32 ver_port_tid_offset; |
616 | __le16 chksum; | 648 | __le16 chksum; |