diff options
author | John Hurley <john.hurley@netronome.com> | 2018-07-27 20:56:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-28 14:27:32 -0700 |
commit | ee614c871014045b45fae149b7245fc22a0bbdd8 (patch) | |
tree | 41061399f4985128c4b2067400f4389886d53602 /drivers/pinctrl/zte | |
parent | d0fdb366b6936f1ddfb4de2631484d58967a7efd (diff) | |
download | lwn-ee614c871014045b45fae149b7245fc22a0bbdd8.tar.gz lwn-ee614c871014045b45fae149b7245fc22a0bbdd8.zip |
nfp: flower: fix port metadata conversion bug
Function nfp_flower_repr_get_type_and_port expects an enum nfp_repr_type
return value but, if the repr type is unknown, returns a value of type
enum nfp_flower_cmsg_port_type. This means that if FW encodes the port
ID in a way the driver does not understand instead of dropping the frame
driver may attribute it to a physical port (uplink) provided the port
number is less than physical port count.
Fix this and ensure a net_device of NULL is returned if the repr can not
be determined.
Fixes: 1025351a88a4 ("nfp: add flower app")
Signed-off-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/pinctrl/zte')
0 files changed, 0 insertions, 0 deletions