return rx_done;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
-static void fe_tx_timeout(struct net_device *dev)
-#else
static void fe_tx_timeout(struct net_device *dev, unsigned int txqueue)
-#endif
{
struct fe_priv *priv = netdev_priv(dev);
struct fe_tx_ring *ring = &priv->tx_ring;
{
struct fe_priv *priv = netdev_priv(dev);
struct device_node *port;
- const char *mac_addr;
int err;
if (priv->soc->reset_fe)
fe_reset_phy(priv);
- mac_addr = of_get_mac_address(priv->dev->of_node);
- if (!IS_ERR_OR_NULL(mac_addr))
- ether_addr_copy(dev->dev_addr, mac_addr);
+ of_get_mac_address(priv->dev->of_node, dev->dev_addr);
/* If the mac address is invalid, use random mac address */
if (!is_valid_ether_addr(dev->dev_addr)) {
struct clk *sysclk;
int err, napi_weight;
- device_reset(&pdev->dev);
+ err = device_reset(&pdev->dev);
+ if (err)
+ dev_err(&pdev->dev, "failed to reset device\n");
match = of_match_device(of_fe_match, &pdev->dev);
soc = (struct fe_soc_data *)match->data;