]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Don't sleep during ndo_get_phys_port_name()
authorIdo Schimmel <idosch@mellanox.com>
Thu, 9 Jun 2016 07:51:40 +0000 (09:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Jun 2016 18:20:05 +0000 (11:20 -0700)
commit8389b8ac6d50a1ffa3d16c8bf7e7faea4f756b8e
tree51bc6346ac2935961cc57bdc789d1647d16a78aa
parent8508a18369c08a4a37fc4915834fb429be671658
mlxsw: spectrum: Don't sleep during ndo_get_phys_port_name()

When rtnl_fill_ifinfo() is called for a certain netdevice it queries its
various parameters such as switch id and physical port name. The
function might get called in an atomic context, which means the
underlying driver must not sleep during the query operation.

Don't query the device and sleep during ndo_get_phys_port_name(), but
instead store the needed parameters in port creation time.

Fixes: 185e314131fb ("mlxsw: spectrum: Add support for physical port names")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h