Thread (27 messages) 27 messages, 3 authors, 2019-08-31

Re: [PATCH net-next 01/14] bnxt_en: Suppress all error messages in hwrm_do_send_msg() in silent mode.

From: Michael Chan <michael.chan@broadcom.com>
Date: 2019-08-26 06:17:17

On Sun, Aug 25, 2019 at 10:15 PM David Miller [off-list ref] wrote:
From: Michael Chan <michael.chan@broadcom.com>
Date: Sun, 25 Aug 2019 23:54:52 -0400
quoted
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 <michael.chan@broadcom.com>
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.
Sadly, it was coded initially to return firmware defined error codes.
But in some cases, the return code gets propagated all the way back to
userspace.  The long term goal is to convert to standard error codes
and so we try to use standard error codes whenever we add new patches
related to this function.  I will see what I can do to make this
better in v2.  Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help