static void macb_init_buffers(struct macb *bp)
{
struct macb_queue *queue;
-@@ -969,6 +985,7 @@ static int macb_mii_init(struct macb *bp
+@@ -977,6 +993,7 @@ static int macb_mii_init(struct macb *bp
bp->mii_bus->write = &macb_mdio_write_c22;
bp->mii_bus->read_c45 = &macb_mdio_read_c45;
bp->mii_bus->write_c45 = &macb_mdio_write_c45;
snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
bp->pdev->name, bp->pdev->id);
bp->mii_bus->priv = bp;
-@@ -1640,6 +1657,11 @@ static int macb_rx(struct macb_queue *qu
+@@ -1648,6 +1665,11 @@ static int macb_rx(struct macb_queue *qu
macb_init_rx_ring(queue);
queue_writel(queue, RBQP, queue->rx_ring_dma);
macb_writel(bp, NCR, ctrl | MACB_BIT(RE));
-@@ -1940,8 +1962,9 @@ static irqreturn_t macb_interrupt(int ir
+@@ -1948,8 +1970,9 @@ static irqreturn_t macb_interrupt(int ir
queue_writel(queue, ISR, MACB_BIT(TCOMP) |
MACB_BIT(TXUBR));
wmb(); // ensure softirq can see update
}
-@@ -2394,6 +2417,11 @@ static netdev_tx_t macb_start_xmit(struc
+@@ -2402,6 +2425,11 @@ static netdev_tx_t macb_start_xmit(struc
skb_tx_timestamp(skb);
spin_lock_irq(&bp->lock);
macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
spin_unlock_irq(&bp->lock);
-@@ -2768,6 +2796,37 @@ static void macb_configure_dma(struct ma
+@@ -2776,6 +2804,37 @@ static void macb_configure_dma(struct ma
}
}
static void macb_init_hw(struct macb *bp)
{
u32 config;
-@@ -2796,6 +2855,11 @@ static void macb_init_hw(struct macb *bp
+@@ -2804,6 +2863,11 @@ static void macb_init_hw(struct macb *bp
if (bp->caps & MACB_CAPS_JUMBO)
bp->rx_frm_len_mask = MACB_RX_JFRMLEN_MASK;
macb_configure_dma(bp);
/* Enable RX partial store and forward and set watermark */
-@@ -3157,6 +3221,52 @@ static void gem_get_ethtool_strings(stru
+@@ -3165,6 +3229,52 @@ static void gem_get_ethtool_strings(stru
}
}
static struct net_device_stats *macb_get_stats(struct net_device *dev)
{
struct macb *bp = netdev_priv(dev);
-@@ -3749,6 +3859,8 @@ static const struct ethtool_ops macb_eth
+@@ -3757,6 +3867,8 @@ static const struct ethtool_ops macb_eth
};
static const struct ethtool_ops gem_ethtool_ops = {
.get_regs_len = macb_get_regs_len,
.get_regs = macb_get_regs,
.get_wol = macb_get_wol,
-@@ -3758,6 +3870,8 @@ static const struct ethtool_ops gem_etht
+@@ -3766,6 +3878,8 @@ static const struct ethtool_ops gem_etht
.get_ethtool_stats = gem_get_ethtool_stats,
.get_strings = gem_get_ethtool_strings,
.get_sset_count = gem_get_sset_count,
.get_link_ksettings = macb_get_link_ksettings,
.set_link_ksettings = macb_set_link_ksettings,
.get_ringparam = macb_get_ringparam,
-@@ -5054,6 +5168,11 @@ static int macb_probe(struct platform_de
+@@ -5062,6 +5176,11 @@ static int macb_probe(struct platform_de
}
}
}
spin_lock_init(&bp->lock);
/* setup capabilities */
-@@ -5109,6 +5228,21 @@ static int macb_probe(struct platform_de
+@@ -5117,6 +5236,21 @@ static int macb_probe(struct platform_de
else
bp->phy_interface = interface;
/* IP specific init */
err = init(pdev);
if (err)
-@@ -5185,6 +5319,19 @@ static int macb_remove(struct platform_d
+@@ -5193,6 +5327,19 @@ static int macb_remove(struct platform_d
return 0;
}
static int __maybe_unused macb_suspend(struct device *dev)
{
struct net_device *netdev = dev_get_drvdata(dev);
-@@ -5399,6 +5546,7 @@ static const struct dev_pm_ops macb_pm_o
+@@ -5407,6 +5554,7 @@ static const struct dev_pm_ops macb_pm_o
static struct platform_driver macb_driver = {
.probe = macb_probe,
.remove = macb_remove,
#define QUECTEL_VENDOR_ID 0x2c7c
/* These Quectel products use Quectel's vendor ID */
-@@ -1158,6 +1163,11 @@ static const struct usb_device_id option
+@@ -1159,6 +1164,11 @@ static const struct usb_device_id option
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
.driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
/* Quectel products using Qualcomm vendor ID */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1199,6 +1209,11 @@ static const struct usb_device_id option
+@@ -1200,6 +1210,11 @@ static const struct usb_device_id option
.driver_info = ZLP },
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
.driver_info = RSVD(4) },