Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Firo Yang
Crystal clear. Many thanks. // Firo

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Benjamin Poirier
On 2019/07/17 17:56, Firo Yang wrote: > I don't think this change could fix this problem because if SMP, > dev_watchdog() could run on a different CPU. hmm, SMP is clearly part of the picture here. The change I proposed revolves around the synchronization offered by dev->tx_global_lock: we have

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Firo Yang
I don't think this change could fix this problem because if SMP, dev_watchdog() could run on a different CPU. Thanks, Firo

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Benjamin Poirier
On 2019/07/17 13:23, Firo Yang wrote: > I think there is a problem if dev_watchdog() is triggered before > netif_carrier_off(). dev_watchdog() might call ->ndo_tx_timeout(), i.e. > be_tx_timeout(), if txq timeout happens. Thus be_tx_timeout() could still be > able to access the memory which is

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-16 Thread Firo Yang
nks, Firo From: Benjamin Poirier Sent: Tuesday, July 16, 2019 4:16 PM To: David Miller Cc: Ajit Khaparde; Sathya Perla; Somnath Kotur; Sriharsha Basavapatna; Saeed Mahameed; Firo Yang; netdev@vger.kernel.org Subject: [PATCH net] be2net: Signal that the dev

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-16 Thread David Miller
From: Benjamin Poirier Date: Tue, 16 Jul 2019 17:16:55 +0900 > While changing the number of interrupt channels, be2net stops adapter > operation (including netif_tx_disable()) but it doesn't signal that it > cannot transmit. This may lead dev_watchdog() to falsely trigger during > that time. > >

[PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-16 Thread Benjamin Poirier
While changing the number of interrupt channels, be2net stops adapter operation (including netif_tx_disable()) but it doesn't signal that it cannot transmit. This may lead dev_watchdog() to falsely trigger during that time. Add the missing call to netif_carrier_off(), following the pattern used in