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
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(-)
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(-)
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(-)
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(-)
@@ -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 */
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(-)
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(-)
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(-)