]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: add warning in case driver does not set port type
authorJiri Pirko <jiri@mellanox.com>
Thu, 23 May 2019 08:43:35 +0000 (10:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 May 2019 16:18:43 +0000 (09:18 -0700)
commita0a4be2cd40b62063e80cc86e91e48a69ff9fce5
tree2b0252bae47159bb0641b855f377064b0ec7a8d8
parent7f3d713684a94fcf839da55ab818320b882f0e3d
devlink: add warning in case driver does not set port type

Prevent misbehavior of drivers who would not set port type for longer
period of time. Drivers should always set port type. Do WARN if that
happens.

Note that it is perfectly fine to temporarily not have the type set,
during initialization and port type change.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c