net: ethernet: actions: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to
net: ethernet: actions: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do error handling byreturning an error code. However the value returned is ignored (apartfrom emitting a warning) and this typically results in resource leaks.To improve here there is a quest to make the remove callback returnvoid. In the first step of this quest all drivers are converted to.remove_new() which already returns void. Eventually after all driversare converted, .remove_new() is renamed to .remove().Trivially convert this driver from always returning zero in the removecallback to the void returning variant.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
net: Remove C45 check in C22 only MDIO bus driversThe MDIO core should not pass a C45 request via the C22 API call anymore. So remove the tests from the drivers.Signed-off-by: Andrew Lunn <andre
net: Remove C45 check in C22 only MDIO bus driversThe MDIO core should not pass a C45 request via the C22 API call anymore. So remove the tests from the drivers.Signed-off-by: Andrew Lunn <andrew@lunn.ch>Signed-off-by: Michael Walle <michael@walle.cc>Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net: drop the weight argument from netif_napi_addWe tell driver developers to always pass NAPI_POLL_WEIGHTas the weight to netif_napi_add(). This may be confusingto newcomers, drop the weight arg
net: drop the weight argument from netif_napi_addWe tell driver developers to always pass NAPI_POLL_WEIGHTas the weight to netif_napi_add(). This may be confusingto newcomers, drop the weight argument, those who reallyneed to tweak the weight can use netif_napi_add_weight().Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for CANLink: https://lore.kernel.org/r/20220927132753.750069-1-kuba@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
ethernet: constify references to netdev->dev_addr in driversThis big patch sprinkles const on local variables andfunction arguments which may refer to netdev->dev_addr.Commit 406f42fa0d3c ("net-
ethernet: constify references to netdev->dev_addr in driversThis big patch sprinkles const on local variables andfunction arguments which may refer to netdev->dev_addr.Commit 406f42fa0d3c ("net-next: When a bond have a massive amountof VLANs...") introduced a rbtree for faster Ethernet address lookup. To maintain netdev->dev_addr in this tree we need to make allthe writes to it got through appropriate helpers.Some of the changes here are not strictly required - constis sometimes cast off but pointer is not used for writing.It seems like it's still better to add the const in casethe code changes later or relevant -W flags get enabledfor the build.No functional changes.Link: https://lore.kernel.org/r/20211014142432.449314-1-kuba@kernel.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
ethernet: use platform_get_ethdev_address()Use the new platform_get_ethdev_address() helper for the caseswhere dev->dev_addr is passed in directly as the destination. @@ expression dev, net;
ethernet: use platform_get_ethdev_address()Use the new platform_get_ethdev_address() helper for the caseswhere dev->dev_addr is passed in directly as the destination. @@ expression dev, net; @@ - eth_platform_get_mac_address(dev, net->dev_addr) + platform_get_ethdev_address(dev, net)Signed-off-by: Jakub Kicinski <kuba@kernel.org>Reviewed-by: Andrew Lunn <andrew@lunn.ch>Signed-off-by: David S. Miller <davem@davemloft.net>
ethernet: use eth_hw_addr_set() for dev->addr_len casesConvert all Ethernet drivers from memcpy(... dev->addr_len)to eth_hw_addr_set(): @@ expression dev, np; @@ - memcpy(dev->dev_addr, n
ethernet: use eth_hw_addr_set() for dev->addr_len casesConvert all Ethernet drivers from memcpy(... dev->addr_len)to eth_hw_addr_set(): @@ expression dev, np; @@ - memcpy(dev->dev_addr, np, dev->addr_len) + eth_hw_addr_set(dev, np)In theory addr_len may not be ETH_ALEN, but we don't expectnon-Ethernet devices to live under this directory, and onlythe following cases of setting addr_len exist: - cxgb4 for mgmt device,and the drivers which set it to ETH_ALEN: s2io, mlx4, vxge.Signed-off-by: Jakub Kicinski <kuba@kernel.org>Signed-off-by: David S. Miller <davem@davemloft.net>
net: ethernet: actions: Add helper dependency on COMPILE_TESTit's helpful for complie test in other platform(e.g.X86)Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>Signed-off-by: David S. Mill
net: ethernet: actions: Add helper dependency on COMPILE_TESTit's helpful for complie test in other platform(e.g.X86)Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>Signed-off-by: David S. Miller <davem@davemloft.net>
dev_ioctl: split out ndo_eth_ioctlMost users of ndo_do_ioctl are ethernet drivers that implementthe MII commands SIOCGMIIPHY/SIOCGMIIREG/SIOCSMIIREG, or hardwaretimestamping with SIOCSHWTSTAMP/SI
dev_ioctl: split out ndo_eth_ioctlMost users of ndo_do_ioctl are ethernet drivers that implementthe MII commands SIOCGMIIPHY/SIOCGMIIREG/SIOCSMIIREG, or hardwaretimestamping with SIOCSHWTSTAMP/SIOCGHWTSTAMP.Separate these from the few drivers that use ndo_do_ioctl toimplement SIOCBOND, SIOCBR and SIOCWANDEV commands.This is a purely cosmetic change intended to help readers findtheir way through the implementation.Cc: Doug Ledford <dledford@redhat.com>Cc: Jason Gunthorpe <jgg@ziepe.ca>Cc: Jay Vosburgh <j.vosburgh@gmail.com>Cc: Veaceslav Falico <vfalico@gmail.com>Cc: Andy Gospodarek <andy@greyhouse.net>Cc: Andrew Lunn <andrew@lunn.ch>Cc: Vivien Didelot <vivien.didelot@gmail.com>Cc: Florian Fainelli <f.fainelli@gmail.com>Cc: Vladimir Oltean <olteanv@gmail.com>Cc: Leon Romanovsky <leon@kernel.org>Cc: linux-rdma@vger.kernel.orgSigned-off-by: Arnd Bergmann <arnd@arndb.de>Acked-by: Jason Gunthorpe <jgg@nvidia.com>Signed-off-by: David S. Miller <davem@davemloft.net>
net: ethernet: actions: Add Actions Semi Owl Ethernet MAC driverAdd new driver for the Ethernet MAC used on the Actions Semi Owlfamily of SoCs.Currently this has been tested only on the Actions
net: ethernet: actions: Add Actions Semi Owl Ethernet MAC driverAdd new driver for the Ethernet MAC used on the Actions Semi Owlfamily of SoCs.Currently this has been tested only on the Actions Semi S500 SoCvariant.Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>Signed-off-by: David S. Miller <davem@davemloft.net>