Re: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-29 Thread Oliver Neukum
On Wed, 2015-07-29 at 02:06 +, Hayes Wang wrote: Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 8:59 PM [...] static void rtl8152_tx_timeout(struct net_device *netdev) { struct r8152 *tp = netdev_priv(netdev); - int i;

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-29 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Wednesday, July 29, 2015 3:22 PM [...] Now, I think I got the reason for the confusion. You are using cancel_delayed_work(tp-schedule); after you queue a reset. Therefore the order in which the work and the reset will be executed is undefined.

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 8:59 PM [...] static void rtl8152_tx_timeout(struct net_device *netdev) { struct r8152 *tp = netdev_priv(netdev); - int i; netif_warn(tp, tx_err, netdev, Tx timeout\n); -

Re: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Oliver Neukum
On Tue, 2015-07-28 at 20:08 +0800, Hayes Wang wrote: static void rtl8152_tx_timeout(struct net_device *netdev) { struct r8152 *tp = netdev_priv(netdev); - int i; netif_warn(tp, tx_err, netdev, Tx timeout\n); - for (i = 0; i RTL8152_MAX_TX; i++) -

RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 8:14 PM [...] static void rtl8152_tx_timeout(struct net_device *netdev) { struct r8152 *tp = netdev_priv(netdev); - int i; netif_warn(tp, tx_err, netdev, Tx timeout\n); - for (i = 0; i

Re: [PATCH net v2 2/2] r8152: reset device when tx timeout

2015-07-28 Thread Oliver Neukum
On Tue, 2015-07-28 at 12:31 +, Hayes Wang wrote: Oliver Neukum [mailto:oneu...@suse.com] Sent: Tuesday, July 28, 2015 8:14 PM [...] static void rtl8152_tx_timeout(struct net_device *netdev) { struct r8152 *tp = netdev_priv(netdev); - int i;