From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zumeng Chen Subject: Re: [v2 PATCH 1/1] tg3: fix meaningless hw_stats reading after tg3_halt memset 0 hw_stats Date: Wed, 2 May 2018 18:27:54 +0800 Message-ID: <5af186f8-9718-c295-4e34-e84dd78ea157@gmail.com> References: <20180502004234.230662-1-zumeng.chen@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Netdev , open list , Siva Reddy Kallam , "prashant.sreedharan@broadcom.com" , David Miller , Zumeng Chen To: Michael Chan Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:39064 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbeEBK2J (ORCPT ); Wed, 2 May 2018 06:28:09 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 2018年05月02日 13:12, Michael Chan wrote: > On Tue, May 1, 2018 at 5:42 PM, Zumeng Chen wrote: > >> diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h >> index 3b5e98e..c61d83c 100644 >> --- a/drivers/net/ethernet/broadcom/tg3.h >> +++ b/drivers/net/ethernet/broadcom/tg3.h >> @@ -3102,6 +3102,7 @@ enum TG3_FLAGS { >> TG3_FLAG_ROBOSWITCH, >> TG3_FLAG_ONE_DMA_AT_ONCE, >> TG3_FLAG_RGMII_MODE, >> + TG3_FLAG_HALT, > I think you should be able to use the existing INIT_COMPLETE flag No, it will bring the uncertain factors into the existed complicate logic of INIT_COMPLETE. And I think it's very simple logic here to fix the meaningless hw_stats reading and the problem of commit f5992b72. I even suspect if you have read INIT_COMPLETE related codes carefully. Cheers, Zumeng > and > not have to add a new flag. > >> /* Add new flags before this comment and TG3_FLAG_NUMBER_OF_FLAGS */ >> TG3_FLAG_NUMBER_OF_FLAGS, /* Last entry in enum TG3_FLAGS */ >> -- >> 2.9.3 >>