Loading drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +29 −12 Original line number Diff line number Diff line Loading @@ -420,8 +420,10 @@ static int qcom_ethqos_add_ipv6addr(struct ip_params *ip_info, struct net *net = dev_net(dev); /*For valid IPv6 address*/ if (!net || !net->genl_sock || !net->genl_sock->sk_socket) if (!net || !net->genl_sock || !net->genl_sock->sk_socket) { ETHQOSERR("Sock is null, unable to assign ipv6 address\n"); return -EFAULT; } if (!net->ipv6.devconf_dflt) { ETHQOSERR("ipv6.devconf_dflt is null, schedule wq\n"); Loading Loading @@ -556,7 +558,7 @@ static int qcom_ethqos_qmp_mailbox_init(struct qcom_ethqos *ethqos) ethqos->qmp_mbox_client = devm_kzalloc( ðqos->pdev->dev, sizeof(*ethqos->qmp_mbox_client), GFP_KERNEL); if (IS_ERR(ethqos->qmp_mbox_client)) { if (!ethqos->qmp_mbox_client || IS_ERR(ethqos->qmp_mbox_client)) { ETHQOSERR("qmp alloc client failed\n"); return -EINVAL; } Loading Loading @@ -1040,8 +1042,8 @@ static void ethqos_handle_phy_interrupt(struct qcom_ethqos *ethqos) struct stmmac_priv *priv = netdev_priv(dev); int micrel_intr_status = 0; if ((dev->phydev->phy_id & dev->phydev->drv->phy_id_mask) == MICREL_PHY_ID) { if (dev->phydev && ((dev->phydev->phy_id & dev->phydev->drv->phy_id_mask) == MICREL_PHY_ID)) { phy_intr_status = ethqos_mdio_read( priv, priv->plat->phy_addr, DWC_ETH_QOS_BASIC_STATUS); ETHQOSDBG( Loading Loading @@ -1156,15 +1158,23 @@ static ssize_t read_phy_reg_dump(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct qcom_ethqos *ethqos = file->private_data; struct platform_device *pdev; struct net_device *dev; struct stmmac_priv *priv; unsigned int len = 0, buf_len = 2000; char *buf; ssize_t ret_cnt; int phydata = 0; int i = 0; struct platform_device *pdev = ethqos->pdev; struct net_device *dev = platform_get_drvdata(pdev); struct stmmac_priv *priv = netdev_priv(dev); if (!ethqos) { ETHQOSERR("NULL Pointer\n"); return -EINVAL; } pdev = ethqos->pdev; dev = platform_get_drvdata(pdev); priv = netdev_priv(dev); if (!ethqos || !dev->phydev) { ETHQOSERR("NULL Pointer\n"); Loading Loading @@ -1204,13 +1214,20 @@ static ssize_t read_rgmii_reg_dump(struct file *file, loff_t *ppos) { struct qcom_ethqos *ethqos = file->private_data; struct platform_device *pdev; struct net_device *dev; unsigned int len = 0, buf_len = 2000; char *buf; ssize_t ret_cnt; int rgmii_data = 0; struct platform_device *pdev = ethqos->pdev; struct net_device *dev = platform_get_drvdata(pdev); if (!ethqos) { ETHQOSERR("NULL Pointer\n"); return -EINVAL; } pdev = ethqos->pdev; dev = platform_get_drvdata(pdev); if (!ethqos || !dev->phydev) { ETHQOSERR("NULL Pointer\n"); Loading Loading @@ -2329,6 +2346,7 @@ static void ethqos_set_early_eth_param( priv->plat->mdio_bus_data->phy_mask = priv->plat->mdio_bus_data->phy_mask | DUPLEX_FULL | SPEED_100; if (priv->plat) priv->plat->max_speed = SPEED_100; if (pparams.is_valid_ipv4_addr) { Loading Loading @@ -2776,8 +2794,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos = devm_kzalloc(&pdev->dev, sizeof(*ethqos), GFP_KERNEL); if (!ethqos) { ret = -ENOMEM; goto err_mem; return -ENOMEM; } ethqos->pdev = pdev; Loading drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-pps.c +2 −5 Original line number Diff line number Diff line Loading @@ -40,18 +40,15 @@ static DECLARE_WAIT_QUEUE_HEAD(avb_class_b_msg_wq); static int strlcmp(const char *s, const char *t, size_t n) { int ret; while (n-- && *t != '\0') { if (*s != *t) { ret = ((unsigned char)*s - (unsigned char)*t); return ((unsigned char)*s - (unsigned char)*t); n = 0; } else { ++s, ++t; ret = (unsigned char)*s; } } return ret; return (unsigned char)*s; } static void align_target_time_reg(u32 ch, void __iomem *ioaddr, Loading Loading
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +29 −12 Original line number Diff line number Diff line Loading @@ -420,8 +420,10 @@ static int qcom_ethqos_add_ipv6addr(struct ip_params *ip_info, struct net *net = dev_net(dev); /*For valid IPv6 address*/ if (!net || !net->genl_sock || !net->genl_sock->sk_socket) if (!net || !net->genl_sock || !net->genl_sock->sk_socket) { ETHQOSERR("Sock is null, unable to assign ipv6 address\n"); return -EFAULT; } if (!net->ipv6.devconf_dflt) { ETHQOSERR("ipv6.devconf_dflt is null, schedule wq\n"); Loading Loading @@ -556,7 +558,7 @@ static int qcom_ethqos_qmp_mailbox_init(struct qcom_ethqos *ethqos) ethqos->qmp_mbox_client = devm_kzalloc( ðqos->pdev->dev, sizeof(*ethqos->qmp_mbox_client), GFP_KERNEL); if (IS_ERR(ethqos->qmp_mbox_client)) { if (!ethqos->qmp_mbox_client || IS_ERR(ethqos->qmp_mbox_client)) { ETHQOSERR("qmp alloc client failed\n"); return -EINVAL; } Loading Loading @@ -1040,8 +1042,8 @@ static void ethqos_handle_phy_interrupt(struct qcom_ethqos *ethqos) struct stmmac_priv *priv = netdev_priv(dev); int micrel_intr_status = 0; if ((dev->phydev->phy_id & dev->phydev->drv->phy_id_mask) == MICREL_PHY_ID) { if (dev->phydev && ((dev->phydev->phy_id & dev->phydev->drv->phy_id_mask) == MICREL_PHY_ID)) { phy_intr_status = ethqos_mdio_read( priv, priv->plat->phy_addr, DWC_ETH_QOS_BASIC_STATUS); ETHQOSDBG( Loading Loading @@ -1156,15 +1158,23 @@ static ssize_t read_phy_reg_dump(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct qcom_ethqos *ethqos = file->private_data; struct platform_device *pdev; struct net_device *dev; struct stmmac_priv *priv; unsigned int len = 0, buf_len = 2000; char *buf; ssize_t ret_cnt; int phydata = 0; int i = 0; struct platform_device *pdev = ethqos->pdev; struct net_device *dev = platform_get_drvdata(pdev); struct stmmac_priv *priv = netdev_priv(dev); if (!ethqos) { ETHQOSERR("NULL Pointer\n"); return -EINVAL; } pdev = ethqos->pdev; dev = platform_get_drvdata(pdev); priv = netdev_priv(dev); if (!ethqos || !dev->phydev) { ETHQOSERR("NULL Pointer\n"); Loading Loading @@ -1204,13 +1214,20 @@ static ssize_t read_rgmii_reg_dump(struct file *file, loff_t *ppos) { struct qcom_ethqos *ethqos = file->private_data; struct platform_device *pdev; struct net_device *dev; unsigned int len = 0, buf_len = 2000; char *buf; ssize_t ret_cnt; int rgmii_data = 0; struct platform_device *pdev = ethqos->pdev; struct net_device *dev = platform_get_drvdata(pdev); if (!ethqos) { ETHQOSERR("NULL Pointer\n"); return -EINVAL; } pdev = ethqos->pdev; dev = platform_get_drvdata(pdev); if (!ethqos || !dev->phydev) { ETHQOSERR("NULL Pointer\n"); Loading Loading @@ -2329,6 +2346,7 @@ static void ethqos_set_early_eth_param( priv->plat->mdio_bus_data->phy_mask = priv->plat->mdio_bus_data->phy_mask | DUPLEX_FULL | SPEED_100; if (priv->plat) priv->plat->max_speed = SPEED_100; if (pparams.is_valid_ipv4_addr) { Loading Loading @@ -2776,8 +2794,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos = devm_kzalloc(&pdev->dev, sizeof(*ethqos), GFP_KERNEL); if (!ethqos) { ret = -ENOMEM; goto err_mem; return -ENOMEM; } ethqos->pdev = pdev; Loading
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-pps.c +2 −5 Original line number Diff line number Diff line Loading @@ -40,18 +40,15 @@ static DECLARE_WAIT_QUEUE_HEAD(avb_class_b_msg_wq); static int strlcmp(const char *s, const char *t, size_t n) { int ret; while (n-- && *t != '\0') { if (*s != *t) { ret = ((unsigned char)*s - (unsigned char)*t); return ((unsigned char)*s - (unsigned char)*t); n = 0; } else { ++s, ++t; ret = (unsigned char)*s; } } return ret; return (unsigned char)*s; } static void align_target_time_reg(u32 ch, void __iomem *ioaddr, Loading