]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/mvneta.c
Prepare v2018.03-rc1
[u-boot] / drivers / net / mvneta.c
index 8881cc77fe2aef99bd037f93a18e11d21be22040..83e31537688163a155e97687e7706570c5e5c7e0 100644 (file)
@@ -540,7 +540,7 @@ static void mvneta_txq_pend_desc_add(struct mvneta_port *pp,
        u32 val;
 
        /* Only 255 descriptors can be added at once ; Assume caller
-        * process TX desriptors in quanta less than 256
+        * process TX descriptors in quanta less than 256
         */
        val = pend_desc;
        mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val);
@@ -1654,7 +1654,11 @@ static int mvneta_recv(struct udevice *dev, int flags, uchar **packetp)
                 */
                *packetp = data;
 
-               mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done);
+               /*
+                * Only mark one descriptor as free
+                * since only one was processed
+                */
+               mvneta_rxq_desc_num_update(pp, rxq, 1, 1);
        }
 
        return rx_bytes;
@@ -1695,7 +1699,7 @@ static int mvneta_probe(struct udevice *dev)
        pp->base = (void __iomem *)pdata->iobase;
 
        /* Configure MBUS address windows */
-       if (of_device_is_compatible(dev, "marvell,armada-3700-neta"))
+       if (device_is_compatible(dev, "marvell,armada-3700-neta"))
                mvneta_bypass_mbus_windows(pp);
        else
                mvneta_conf_mbus_windows(pp);
@@ -1756,7 +1760,7 @@ static int mvneta_ofdata_to_platdata(struct udevice *dev)
        struct eth_pdata *pdata = dev_get_platdata(dev);
        const char *phy_mode;
 
-       pdata->iobase = dev_get_addr(dev);
+       pdata->iobase = devfdt_get_addr(dev);
 
        /* Get phy-mode / phy_interface from DT */
        pdata->phy_interface = -1;