summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sunplus
AgeCommit message (Collapse)AuthorFilesLines
2022-07-08eth: sp7021: switch to netif_napi_add_tx()Jakub Kicinski1-1/+1
The Tx NAPI should use netif_napi_add_tx(). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Wells Lu <wellslutw@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-05-20net: ethernet: SP7021: fix a use after free of skb->lenDan Carpenter1-1/+3
The netif_receive_skb() function frees "skb" so store skb->len before it is freed. Fixes: fd3040b9394c ("net: ethernet: Add driver for Sunplus SP7021") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YoUuy4iTjFAcSn03@kili Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-05-18net: ethernet: sunplus: add missing of_node_put() in spl2sw_mdio_init()Yang Yingliang1-3/+8
of_get_child_by_name() returns device node pointer with refcount incremented. The refcount should be decremented before returning from spl2sw_mdio_init(). Fixes: fd3040b9394c ("net: ethernet: Add driver for Sunplus SP7021") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Wells Lu <wellslutw@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-05-17net: ethernet: Fix unmet direct dependencies detected for NVMEM_SUNPLUS_OCOTPWells Lu1-3/+0
Removed unnecessary: select COMMON_CLK_SP7021 select RESET_SUNPLUS select NVMEM_SUNPLUS_OCOTP from Kconfig. Reported-by: kernel test robot <yujie.liu@intel.com> Signed-off-by: Wells Lu <wellslutw@gmail.com> Link: https://lore.kernel.org/r/1652443036-24731-1-git-send-email-wellslutw@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-05-13net: ethernet: fix platform_no_drv_owner.cocci warningYang Li1-1/+0
Remove .owner field if calls are used which set it automatically. ./drivers/net/ethernet/sunplus/spl2sw_driver.c:569:3-8: No need to set .owner here. The core will do it. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-05-13net: ethernet: Use swap() instead of open coding itJiapeng Chong1-16/+4
Clean the following coccicheck warning: ./drivers/net/ethernet/sunplus/spl2sw_driver.c:217:27-28: WARNING opportunity for swap(). ./drivers/net/ethernet/sunplus/spl2sw_driver.c:222:27-28: WARNING opportunity for swap(). Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-05-12net: ethernet: SP7021: Fix spelling mistake "Interrput" -> "Interrupt"Colin Ian King1-1/+1
There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220511104448.150800-1-colin.i.king@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-05-10net: ethernet: Add driver for Sunplus SP7021Wells Lu15-0/+2040
Add driver for Sunplus SP7021 SoC. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Wells Lu <wellslutw@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>