From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 10/10] bnxt_en: Add hwrm_send_message_silent().
Date: Thu, 25 Feb 2016 03:19:34 -0500 [thread overview]
Message-ID: <1456388374-1440-11-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1456388374-1440-1-git-send-email-michael.chan@broadcom.com>
This is used to send NVM_FIND_DIR_ENTRY messages which can return error
if the entry is not found. This is normal and the error message will
cause unnecessary alarm, so silence it.
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 +++++++++++
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 8476733..77e8c2b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2709,6 +2709,17 @@ int hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout)
return rc;
}
+int hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 msg_len,
+ int timeout)
+{
+ int rc;
+
+ mutex_lock(&bp->hwrm_cmd_lock);
+ rc = bnxt_hwrm_do_send_msg(bp, msg, msg_len, timeout, true);
+ mutex_unlock(&bp->hwrm_cmd_lock);
+ return rc;
+}
+
static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp)
{
struct hwrm_func_drv_rgtr_input req = {0};
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 3936e96..9aa38f5 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -1095,6 +1095,7 @@ void bnxt_set_ring_params(struct bnxt *);
void bnxt_hwrm_cmd_hdr_init(struct bnxt *, void *, u16, u16, u16);
int _hwrm_send_message(struct bnxt *, void *, u32, int);
int hwrm_send_message(struct bnxt *, void *, u32, int);
+int hwrm_send_message_silent(struct bnxt *, void *, u32, int);
int bnxt_hwrm_set_coal(struct bnxt *);
int bnxt_hwrm_func_qcaps(struct bnxt *);
int bnxt_hwrm_set_pause(struct bnxt *);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index bfda92e..84ea26d 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -1141,7 +1141,7 @@ static int bnxt_find_nvram_item(struct net_device *dev, u16 type, u16 ordinal,
req.dir_ordinal = cpu_to_le16(ordinal);
req.dir_ext = cpu_to_le16(ext);
req.opt_ordinal = NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_EQ;
- rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+ rc = hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
if (rc == 0) {
if (index)
*index = le16_to_cpu(output->dir_idx);
--
1.8.3.1
prev parent reply other threads:[~2016-02-25 8:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 8:19 [PATCH net-next 00/10] bnxt_en: updates for net-next Michael Chan
2016-02-25 8:19 ` [PATCH net-next 01/10] bnxt_en: Improve bnxt_vf_update_mac() Michael Chan
2016-02-25 16:31 ` David Miller
2016-02-25 16:57 ` Michael Chan
2016-02-25 17:09 ` David Miller
2016-02-25 17:15 ` Michael Chan
2016-02-25 19:02 ` David Miller
2016-02-25 8:19 ` [PATCH net-next 02/10] bnxt_en: Send PF driver unload notification to all VFs Michael Chan
2016-02-25 8:19 ` [PATCH net-next 03/10] bnxt_en: Store irq coalescing timer values in micro seconds Michael Chan
2016-02-25 8:19 ` [PATCH net-next 04/10] bnxt_en: Refactor bnxt_hwrm_set_coal() Michael Chan
2016-02-25 16:32 ` David Miller
2016-02-25 8:19 ` [PATCH net-next 05/10] bnxt_en: Add coalescing support for tx rings Michael Chan
2016-02-25 8:19 ` [PATCH net-next 06/10] bnxt_en: Use firmware provided message timeout value Michael Chan
2016-02-25 8:19 ` [PATCH net-next 07/10] bnxt_en: Fix dmesg log firmware error messages Michael Chan
2016-02-25 8:19 ` [PATCH net-next 08/10] bnxt_en: Add installed-package firmware version reporting via Ethtool GDRVINFO Michael Chan
2016-02-25 8:19 ` [PATCH net-next 09/10] bnxt_en: Refactor _hwrm_send_message() Michael Chan
2016-02-25 8:19 ` Michael Chan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456388374-1440-11-git-send-email-michael.chan@broadcom.com \
--to=michael.chan@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).