aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch')
-rw-r--r--target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch21
1 files changed, 10 insertions, 11 deletions
diff --git a/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch
index 094496a16d..d809e02608 100644
--- a/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch
+++ b/target/linux/lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch
@@ -625,7 +625,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return 0;
}
-@@ -457,16 +651,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -457,15 +651,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
int queue = skb_get_queue_mapping(skb);
struct netdev_queue *txq = netdev_get_tx_queue(dev, queue);
struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -641,13 +641,12 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
- if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) {
-- dev_kfree_skb_any(skb);
+ if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) ||
+ priv->txch.skb[priv->txch.dma.desc]) {
netdev_err(dev, "tx ring full\n");
netif_tx_stop_queue(txq);
return NETDEV_TX_BUSY;
-@@ -474,7 +668,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -473,7 +668,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
/* dma needs to start on a 16 byte aligned address */
byte_offset = CPHYSADDR(skb->data) % 16;
@@ -656,7 +655,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_trans_update(dev);
-@@ -484,11 +678,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -483,11 +678,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
wmb();
desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP |
LTQ_DMA_TX_OFFSET(byte_offset) | (len & LTQ_DMA_SIZE_MASK);
@@ -671,7 +670,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_tx_stop_queue(txq);
return NETDEV_TX_OK;
-@@ -499,11 +693,14 @@ ltq_etop_change_mtu(struct net_device *d
+@@ -498,11 +693,14 @@ ltq_etop_change_mtu(struct net_device *d
{
struct ltq_etop_priv *priv = netdev_priv(dev);
unsigned long flags;
@@ -687,7 +686,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
-@@ -563,6 +760,9 @@ ltq_etop_init(struct net_device *dev)
+@@ -562,6 +760,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
ltq_etop_change_mtu(dev, 1500);
@@ -697,7 +696,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
-@@ -580,9 +780,10 @@ ltq_etop_init(struct net_device *dev)
+@@ -579,9 +780,10 @@ ltq_etop_init(struct net_device *dev)
dev->addr_assign_type = NET_ADDR_RANDOM;
ltq_etop_set_multicast_list(dev);
@@ -711,7 +710,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return 0;
err_netdev:
-@@ -602,6 +803,9 @@ ltq_etop_tx_timeout(struct net_device *d
+@@ -601,6 +803,9 @@ ltq_etop_tx_timeout(struct net_device *d
err = ltq_etop_hw_init(dev);
if (err)
goto err_hw;
@@ -721,7 +720,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_trans_update(dev);
netif_wake_queue(dev);
return;
-@@ -625,14 +829,19 @@ static const struct net_device_ops ltq_e
+@@ -624,14 +829,19 @@ static const struct net_device_ops ltq_e
.ndo_tx_timeout = ltq_etop_tx_timeout,
};
@@ -745,7 +744,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -658,31 +867,62 @@ ltq_etop_probe(struct platform_device *p
+@@ -657,31 +867,62 @@ ltq_etop_probe(struct platform_device *p
goto err_out;
}
@@ -823,7 +822,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
err = register_netdev(dev);
if (err)
-@@ -711,31 +951,22 @@ ltq_etop_remove(struct platform_device *
+@@ -710,31 +951,22 @@ ltq_etop_remove(struct platform_device *
return 0;
}