Loading drivers/net/ethernet/ethoc.c +17 −17 Original line number Diff line number Diff line Loading @@ -447,8 +447,8 @@ static int ethoc_rx(struct net_device *dev, int limit) netif_receive_skb(skb); } else { if (net_ratelimit()) dev_warn(&dev->dev, "low on memory - " "packet dropped\n"); dev_warn(&dev->dev, "low on memory - packet dropped\n"); dev->stats.rx_dropped++; break; Loading Loading @@ -555,9 +555,8 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id) pending = ethoc_read(priv, INT_SOURCE); pending &= mask; if (unlikely(pending == 0)) { if (unlikely(pending == 0)) return IRQ_NONE; } ethoc_ack_irq(priv, pending); Loading Loading @@ -671,11 +670,10 @@ static int ethoc_mdio_probe(struct net_device *dev) struct phy_device *phy; int err; if (priv->phy_id != -1) { if (priv->phy_id != -1) phy = priv->mdio->phy_map[priv->phy_id]; } else { else phy = phy_find_first(priv->mdio); } if (!phy) { dev_err(&dev->dev, "no PHY found\n"); Loading Loading @@ -1053,12 +1051,14 @@ static int ethoc_probe(struct platform_device *pdev) } /* Check that the given MAC address is valid. If it isn't, read the * current MAC from the controller. */ * current MAC from the controller. */ if (!is_valid_ether_addr(netdev->dev_addr)) ethoc_get_mac_address(netdev, netdev->dev_addr); /* Check the MAC again for validity, if it still isn't choose and * program a random one. */ * program a random one. */ if (!is_valid_ether_addr(netdev->dev_addr)) { eth_random_addr(netdev->dev_addr); random_mac = true; Loading Loading
drivers/net/ethernet/ethoc.c +17 −17 Original line number Diff line number Diff line Loading @@ -447,8 +447,8 @@ static int ethoc_rx(struct net_device *dev, int limit) netif_receive_skb(skb); } else { if (net_ratelimit()) dev_warn(&dev->dev, "low on memory - " "packet dropped\n"); dev_warn(&dev->dev, "low on memory - packet dropped\n"); dev->stats.rx_dropped++; break; Loading Loading @@ -555,9 +555,8 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id) pending = ethoc_read(priv, INT_SOURCE); pending &= mask; if (unlikely(pending == 0)) { if (unlikely(pending == 0)) return IRQ_NONE; } ethoc_ack_irq(priv, pending); Loading Loading @@ -671,11 +670,10 @@ static int ethoc_mdio_probe(struct net_device *dev) struct phy_device *phy; int err; if (priv->phy_id != -1) { if (priv->phy_id != -1) phy = priv->mdio->phy_map[priv->phy_id]; } else { else phy = phy_find_first(priv->mdio); } if (!phy) { dev_err(&dev->dev, "no PHY found\n"); Loading Loading @@ -1053,12 +1051,14 @@ static int ethoc_probe(struct platform_device *pdev) } /* Check that the given MAC address is valid. If it isn't, read the * current MAC from the controller. */ * current MAC from the controller. */ if (!is_valid_ether_addr(netdev->dev_addr)) ethoc_get_mac_address(netdev, netdev->dev_addr); /* Check the MAC again for validity, if it still isn't choose and * program a random one. */ * program a random one. */ if (!is_valid_ether_addr(netdev->dev_addr)) { eth_random_addr(netdev->dev_addr); random_mac = true; Loading