summaryrefslogtreecommitdiff
path: root/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch')
-rw-r--r--target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch58
1 files changed, 29 insertions, 29 deletions
diff --git a/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch b/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch
index fc626cb..31d0456 100644
--- a/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch
+++ b/target/linux/sunxi/patches-4.9/0051-stmmac-form-4-11.patch
@@ -1460,7 +1460,7 @@
}
/**
-@@ -415,7 +412,7 @@ static void stmmac_get_rx_hwtstamp(struc
+@@ -421,7 +418,7 @@ static void stmmac_get_rx_hwtstamp(struc
/**
* stmmac_hwtstamp_ioctl - control hardware timestamping.
* @dev: device pointer.
@@ -1469,7 +1469,7 @@
* a proprietary structure used to pass information to the driver.
* Description:
* This function configures the MAC to enable/disable both outgoing(TX)
-@@ -606,7 +603,7 @@ static int stmmac_hwtstamp_ioctl(struct
+@@ -612,7 +609,7 @@ static int stmmac_hwtstamp_ioctl(struct
/* program Sub Second Increment reg */
sec_inc = priv->hw->ptp->config_sub_second_increment(
@@ -1478,7 +1478,7 @@
priv->plat->has_gmac4);
temp = div_u64(1000000000ULL, sec_inc);
-@@ -616,7 +613,7 @@ static int stmmac_hwtstamp_ioctl(struct
+@@ -622,7 +619,7 @@ static int stmmac_hwtstamp_ioctl(struct
* where, freq_div_ratio = 1e9ns/sec_inc
*/
temp = (u64)(temp << 32);
@@ -1487,7 +1487,7 @@
priv->hw->ptp->config_addend(priv->ptpaddr,
priv->default_addend);
-@@ -644,18 +641,6 @@ static int stmmac_init_ptp(struct stmmac
+@@ -650,18 +647,6 @@ static int stmmac_init_ptp(struct stmmac
if (!(priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp))
return -EOPNOTSUPP;
@@ -1506,7 +1506,7 @@
priv->adv_ts = 0;
/* Check if adv_ts can be enabled for dwmac 4.x core */
if (priv->plat->has_gmac4 && priv->dma_cap.atime_stamp)
-@@ -682,8 +667,8 @@ static int stmmac_init_ptp(struct stmmac
+@@ -688,8 +673,8 @@ static int stmmac_init_ptp(struct stmmac
static void stmmac_release_ptp(struct stmmac_priv *priv)
{
@@ -1517,7 +1517,7 @@
stmmac_ptp_unregister(priv);
}
-@@ -704,7 +689,7 @@ static void stmmac_adjust_link(struct ne
+@@ -710,7 +695,7 @@ static void stmmac_adjust_link(struct ne
int new_state = 0;
unsigned int fc = priv->flow_ctrl, pause_time = priv->pause;
@@ -1526,7 +1526,7 @@
return;
spin_lock_irqsave(&priv->lock, flags);
-@@ -731,33 +716,36 @@ static void stmmac_adjust_link(struct ne
+@@ -737,33 +722,36 @@ static void stmmac_adjust_link(struct ne
new_state = 1;
switch (phydev->speed) {
case 1000:
@@ -1577,7 +1577,7 @@
priv->speed = phydev->speed;
}
-@@ -770,8 +758,8 @@ static void stmmac_adjust_link(struct ne
+@@ -776,8 +764,8 @@ static void stmmac_adjust_link(struct ne
} else if (priv->oldlink) {
new_state = 1;
priv->oldlink = 0;
@@ -1588,7 +1588,7 @@
}
if (new_state && netif_msg_link(priv))
-@@ -833,8 +821,8 @@ static int stmmac_init_phy(struct net_de
+@@ -839,8 +827,8 @@ static int stmmac_init_phy(struct net_de
int interface = priv->plat->interface;
int max_speed = priv->plat->max_speed;
priv->oldlink = 0;
@@ -1599,7 +1599,7 @@
if (priv->plat->phy_node) {
phydev = of_phy_connect(dev, priv->plat->phy_node,
-@@ -886,9 +874,7 @@ static int stmmac_init_phy(struct net_de
+@@ -892,9 +880,7 @@ static int stmmac_init_phy(struct net_de
if (phydev->is_pseudo_fixed_link)
phydev->irq = PHY_POLL;
@@ -1610,7 +1610,7 @@
return 0;
}
-@@ -1014,7 +1000,7 @@ static void stmmac_free_rx_buffers(struc
+@@ -1020,7 +1006,7 @@ static void stmmac_free_rx_buffers(struc
* @dev: net device structure
* @flags: gfp flag.
* Description: this function initializes the DMA RX/TX descriptors
@@ -1619,7 +1619,7 @@
* modes.
*/
static int init_dma_desc_rings(struct net_device *dev, gfp_t flags)
-@@ -1127,13 +1113,6 @@ static void dma_free_tx_skbufs(struct st
+@@ -1133,13 +1119,6 @@ static void dma_free_tx_skbufs(struct st
int i;
for (i = 0; i < DMA_TX_SIZE; i++) {
@@ -1633,7 +1633,7 @@
if (priv->tx_skbuff_dma[i].buf) {
if (priv->tx_skbuff_dma[i].map_as_page)
dma_unmap_page(priv->device,
-@@ -1147,7 +1126,7 @@ static void dma_free_tx_skbufs(struct st
+@@ -1153,7 +1132,7 @@ static void dma_free_tx_skbufs(struct st
DMA_TO_DEVICE);
}
@@ -1642,7 +1642,7 @@
dev_kfree_skb_any(priv->tx_skbuff[i]);
priv->tx_skbuff[i] = NULL;
priv->tx_skbuff_dma[i].buf = 0;
-@@ -1271,6 +1250,28 @@ static void free_dma_desc_resources(stru
+@@ -1277,6 +1256,28 @@ static void free_dma_desc_resources(stru
}
/**
@@ -1671,7 +1671,7 @@
* stmmac_dma_operation_mode - HW DMA operation mode
* @priv: driver private structure
* Description: it is used for configuring the DMA operation mode register in
-@@ -1671,10 +1672,6 @@ static int stmmac_hw_setup(struct net_de
+@@ -1677,10 +1678,6 @@ static int stmmac_hw_setup(struct net_de
/* Copy the MAC addr into the HW */
priv->hw->mac->set_umac_addr(priv->hw, dev->dev_addr, 0);
@@ -1682,7 +1682,7 @@
/* PS and related bits will be programmed according to the speed */
if (priv->hw->pcs) {
int speed = priv->plat->mac_port_sel_speed;
-@@ -1691,6 +1688,10 @@ static int stmmac_hw_setup(struct net_de
+@@ -1697,6 +1694,10 @@ static int stmmac_hw_setup(struct net_de
/* Initialize the MAC Core */
priv->hw->mac->core_init(priv->hw, dev->mtu);
@@ -1693,7 +1693,7 @@
ret = priv->hw->mac->rx_ipc(priv->hw);
if (!ret) {
netdev_warn(priv->dev, "RX IPC Checksum Offload disabled\n");
-@@ -1711,8 +1712,10 @@ static int stmmac_hw_setup(struct net_de
+@@ -1717,8 +1718,10 @@ static int stmmac_hw_setup(struct net_de
if (init_ptp) {
ret = stmmac_init_ptp(priv);
@@ -1706,7 +1706,7 @@
}
#ifdef CONFIG_DEBUG_FS
-@@ -1726,11 +1729,6 @@ static int stmmac_hw_setup(struct net_de
+@@ -1732,11 +1735,6 @@ static int stmmac_hw_setup(struct net_de
priv->hw->dma->start_tx(priv->ioaddr);
priv->hw->dma->start_rx(priv->ioaddr);
@@ -1718,7 +1718,7 @@
priv->tx_lpi_timer = STMMAC_DEFAULT_TWT_LS;
if ((priv->use_riwt) && (priv->hw->dma->rx_watchdog)) {
-@@ -2520,7 +2518,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2526,7 +2524,7 @@ static int stmmac_rx(struct stmmac_priv
if (unlikely(status == discard_frame)) {
priv->dev->stats.rx_errors++;
if (priv->hwts_rx_en && !priv->extend_desc) {
@@ -1727,7 +1727,7 @@
* with timestamp value, hence reinitialize
* them in stmmac_rx_refill() function so that
* device can reuse it.
-@@ -2543,7 +2541,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -2549,7 +2547,7 @@ static int stmmac_rx(struct stmmac_priv
frame_len = priv->hw->desc->get_rx_frame_len(p, coe);
@@ -1736,7 +1736,7 @@
* (preallocated during init) then the packet is
* ignored
*/
-@@ -2763,7 +2761,7 @@ static netdev_features_t stmmac_fix_feat
+@@ -2769,7 +2767,7 @@ static netdev_features_t stmmac_fix_feat
/* Some GMAC devices have a bugged Jumbo frame support that
* needs to have the Tx COE disabled for oversized frames
* (due to limited buffer sizes). In this case we disable
@@ -1745,7 +1745,7 @@
*/
if (priv->plat->bugged_jumbo && (dev->mtu > ETH_DATA_LEN))
features &= ~NETIF_F_CSUM_MASK;
-@@ -2909,9 +2907,7 @@ static void sysfs_display_ring(void *hea
+@@ -2915,9 +2913,7 @@ static void sysfs_display_ring(void *hea
struct dma_desc *p = (struct dma_desc *)head;
for (i = 0; i < size; i++) {
@@ -1755,7 +1755,7 @@
seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
i, (unsigned int)virt_to_phys(ep),
le32_to_cpu(ep->basic.des0),
-@@ -2920,7 +2916,6 @@ static void sysfs_display_ring(void *hea
+@@ -2926,7 +2922,6 @@ static void sysfs_display_ring(void *hea
le32_to_cpu(ep->basic.des3));
ep++;
} else {
@@ -1763,7 +1763,7 @@
seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
i, (unsigned int)virt_to_phys(ep),
le32_to_cpu(p->des0), le32_to_cpu(p->des1),
-@@ -2990,7 +2985,7 @@ static int stmmac_sysfs_dma_cap_read(str
+@@ -2996,7 +2991,7 @@ static int stmmac_sysfs_dma_cap_read(str
(priv->dma_cap.hash_filter) ? "Y" : "N");
seq_printf(seq, "\tMultiple MAC address registers: %s\n",
(priv->dma_cap.multi_addr) ? "Y" : "N");
@@ -1772,7 +1772,7 @@
(priv->dma_cap.pcs) ? "Y" : "N");
seq_printf(seq, "\tSMA (MDIO) Interface: %s\n",
(priv->dma_cap.sma_mdio) ? "Y" : "N");
-@@ -3266,44 +3261,8 @@ int stmmac_dvr_probe(struct device *devi
+@@ -3272,44 +3267,8 @@ int stmmac_dvr_probe(struct device *devi
if ((phyaddr >= 0) && (phyaddr <= 31))
priv->plat->phy_addr = phyaddr;
@@ -1819,7 +1819,7 @@
/* Init MAC and get the capabilities */
ret = stmmac_hw_init(priv);
-@@ -3389,10 +3348,6 @@ error_netdev_register:
+@@ -3395,10 +3354,6 @@ error_netdev_register:
error_mdio_register:
netif_napi_del(&priv->napi);
error_hw_init:
@@ -1830,7 +1830,7 @@
free_netdev(ndev);
return ret;
-@@ -3418,10 +3373,10 @@ int stmmac_dvr_remove(struct device *dev
+@@ -3424,10 +3379,10 @@ int stmmac_dvr_remove(struct device *dev
stmmac_set_mac(priv->ioaddr, false);
netif_carrier_off(ndev);
unregister_netdev(ndev);
@@ -1845,7 +1845,7 @@
if (priv->hw->pcs != STMMAC_PCS_RGMII &&
priv->hw->pcs != STMMAC_PCS_TBI &&
priv->hw->pcs != STMMAC_PCS_RTBI)
-@@ -3470,14 +3425,14 @@ int stmmac_suspend(struct device *dev)
+@@ -3476,14 +3431,14 @@ int stmmac_suspend(struct device *dev)
stmmac_set_mac(priv->ioaddr, false);
pinctrl_pm_select_sleep_state(priv->device);
/* Disable clock in case of PWM is off */
@@ -1864,7 +1864,7 @@
return 0;
}
EXPORT_SYMBOL_GPL(stmmac_suspend);
-@@ -3510,9 +3465,9 @@ int stmmac_resume(struct device *dev)
+@@ -3516,9 +3471,9 @@ int stmmac_resume(struct device *dev)
priv->irq_wake = 0;
} else {
pinctrl_pm_select_default_state(priv->device);