diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:54:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:54:22 -0400 |
commit | 9e5fca251f44832cb996961048ea977f80faf6ea (patch) | |
tree | 05d1df04502478ed71b78f63a861aa5cc67ef773 /include/linux/mlx4 | |
parent | 56083ab17e0075e538270823c374b59cc97e73b9 (diff) | |
parent | 116e9535fe5e00bafab7a637f306b110cf95cff5 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (63 commits)
IB/qib: clean up properly if pci_set_consistent_dma_mask() fails
IB/qib: Allow driver to load if PCIe AER fails
IB/qib: Fix uninitialized pointer if CONFIG_PCI_MSI not set
IB/qib: Fix extra log level in qib_early_err()
RDMA/cxgb4: Remove unnecessary KERN_<level> use
RDMA/cxgb3: Remove unnecessary KERN_<level> use
IB/core: Add link layer type information to sysfs
IB/mlx4: Add VLAN support for IBoE
IB/core: Add VLAN support for IBoE
IB/mlx4: Add support for IBoE
mlx4_en: Change multicast promiscuous mode to support IBoE
mlx4_core: Update data structures and constants for IBoE
mlx4_core: Allow protocol drivers to find corresponding interfaces
IB/uverbs: Return link layer type to userspace for query port operation
IB/srp: Sync buffer before posting send
IB/srp: Use list_first_entry()
IB/srp: Reduce number of BUSY conditions
IB/srp: Eliminate two forward declarations
IB/mlx4: Signal node desc changes to SM by using FW to generate trap 144
IB: Replace EXTRA_CFLAGS with ccflags-y
...
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/cmd.h | 2 | ||||
-rw-r--r-- | include/linux/mlx4/device.h | 35 | ||||
-rw-r--r-- | include/linux/mlx4/driver.h | 9 | ||||
-rw-r--r-- | include/linux/mlx4/qp.h | 9 |
4 files changed, 51 insertions, 4 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index 78a1b9671752..9a18667c13cc 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
@@ -58,6 +58,7 @@ enum { | |||
58 | MLX4_CMD_SENSE_PORT = 0x4d, | 58 | MLX4_CMD_SENSE_PORT = 0x4d, |
59 | MLX4_CMD_HW_HEALTH_CHECK = 0x50, | 59 | MLX4_CMD_HW_HEALTH_CHECK = 0x50, |
60 | MLX4_CMD_SET_PORT = 0xc, | 60 | MLX4_CMD_SET_PORT = 0xc, |
61 | MLX4_CMD_SET_NODE = 0x5a, | ||
61 | MLX4_CMD_ACCESS_DDR = 0x2e, | 62 | MLX4_CMD_ACCESS_DDR = 0x2e, |
62 | MLX4_CMD_MAP_ICM = 0xffa, | 63 | MLX4_CMD_MAP_ICM = 0xffa, |
63 | MLX4_CMD_UNMAP_ICM = 0xff9, | 64 | MLX4_CMD_UNMAP_ICM = 0xff9, |
@@ -141,6 +142,7 @@ enum { | |||
141 | MLX4_SET_PORT_MAC_TABLE = 0x2, | 142 | MLX4_SET_PORT_MAC_TABLE = 0x2, |
142 | MLX4_SET_PORT_VLAN_TABLE = 0x3, | 143 | MLX4_SET_PORT_VLAN_TABLE = 0x3, |
143 | MLX4_SET_PORT_PRIO_MAP = 0x4, | 144 | MLX4_SET_PORT_PRIO_MAP = 0x4, |
145 | MLX4_SET_PORT_GID_TABLE = 0x5, | ||
144 | }; | 146 | }; |
145 | 147 | ||
146 | struct mlx4_dev; | 148 | struct mlx4_dev; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 7338654c02b4..a7b15bc7648e 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -67,7 +67,8 @@ enum { | |||
67 | MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18, | 67 | MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18, |
68 | MLX4_DEV_CAP_FLAG_RAW_MCAST = 1 << 19, | 68 | MLX4_DEV_CAP_FLAG_RAW_MCAST = 1 << 19, |
69 | MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1 << 20, | 69 | MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1 << 20, |
70 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21 | 70 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21, |
71 | MLX4_DEV_CAP_FLAG_IBOE = 1 << 30 | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | enum { | 74 | enum { |
@@ -171,6 +172,10 @@ enum { | |||
171 | MLX4_NUM_FEXCH = 64 * 1024, | 172 | MLX4_NUM_FEXCH = 64 * 1024, |
172 | }; | 173 | }; |
173 | 174 | ||
175 | enum { | ||
176 | MLX4_MAX_FAST_REG_PAGES = 511, | ||
177 | }; | ||
178 | |||
174 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | 179 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) |
175 | { | 180 | { |
176 | return (major << 32) | (minor << 16) | subminor; | 181 | return (major << 32) | (minor << 16) | subminor; |
@@ -379,6 +384,27 @@ struct mlx4_av { | |||
379 | u8 dgid[16]; | 384 | u8 dgid[16]; |
380 | }; | 385 | }; |
381 | 386 | ||
387 | struct mlx4_eth_av { | ||
388 | __be32 port_pd; | ||
389 | u8 reserved1; | ||
390 | u8 smac_idx; | ||
391 | u16 reserved2; | ||
392 | u8 reserved3; | ||
393 | u8 gid_index; | ||
394 | u8 stat_rate; | ||
395 | u8 hop_limit; | ||
396 | __be32 sl_tclass_flowlabel; | ||
397 | u8 dgid[16]; | ||
398 | u32 reserved4[2]; | ||
399 | __be16 vlan; | ||
400 | u8 mac[6]; | ||
401 | }; | ||
402 | |||
403 | union mlx4_ext_av { | ||
404 | struct mlx4_av ib; | ||
405 | struct mlx4_eth_av eth; | ||
406 | }; | ||
407 | |||
382 | struct mlx4_dev { | 408 | struct mlx4_dev { |
383 | struct pci_dev *pdev; | 409 | struct pci_dev *pdev; |
384 | unsigned long flags; | 410 | unsigned long flags; |
@@ -407,6 +433,12 @@ struct mlx4_init_port_param { | |||
407 | if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \ | 433 | if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \ |
408 | ~(dev)->caps.port_mask) & 1 << ((port) - 1)) | 434 | ~(dev)->caps.port_mask) & 1 << ((port) - 1)) |
409 | 435 | ||
436 | #define mlx4_foreach_ib_transport_port(port, dev) \ | ||
437 | for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ | ||
438 | if (((dev)->caps.port_mask & 1 << ((port) - 1)) || \ | ||
439 | ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) | ||
440 | |||
441 | |||
410 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | 442 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, |
411 | struct mlx4_buf *buf); | 443 | struct mlx4_buf *buf); |
412 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); | 444 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); |
@@ -474,6 +506,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | |||
474 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 506 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); |
475 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 507 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); |
476 | 508 | ||
509 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); | ||
477 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); | 510 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); |
478 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index); | 511 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index); |
479 | 512 | ||
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index 53c5fdb6eac4..f407cd4bfb34 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
@@ -44,15 +44,24 @@ enum mlx4_dev_event { | |||
44 | MLX4_DEV_EVENT_PORT_REINIT, | 44 | MLX4_DEV_EVENT_PORT_REINIT, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | enum mlx4_protocol { | ||
48 | MLX4_PROTOCOL_IB, | ||
49 | MLX4_PROTOCOL_EN, | ||
50 | }; | ||
51 | |||
47 | struct mlx4_interface { | 52 | struct mlx4_interface { |
48 | void * (*add) (struct mlx4_dev *dev); | 53 | void * (*add) (struct mlx4_dev *dev); |
49 | void (*remove)(struct mlx4_dev *dev, void *context); | 54 | void (*remove)(struct mlx4_dev *dev, void *context); |
50 | void (*event) (struct mlx4_dev *dev, void *context, | 55 | void (*event) (struct mlx4_dev *dev, void *context, |
51 | enum mlx4_dev_event event, int port); | 56 | enum mlx4_dev_event event, int port); |
57 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); | ||
52 | struct list_head list; | 58 | struct list_head list; |
59 | enum mlx4_protocol protocol; | ||
53 | }; | 60 | }; |
54 | 61 | ||
55 | int mlx4_register_interface(struct mlx4_interface *intf); | 62 | int mlx4_register_interface(struct mlx4_interface *intf); |
56 | void mlx4_unregister_interface(struct mlx4_interface *intf); | 63 | void mlx4_unregister_interface(struct mlx4_interface *intf); |
57 | 64 | ||
65 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); | ||
66 | |||
58 | #endif /* MLX4_DRIVER_H */ | 67 | #endif /* MLX4_DRIVER_H */ |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 7abe64326f72..0eeb2a1a867c 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -109,10 +109,11 @@ struct mlx4_qp_path { | |||
109 | __be32 tclass_flowlabel; | 109 | __be32 tclass_flowlabel; |
110 | u8 rgid[16]; | 110 | u8 rgid[16]; |
111 | u8 sched_queue; | 111 | u8 sched_queue; |
112 | u8 snooper_flags; | 112 | u8 vlan_index; |
113 | u8 reserved3[2]; | 113 | u8 reserved3[2]; |
114 | u8 counter_index; | 114 | u8 counter_index; |
115 | u8 reserved4[7]; | 115 | u8 reserved4; |
116 | u8 dmac[6]; | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | struct mlx4_qp_context { | 119 | struct mlx4_qp_context { |
@@ -166,6 +167,7 @@ enum { | |||
166 | MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5, | 167 | MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5, |
167 | MLX4_WQE_CTRL_INS_VLAN = 1 << 6, | 168 | MLX4_WQE_CTRL_INS_VLAN = 1 << 6, |
168 | MLX4_WQE_CTRL_STRONG_ORDER = 1 << 7, | 169 | MLX4_WQE_CTRL_STRONG_ORDER = 1 << 7, |
170 | MLX4_WQE_CTRL_FORCE_LOOPBACK = 1 << 0, | ||
169 | }; | 171 | }; |
170 | 172 | ||
171 | struct mlx4_wqe_ctrl_seg { | 173 | struct mlx4_wqe_ctrl_seg { |
@@ -219,7 +221,8 @@ struct mlx4_wqe_datagram_seg { | |||
219 | __be32 av[8]; | 221 | __be32 av[8]; |
220 | __be32 dqpn; | 222 | __be32 dqpn; |
221 | __be32 qkey; | 223 | __be32 qkey; |
222 | __be32 reservd[2]; | 224 | __be16 vlan; |
225 | u8 mac[6]; | ||
223 | }; | 226 | }; |
224 | 227 | ||
225 | struct mlx4_wqe_lso_seg { | 228 | struct mlx4_wqe_lso_seg { |