Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	sony.chacko@qlogic.com, Dept_NX_Linux_NIC_Driver@qlogic.com
Subject: Re: [PATCH net-next 1/6] qlcnic: fix unsupported CDRP command error message.
Date: Sat, 16 Feb 2013 21:38:56 -0800	[thread overview]
Message-ID: <1361079536.2001.5.camel@joe-AO722> (raw)
In-Reply-To: <1361076831-31746-2-git-send-email-jitendra.kalsaria@qlogic.com>

On Sat, 2013-02-16 at 23:53 -0500, Jitendra Kalsaria wrote:
> From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> 
> Add debug messages for FW CDRP command failure.

These aren't debug messages but are more detailed.

> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
[]
> @@ -147,8 +147,36 @@ int qlcnic_82xx_issue_cmd(struct qlcnic_adapter *adapter,
>  		cmd->rsp.arg[0] = QLCNIC_RCODE_TIMEOUT;
>  	} else if (rsp == QLCNIC_CDRP_RSP_FAIL) {
>  		cmd->rsp.arg[0] = QLCRD32(adapter, QLCNIC_CDRP_ARG(1));
> -		dev_err(&pdev->dev, "failed card response code:0x%x\n",
> -			cmd->rsp.arg[0]);
> +		switch (cmd->rsp.arg[0]) {
> +		case QLCNIC_RCODE_INVALID_ARGS:
> +			dev_err(&pdev->dev, "CDRP invalid args 0x%x\n",
> +				cmd->rsp.arg[0]);
> +			break;

Not sure you care about object size much, but
it's much smaller object code to do:

	const char *fmt;
	switch (cmd->rsp.arg[0]);
	case FOO:
		fmt = "...";
		break;
	etc...
	}

	dev_err(&pdev->dev, fmt, cmd->rsp.arg[0]);

Also, the #defines are decimal, I don't know why you
print them out as hex or if you need to print them
at all really.

  reply	other threads:[~2013-02-17  5:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-17  4:53 [PATCH net-next 0/6] qlcnic: bug fixes and feature updates Jitendra Kalsaria
2013-02-17  4:53 ` [PATCH net-next 1/6] qlcnic: fix unsupported CDRP command error message Jitendra Kalsaria
2013-02-17  5:38   ` Joe Perches [this message]
2013-02-17  9:40     ` Jitendra Kalsaria
2013-02-17  4:53 ` [PATCH net-next 2/6] qlcnic: fix mailbox interrupt Jitendra Kalsaria
2013-02-17  4:53 ` [PATCH net-next 3/6] qlcnic: refactor Legacy interrupt handling for 83xx Jitendra Kalsaria
2013-02-17  4:53 ` [PATCH net-next 4/6] qlcnic: fix estimation of receive MSS in case of LRO for 83xx adapter Jitendra Kalsaria
2013-02-17  4:53 ` [PATCH net-next 5/6] qlcnic: fix ping resumption to a VM after a live migration Jitendra Kalsaria
2013-02-17  4:53 ` [PATCH net-next 6/6] qlcnic: Bump up the version to 5.1.34 Jitendra Kalsaria

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=1361079536.2001.5.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=jitendra.kalsaria@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --cc=sony.chacko@qlogic.com \
    /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