diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_kernel.h')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_kernel.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index a8a56276ff1d..0cabd4f16234 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -79,8 +79,8 @@ struct ipath_portdata { | |||
79 | dma_addr_t port_rcvhdrq_phys; | 79 | dma_addr_t port_rcvhdrq_phys; |
80 | dma_addr_t port_rcvhdrqtailaddr_phys; | 80 | dma_addr_t port_rcvhdrqtailaddr_phys; |
81 | /* | 81 | /* |
82 | * number of opens on this instance (0 or 1; ignoring forks, dup, | 82 | * number of opens (including slave subports) on this instance |
83 | * etc. for now) | 83 | * (ignoring forks, dup, etc. for now) |
84 | */ | 84 | */ |
85 | int port_cnt; | 85 | int port_cnt; |
86 | /* | 86 | /* |
@@ -89,6 +89,10 @@ struct ipath_portdata { | |||
89 | */ | 89 | */ |
90 | /* instead of calculating it */ | 90 | /* instead of calculating it */ |
91 | unsigned port_port; | 91 | unsigned port_port; |
92 | /* non-zero if port is being shared. */ | ||
93 | u16 port_subport_cnt; | ||
94 | /* non-zero if port is being shared. */ | ||
95 | u16 port_subport_id; | ||
92 | /* chip offset of PIO buffers for this port */ | 96 | /* chip offset of PIO buffers for this port */ |
93 | u32 port_piobufs; | 97 | u32 port_piobufs; |
94 | /* how many alloc_pages() chunks in port_rcvegrbuf_pages */ | 98 | /* how many alloc_pages() chunks in port_rcvegrbuf_pages */ |
@@ -121,6 +125,16 @@ struct ipath_portdata { | |||
121 | u16 port_pkeys[4]; | 125 | u16 port_pkeys[4]; |
122 | /* so file ops can get at unit */ | 126 | /* so file ops can get at unit */ |
123 | struct ipath_devdata *port_dd; | 127 | struct ipath_devdata *port_dd; |
128 | /* A page of memory for rcvhdrhead, rcvegrhead, rcvegrtail * N */ | ||
129 | void *subport_uregbase; | ||
130 | /* An array of pages for the eager receive buffers * N */ | ||
131 | void *subport_rcvegrbuf; | ||
132 | /* An array of pages for the eager header queue entries * N */ | ||
133 | void *subport_rcvhdr_base; | ||
134 | /* The version of the library which opened this port */ | ||
135 | u32 userversion; | ||
136 | /* Bitmask of active slaves */ | ||
137 | u32 active_slaves; | ||
124 | }; | 138 | }; |
125 | 139 | ||
126 | struct sk_buff; | 140 | struct sk_buff; |
@@ -512,6 +526,12 @@ struct ipath_devdata { | |||
512 | u32 ipath_lli_errors; | 526 | u32 ipath_lli_errors; |
513 | }; | 527 | }; |
514 | 528 | ||
529 | /* Private data for file operations */ | ||
530 | struct ipath_filedata { | ||
531 | struct ipath_portdata *pd; | ||
532 | unsigned subport; | ||
533 | unsigned tidcursor; | ||
534 | }; | ||
515 | extern struct list_head ipath_dev_list; | 535 | extern struct list_head ipath_dev_list; |
516 | extern spinlock_t ipath_devs_lock; | 536 | extern spinlock_t ipath_devs_lock; |
517 | extern struct ipath_devdata *ipath_lookup(int unit); | 537 | extern struct ipath_devdata *ipath_lookup(int unit); |
@@ -572,7 +592,11 @@ int ipath_set_lid(struct ipath_devdata *, u32, u8); | |||
572 | int ipath_set_rx_pol_inv(struct ipath_devdata *dd, u8 new_pol_inv); | 592 | int ipath_set_rx_pol_inv(struct ipath_devdata *dd, u8 new_pol_inv); |
573 | 593 | ||
574 | /* for use in system calls, where we want to know device type, etc. */ | 594 | /* for use in system calls, where we want to know device type, etc. */ |
575 | #define port_fp(fp) ((struct ipath_portdata *) (fp)->private_data) | 595 | #define port_fp(fp) ((struct ipath_filedata *)(fp)->private_data)->pd |
596 | #define subport_fp(fp) \ | ||
597 | ((struct ipath_filedata *)(fp)->private_data)->subport | ||
598 | #define tidcursor_fp(fp) \ | ||
599 | ((struct ipath_filedata *)(fp)->private_data)->tidcursor | ||
576 | 600 | ||
577 | /* | 601 | /* |
578 | * values for ipath_flags | 602 | * values for ipath_flags |