linux_dsm_epyc7002/drivers/infiniband/hw/mlx5
Mark Bloch d3b5cc1cd9 RDMA/mlx5: Initialize roce port info before multiport master init
When working in mutliport RoCE mode it is possible to attach a slave
before the master. In that case the slave is waiting for a master to be
attached.  When the master is attached it goes over the list of waiting
slaves, finds a slave that is compatible and tries to bind it to itself.

The call stack is:
mlx5_ib_init_multiport_master() -> mlx5_ib_bind_slave_port()

In the bind function we will create a netdev notifier, but this is done
before we initialize the RoCE structure (this is done at a later stage by
the master in the ROCE stage).

Once events are delivered to that notifier we will use
mlx5_ib_get_native_port_mdev() to get the actual port and as the native
port is zero we will access an invalid index in the port structure.

Move the RoCE structure initialization to an earlier stage.

Fixes: 32f69e4be2 ("{net, IB}/mlx5: Manage port association for multiport RoCE")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-04-22 15:24:05 -03:00
..
ah.c RDMA: Handle AH allocations by IB/core 2019-04-08 13:05:25 -03:00
cmd.c net/mlx5: Add explicit bar address field 2019-04-02 12:49:38 -07:00
cmd.h RDMA/mad: Reduce MAD scope to mlx5_ib only 2019-01-15 10:02:29 +02:00
cong.c infiniband: mlx5: no need to check return value of debugfs_create functions 2019-01-24 09:22:29 -07:00
cq.c IB: Pass only ib_udata in function prototypes 2019-04-01 15:00:47 -03:00
devx.c RDMA/mlx5: Allow DEVX and raw creation flow on reps 2019-04-22 15:24:05 -03:00
doorbell.c IB/{core,hw}: Have ib_umem_get extract the ib_ucontext from ib_udata 2019-01-10 17:07:45 -07:00
flow.c RDMA/mlx5: Allow DEVX and raw creation flow on reps 2019-04-22 15:24:05 -03:00
gsi.c RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const 2018-07-30 20:09:34 -06:00
ib_rep.c RDMA/mlx5: Remove VF representor profile 2019-04-10 15:05:40 -03:00
ib_rep.h RDMA/mlx5: Move default representors SQ steering to rule to modify QP 2019-04-10 15:05:39 -03:00
ib_virt.c IB/mlx5: Restore IB guid/policy for virtual functions 2017-07-24 10:34:28 -04:00
Kconfig IB/{core,uverbs}: Move ib_umem_xxx functions from ib_core to ib_uverbs 2019-01-10 17:06:44 -07:00
mad.c RDMA/mad: Reduce MAD scope to mlx5_ib only 2019-01-15 10:02:29 +02:00
main.c RDMA/mlx5: Initialize roce port info before multiport master init 2019-04-22 15:24:05 -03:00
Makefile net/mlx5: Move SRQ functions to RDMA part 2018-12-04 09:14:30 +02:00
mem.c RDMA/mlx5: Embed into the code flow the ODP config option 2019-01-08 16:41:38 -07:00
mlx5_ib.h RDMA/mlx5: Access the prio bypass inside the FDB flow table namespace 2019-04-22 15:24:05 -03:00
mr.c RDMA/mlx5: Move rep into port struct 2019-04-10 15:05:39 -03:00
odp.c RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs 2019-04-08 13:05:24 -03:00
qp.c RDMA/mlx5: Check for error return in flow_rule rather than err 2019-04-12 11:19:49 -03:00
srq_cmd.c RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00
srq.c RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00
srq.h RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00