]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: cpsw_new: fix error handling in cpsw_ndo_vlan_rx_kill_vid()
authorMurali Karicheri <m-karicheri2@ti.com>
Thu, 27 Aug 2020 14:38:39 +0000 (10:38 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2020 16:15:40 +0000 (09:15 -0700)
commit9a655c97ce6b7373af4a3e41b3fef66288854c3d
tree6f9150684a0721d15d17de1999c79625bccf3352
parent0a69225458b500b02fdbce18831b99cd1c0e9aff
net: ethernet: ti: cpsw_new: fix error handling in cpsw_ndo_vlan_rx_kill_vid()

This patch fixes a bunch of issues in cpsw_ndo_vlan_rx_kill_vid()

 - pm_runtime_get_sync() returns non zero value. This results in
   non zero value return to caller which will be interpreted as error.
   So overwrite ret with zero.
 - If VID matches with port VLAN VID, then set error code.
 - Currently when VLAN interface is deleted, all of the VLAN mc addresses
   are removed from ALE table, however the return values from ale function
   calls are not checked. These functions can return error code -ENOENT.
   But that shouldn't happen in a normal case. So add error print to
   catch the situations so that these can be investigated and addressed.
   return zero in these cases as these are not real error case, but only
   serve to catch ALE table update related issues and help address the
   same in the driver.

Fixes: f5a1d52100ec ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_new.c