From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 579F3C3A59E for ; Mon, 26 Aug 2019 05:15:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33E4C2080C for ; Mon, 26 Aug 2019 05:15:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729213AbfHZFPJ (ORCPT ); Mon, 26 Aug 2019 01:15:09 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:58508 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbfHZFPJ (ORCPT ); Mon, 26 Aug 2019 01:15:09 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 7671714FE1C24; Sun, 25 Aug 2019 22:15:08 -0700 (PDT) Date: Sun, 25 Aug 2019 22:15:07 -0700 (PDT) Message-Id: <20190825.221507.1465677703637201643.davem@davemloft.net> To: michael.chan@broadcom.com Cc: netdev@vger.kernel.org, vasundhara-v.volam@broadcom.com, jiri@mellanox.com, ray.jui@broadcom.com Subject: Re: [PATCH net-next 01/14] bnxt_en: Suppress all error messages in hwrm_do_send_msg() in silent mode. From: David Miller In-Reply-To: <1566791705-20473-2-git-send-email-michael.chan@broadcom.com> References: <1566791705-20473-1-git-send-email-michael.chan@broadcom.com> <1566791705-20473-2-git-send-email-michael.chan@broadcom.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 25 Aug 2019 22:15:08 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Michael Chan Date: Sun, 25 Aug 2019 23:54:52 -0400 > If the silent parameter is set, suppress all messages when there is > no response from firmware. When polling for firmware to come out of > reset, no response may be normal and we want to suppress the error > messages. Also, don't poll for the firmware DMA response if Bus Master > is disabled. This is in preparation for error recovery when firmware > may be in error or reset state or Bus Master is disabled. > > Signed-off-by: Michael Chan The function bnxt_hwrm_do_send_msg() seems to be an interesting mix of return values, what are the semantics? It seems to use 0 for success, some error codes, and -1. Does -1 have special meaning? Just curious, and really this unorthodox return value semantic should be documented into a comment above the function.