netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] net: r6040: Misc updates
@ 2016-07-04 21:36 Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 1/9] net: r6040: Utilize phy_print_status Florian Fainelli
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Hi David,

Here are some various updates for the r6040 driver, mostly to make it more
modern and catch up with the latest API improvements.

Thanks!

Florian Fainelli (9):
  net: r6040: Utilize phy_print_status
  net: r6040: Increase statistics upon transmit completion
  net: r6040: Utilize skb_put_padto()
  net: r6040: Reclaim transmitted buffers in NAPI
  net: r6040: Check for skb->xmit_more
  net: r6040: Utilize __napi_schedule_irqoff
  net: r6040: Utilize napi_complete_done()
  net: r6040: Update my email
  net: r6040: Bump version and date

 MAINTAINERS                      |  2 +-
 drivers/net/ethernet/rdc/r6040.c | 59 ++++++++++++++++++----------------------
 2 files changed, 28 insertions(+), 33 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH net-next 1/9] net: r6040: Utilize phy_print_status
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 2/9] net: r6040: Increase statistics upon transmit completion Florian Fainelli
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Instead of open coding our own version utilize the library provided
function.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 7a7a395d0512..12fc7cd67fa7 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -1001,14 +1001,8 @@ static void r6040_adjust_link(struct net_device *dev)
 		lp->old_duplex = phydev->duplex;
 	}
 
-	if (status_changed) {
-		pr_info("%s: link %s", dev->name, phydev->link ?
-			"UP" : "DOWN");
-		if (phydev->link)
-			pr_cont(" - %d/%s", phydev->speed,
-			DUPLEX_FULL == phydev->duplex ? "full" : "half");
-		pr_cont("\n");
-	}
+	if (status_changed)
+		phy_print_status(phydev);
 }
 
 static int r6040_mii_probe(struct net_device *dev)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 2/9] net: r6040: Increase statistics upon transmit completion
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 1/9] net: r6040: Utilize phy_print_status Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 3/9] net: r6040: Utilize skb_put_padto() Florian Fainelli
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

r6040_xmit() is increasing transmit statistics during transmission while
this may still fail, do this in r6040_tx() where we complete transmitted
buffers instead.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 12fc7cd67fa7..75776eee36f9 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -614,6 +614,11 @@ static void r6040_tx(struct net_device *dev)
 		if (descptr->status & DSC_OWNER_MAC)
 			break; /* Not complete */
 		skb_ptr = descptr->skb_ptr;
+
+		/* Statistic Counter */
+		dev->stats.tx_packets++;
+		dev->stats.tx_bytes += skb_ptr->len;
+
 		pci_unmap_single(priv->pdev, le32_to_cpu(descptr->buf),
 			skb_ptr->len, PCI_DMA_TODEVICE);
 		/* Free buffer */
@@ -821,9 +826,6 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
 		return NETDEV_TX_BUSY;
 	}
 
-	/* Statistic Counter */
-	dev->stats.tx_packets++;
-	dev->stats.tx_bytes += skb->len;
 	/* Set TX descriptor & Transmit it */
 	lp->tx_free_desc--;
 	descptr = lp->tx_insert_ptr;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 3/9] net: r6040: Utilize skb_put_padto()
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 1/9] net: r6040: Utilize phy_print_status Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 2/9] net: r6040: Increase statistics upon transmit completion Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-05 22:44   ` Francois Romieu
  2016-07-04 21:36 ` [PATCH net-next 4/9] net: r6040: Reclaim transmitted buffers in NAPI Florian Fainelli
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Pad the SKB to the minimum length of ETH_ZLEN by using skb_put_padto()
and take this operation out of the critical section since there is no
need to check any HW resources before doing that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 75776eee36f9..46ed093348da 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -815,6 +815,9 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
 	void __iomem *ioaddr = lp->base;
 	unsigned long flags;
 
+	if (skb_put_padto(skb, ETH_ZLEN) < 0)
+		return NETDEV_TX_OK;
+
 	/* Critical Section */
 	spin_lock_irqsave(&lp->lock, flags);
 
@@ -829,11 +832,7 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
 	/* Set TX descriptor & Transmit it */
 	lp->tx_free_desc--;
 	descptr = lp->tx_insert_ptr;
-	if (skb->len < ETH_ZLEN)
-		descptr->len = ETH_ZLEN;
-	else
-		descptr->len = skb->len;
-
+	descptr->len = skb->len;
 	descptr->skb_ptr = skb;
 	descptr->buf = cpu_to_le32(pci_map_single(lp->pdev,
 		skb->data, skb->len, PCI_DMA_TODEVICE));
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 4/9] net: r6040: Reclaim transmitted buffers in NAPI
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
                   ` (2 preceding siblings ...)
  2016-07-04 21:36 ` [PATCH net-next 3/9] net: r6040: Utilize skb_put_padto() Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 5/9] net: r6040: Check for skb->xmit_more Florian Fainelli
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Instead of taking one interrupt per packet transmitted, re-use the same
NAPI context to free transmitted buffers. Since we are no longer in hard
IRQ context replace dev_kfree_skb_irq() by dev_kfree_skb().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 46ed093348da..4bf78f18a937 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -622,7 +622,7 @@ static void r6040_tx(struct net_device *dev)
 		pci_unmap_single(priv->pdev, le32_to_cpu(descptr->buf),
 			skb_ptr->len, PCI_DMA_TODEVICE);
 		/* Free buffer */
-		dev_kfree_skb_irq(skb_ptr);
+		dev_kfree_skb(skb_ptr);
 		descptr->skb_ptr = NULL;
 		/* To next descriptor */
 		descptr = descptr->vndescp;
@@ -643,12 +643,15 @@ static int r6040_poll(struct napi_struct *napi, int budget)
 	void __iomem *ioaddr = priv->base;
 	int work_done;
 
+	r6040_tx(dev);
+
 	work_done = r6040_rx(dev, budget);
 
 	if (work_done < budget) {
 		napi_complete(napi);
-		/* Enable RX interrupt */
-		iowrite16(ioread16(ioaddr + MIER) | RX_INTS, ioaddr + MIER);
+		/* Enable RX/TX interrupt */
+		iowrite16(ioread16(ioaddr + MIER) | RX_INTS | TX_INTS,
+			  ioaddr + MIER);
 	}
 	return work_done;
 }
@@ -675,7 +678,7 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
 	}
 
 	/* RX interrupt request */
-	if (status & RX_INTS) {
+	if (status & (RX_INTS | TX_INTS)) {
 		if (status & RX_NO_DESC) {
 			/* RX descriptor unavailable */
 			dev->stats.rx_dropped++;
@@ -686,15 +689,11 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
 
 		if (likely(napi_schedule_prep(&lp->napi))) {
 			/* Mask off RX interrupt */
-			misr &= ~RX_INTS;
+			misr &= ~(RX_INTS | TX_INTS);
 			__napi_schedule(&lp->napi);
 		}
 	}
 
-	/* TX interrupt request */
-	if (status & TX_INTS)
-		r6040_tx(dev);
-
 	/* Restore RDC MAC interrupt */
 	iowrite16(misr, ioaddr + MIER);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 5/9] net: r6040: Check for skb->xmit_more
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
                   ` (3 preceding siblings ...)
  2016-07-04 21:36 ` [PATCH net-next 4/9] net: r6040: Reclaim transmitted buffers in NAPI Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 6/9] net: r6040: Utilize __napi_schedule_irqoff Florian Fainelli
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Kick the transmission only if this is the last SKB to transmit or the
queue is not already stopped.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 4bf78f18a937..96b2d639c3c1 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -840,7 +840,8 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
 	skb_tx_timestamp(skb);
 
 	/* Trigger the MAC to check the TX descriptor */
-	iowrite16(TM2TX, ioaddr + MTPR);
+	if (!skb->xmit_more || netif_queue_stopped(dev))
+		iowrite16(TM2TX, ioaddr + MTPR);
 	lp->tx_insert_ptr = descptr->vndescp;
 
 	/* If no tx resource, stop */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 6/9] net: r6040: Utilize __napi_schedule_irqoff
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
                   ` (4 preceding siblings ...)
  2016-07-04 21:36 ` [PATCH net-next 5/9] net: r6040: Check for skb->xmit_more Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 7/9] net: r6040: Utilize napi_complete_done() Florian Fainelli
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

We are already in hard IRQ context, so we can use
__napi_schedule_irqoff() to save a few operations.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 96b2d639c3c1..13ff80088268 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -690,7 +690,7 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
 		if (likely(napi_schedule_prep(&lp->napi))) {
 			/* Mask off RX interrupt */
 			misr &= ~(RX_INTS | TX_INTS);
-			__napi_schedule(&lp->napi);
+			__napi_schedule_irqoff(&lp->napi);
 		}
 	}
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 7/9] net: r6040: Utilize napi_complete_done()
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
                   ` (5 preceding siblings ...)
  2016-07-04 21:36 ` [PATCH net-next 6/9] net: r6040: Utilize __napi_schedule_irqoff Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 8/9] net: r6040: Update my email Florian Fainelli
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

We maintain how much work we did in NAPI context, so provide that with
napi_complete_done().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 13ff80088268..c0256b865ff9 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -648,7 +648,7 @@ static int r6040_poll(struct napi_struct *napi, int budget)
 	work_done = r6040_rx(dev, budget);
 
 	if (work_done < budget) {
-		napi_complete(napi);
+		napi_complete_done(napi, work_done);
 		/* Enable RX/TX interrupt */
 		iowrite16(ioread16(ioaddr + MIER) | RX_INTS | TX_INTS,
 			  ioaddr + MIER);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 8/9] net: r6040: Update my email
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
                   ` (6 preceding siblings ...)
  2016-07-04 21:36 ` [PATCH net-next 7/9] net: r6040: Utilize napi_complete_done() Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-04 21:36 ` [PATCH net-next 9/9] net: r6040: Bump version and date Florian Fainelli
  2016-07-05  7:12 ` [PATCH net-next 0/9] net: r6040: Misc updates David Miller
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Update my email address in the driver and MAINTAINERS file.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 MAINTAINERS                      | 2 +-
 drivers/net/ethernet/rdc/r6040.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 772c9ffa2272..bf889d5e45a0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9558,7 +9558,7 @@ M:	Florian Fainelli <florian@openwrt.org>
 S:	Maintained
 
 RDC R6040 FAST ETHERNET DRIVER
-M:	Florian Fainelli <florian@openwrt.org>
+M:	Florian Fainelli <f.fainelli@gmail.com>
 L:	netdev@vger.kernel.org
 S:	Maintained
 F:	drivers/net/ethernet/rdc/r6040.c
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index c0256b865ff9..c8985cfbe2da 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -4,7 +4,7 @@
  * Copyright (C) 2004 Sten Wang <sten.wang@rdc.com.tw>
  * Copyright (C) 2007
  *	Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
- * Copyright (C) 2007-2012 Florian Fainelli <florian@openwrt.org>
+ * Copyright (C) 2007-2012 Florian Fainelli <f.fainelli@gmail.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -162,7 +162,7 @@
 
 MODULE_AUTHOR("Sten Wang <sten.wang@rdc.com.tw>,"
 	"Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>,"
-	"Florian Fainelli <florian@openwrt.org>");
+	"Florian Fainelli <f.fainelli@gmail.com>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("RDC R6040 NAPI PCI FastEthernet driver");
 MODULE_VERSION(DRV_VERSION " " DRV_RELDATE);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 9/9] net: r6040: Bump version and date
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
                   ` (7 preceding siblings ...)
  2016-07-04 21:36 ` [PATCH net-next 8/9] net: r6040: Update my email Florian Fainelli
@ 2016-07-04 21:36 ` Florian Fainelli
  2016-07-05  7:12 ` [PATCH net-next 0/9] net: r6040: Misc updates David Miller
  9 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-07-04 21:36 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Bump version to 0.28 and date to 4th of July 2016.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/rdc/r6040.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index c8985cfbe2da..cb29ee24cf1b 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -48,8 +48,8 @@
 #include <asm/processor.h>
 
 #define DRV_NAME	"r6040"
-#define DRV_VERSION	"0.28"
-#define DRV_RELDATE	"07Oct2011"
+#define DRV_VERSION	"0.29"
+#define DRV_RELDATE	"04Jul2016"
 
 /* Time in jiffies before concluding the transmitter is hung. */
 #define TX_TIMEOUT	(6000 * HZ / 1000)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 0/9] net: r6040: Misc updates
  2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
                   ` (8 preceding siblings ...)
  2016-07-04 21:36 ` [PATCH net-next 9/9] net: r6040: Bump version and date Florian Fainelli
@ 2016-07-05  7:12 ` David Miller
  9 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2016-07-05  7:12 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon,  4 Jul 2016 14:36:00 -0700

> Here are some various updates for the r6040 driver, mostly to make
> it more modern and catch up with the latest API improvements.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 3/9] net: r6040: Utilize skb_put_padto()
  2016-07-04 21:36 ` [PATCH net-next 3/9] net: r6040: Utilize skb_put_padto() Florian Fainelli
@ 2016-07-05 22:44   ` Francois Romieu
  0 siblings, 0 replies; 12+ messages in thread
From: Francois Romieu @ 2016-07-05 22:44 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: netdev, davem

Florian Fainelli <f.fainelli@gmail.com> :
[...]
> diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
> index 75776eee36f9..46ed093348da 100644
> --- a/drivers/net/ethernet/rdc/r6040.c
> +++ b/drivers/net/ethernet/rdc/r6040.c
> @@ -815,6 +815,9 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
>  	void __iomem *ioaddr = lp->base;
>  	unsigned long flags;
>  
> +	if (skb_put_padto(skb, ETH_ZLEN) < 0)
> +		return NETDEV_TX_OK;
> +

Missing dev->stats->tx_dropped++.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-07-05 22:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-04 21:36 [PATCH net-next 0/9] net: r6040: Misc updates Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 1/9] net: r6040: Utilize phy_print_status Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 2/9] net: r6040: Increase statistics upon transmit completion Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 3/9] net: r6040: Utilize skb_put_padto() Florian Fainelli
2016-07-05 22:44   ` Francois Romieu
2016-07-04 21:36 ` [PATCH net-next 4/9] net: r6040: Reclaim transmitted buffers in NAPI Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 5/9] net: r6040: Check for skb->xmit_more Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 6/9] net: r6040: Utilize __napi_schedule_irqoff Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 7/9] net: r6040: Utilize napi_complete_done() Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 8/9] net: r6040: Update my email Florian Fainelli
2016-07-04 21:36 ` [PATCH net-next 9/9] net: r6040: Bump version and date Florian Fainelli
2016-07-05  7:12 ` [PATCH net-next 0/9] net: r6040: Misc updates David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).