diff mbox

[-next,3/4] net: w5100: increase TX timeout period

Message ID 1462948227-21276-4-git-send-email-akinobu.mita@gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Akinobu Mita May 11, 2016, 6:30 a.m. UTC
This increases TX timeout period from one second to 5 seconds which is
default value defined in net/sched/sch_generic.c.

The one second timeout is too short for W5100 with SPI interface mode
which doesn't support burst READ/WRITE processing in the SPI transfer.
If the packet is transmitted while RX packets are being received at a
very high rate, the TX transmittion work in the workqueue is delayed
and the watchdog timer is expired.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Mike Sinkovsky <msink@permonline.ru>
Cc: David S. Miller <davem@davemloft.net>
---
 drivers/net/ethernet/wiznet/w5100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller May 11, 2016, 11:49 p.m. UTC | #1
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Wed, 11 May 2016 15:30:26 +0900

> This increases TX timeout period from one second to 5 seconds which is
> default value defined in net/sched/sch_generic.c.
> 
> The one second timeout is too short for W5100 with SPI interface mode
> which doesn't support burst READ/WRITE processing in the SPI transfer.
> If the packet is transmitted while RX packets are being received at a
> very high rate, the TX transmittion work in the workqueue is delayed
> and the watchdog timer is expired.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

It would be just cleaner to just remove the assignment completely, and
let said net/sched/sch_generic.c code set the default for you.
Akinobu Mita May 12, 2016, 10:50 a.m. UTC | #2
2016-05-12 8:49 GMT+09:00 David Miller <davem@davemloft.net>:
> From: Akinobu Mita <akinobu.mita@gmail.com>
> Date: Wed, 11 May 2016 15:30:26 +0900
>
>> This increases TX timeout period from one second to 5 seconds which is
>> default value defined in net/sched/sch_generic.c.
>>
>> The one second timeout is too short for W5100 with SPI interface mode
>> which doesn't support burst READ/WRITE processing in the SPI transfer.
>> If the packet is transmitted while RX packets are being received at a
>> very high rate, the TX transmittion work in the workqueue is delayed
>> and the watchdog timer is expired.
>>
>> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
>
> It would be just cleaner to just remove the assignment completely, and
> let said net/sched/sch_generic.c code set the default for you.

Sounds good.  I'll resubmit the series with that change.
diff mbox

Patch

diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index c80438c..f649f1c 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -1142,7 +1142,7 @@  int w5100_probe(struct device *dev, const struct w5100_ops *ops,
 
 	ndev->netdev_ops = &w5100_netdev_ops;
 	ndev->ethtool_ops = &w5100_ethtool_ops;
-	ndev->watchdog_timeo = HZ;
+	ndev->watchdog_timeo = 5 * HZ;
 	netif_napi_add(ndev, &priv->napi, w5100_napi_poll, 16);
 
 	/* This chip doesn't support VLAN packets with normal MTU,