aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx4/device.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 47e163ad3d11..ca5645c43f61 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -374,6 +374,27 @@ struct mlx4_av {
374 u8 dgid[16]; 374 u8 dgid[16];
375}; 375};
376 376
377struct mlx4_eth_av {
378 __be32 port_pd;
379 u8 reserved1;
380 u8 smac_idx;
381 u16 reserved2;
382 u8 reserved3;
383 u8 gid_index;
384 u8 stat_rate;
385 u8 hop_limit;
386 __be32 sl_tclass_flowlabel;
387 u8 dgid[16];
388 u32 reserved4[2];
389 __be16 vlan;
390 u8 mac[6];
391};
392
393union mlx4_ext_av {
394 struct mlx4_av ib;
395 struct mlx4_eth_av eth;
396};
397
377struct mlx4_dev { 398struct mlx4_dev {
378 struct pci_dev *pdev; 399 struct pci_dev *pdev;
379 unsigned long flags; 400 unsigned long flags;
@@ -402,6 +423,12 @@ struct mlx4_init_port_param {
402 if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \ 423 if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \
403 ~(dev)->caps.port_mask) & 1 << ((port) - 1)) 424 ~(dev)->caps.port_mask) & 1 << ((port) - 1))
404 425
426#define mlx4_foreach_ib_transport_port(port, dev) \
427 for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \
428 if (((dev)->caps.port_mask & 1 << ((port) - 1)) || \
429 ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE))
430
431
405int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, 432int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
406 struct mlx4_buf *buf); 433 struct mlx4_buf *buf);
407void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); 434void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);