From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753752AbcHQFmd (ORCPT ); Wed, 17 Aug 2016 01:42:33 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:33480 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411AbcHQFmb (ORCPT ); Wed, 17 Aug 2016 01:42:31 -0400 Subject: Re: [PATCH v3 2/5] net: ethernet: ti: davinci_cpdma: fix locking while ctrl_stop To: Ivan Khoronzhuk , , , References: <1471303549-4134-1-git-send-email-ivan.khoronzhuk@linaro.org> <1471303549-4134-3-git-send-email-ivan.khoronzhuk@linaro.org> CC: , , From: Mugunthan V N Message-ID: <1ea7e2ef-2677-91e9-63f5-c12b58fa3287@ti.com> Date: Wed, 17 Aug 2016 11:12:25 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1471303549-4134-3-git-send-email-ivan.khoronzhuk@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 16 August 2016 04:55 AM, Ivan Khoronzhuk wrote: > The interrupts shouldn't be disabled while receiving skb, but while > ctrl_stop, the channels are stopped and all remaining packets are > handled with netif_receive_skb(): > > lock_irq_save > cpdma_ctlr_stop > cpdma_chan_top > __cpdma_chan_free > cpsw_rx_handler > netif_receive_skb > > So, split locking while ctrl stop thus interrupts are still > enabled while skbs handling. It can cause WARN_ONCE in rare > cases when ctrl is stopping while not all packets were handled > with NAPIs. > > Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Regards Mugunthan V N