From: Frank.Li@freescale.com (Frank.Li at freescale.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [Patch net-next 1/4] net: fec: refine error handle of parser queue number from DT
Date: Tue, 16 Sep 2014 01:12:54 +0800 [thread overview]
Message-ID: <1410801177-15872-2-git-send-email-Frank.Li@freescale.com> (raw)
In-Reply-To: <1410801177-15872-1-git-send-email-Frank.Li@freescale.com>
From: Frank Li <Frank.Li@freescale.com>
check tx and rx queue seperately.
fix typo, "Invalidate" and "fail".
change pr_err to pr_warn.
Signed-off-by: Frank Li <Frank.Li@freescale.com>
---
drivers/net/ethernet/freescale/fec_main.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 8f8e55e..f958e91 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2890,22 +2890,22 @@ fec_enet_get_queue_num(struct platform_device *pdev, int *num_tx, int *num_rx)
/* parse the num of tx and rx queues */
err = of_property_read_u32(np, "fsl,num-tx-queues", num_tx);
- err |= of_property_read_u32(np, "fsl,num-rx-queues", num_rx);
- if (err) {
+ if (err)
*num_tx = 1;
+
+ err = of_property_read_u32(np, "fsl,num-rx-queues", num_rx);
+ if (err)
*num_rx = 1;
- return;
- }
if (*num_tx < 1 || *num_tx > FEC_ENET_MAX_TX_QS) {
- dev_err(&pdev->dev, "Invalidate num_tx(=%d), fail back to 1\n",
+ dev_warn(&pdev->dev, "Invalid num_tx(=%d), fall back to 1\n",
*num_tx);
*num_tx = 1;
return;
}
if (*num_rx < 1 || *num_rx > FEC_ENET_MAX_RX_QS) {
- dev_err(&pdev->dev, "Invalidate num_rx(=%d), fail back to 1\n",
+ dev_warn(&pdev->dev, "Invalid num_rx(=%d), fall back to 1\n",
*num_rx);
*num_rx = 1;
return;
@@ -2924,8 +2924,8 @@ fec_probe(struct platform_device *pdev)
const struct of_device_id *of_id;
static int dev_id;
struct device_node *np = pdev->dev.of_node, *phy_node;
- int num_tx_qs = 1;
- int num_rx_qs = 1;
+ int num_tx_qs;
+ int num_rx_qs;
of_id = of_match_device(fec_dt_ids, &pdev->dev);
if (of_id)
--
1.9.1
next prev parent reply other threads:[~2014-09-15 17:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 17:12 [Patch net-next 0/4] net: fec: add interrupt coalescence Frank.Li at freescale.com
2014-09-15 17:12 ` Frank.Li at freescale.com [this message]
2014-09-15 21:32 ` [Patch net-next 1/4] net: fec: refine error handle of parser queue number from DT David Miller
2014-09-15 17:12 ` [Patch net-next 2/4] net: fec: add interrupt coalescence feature support Frank.Li at freescale.com
2014-09-15 21:34 ` David Miller
2014-09-15 17:12 ` [Patch net-next 3/4] net:fec: increase DMA queue number Frank.Li at freescale.com
2014-09-15 17:12 ` [Patch net-next 4/4] net: fec: Workaround for imx6sx enet tx hang when enable three queues Frank.Li at freescale.com
2014-09-15 21:35 ` David Miller
2014-09-16 0:52 ` Shawn Guo
2014-09-16 3:09 ` fugang.duan at freescale.com
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=1410801177-15872-2-git-send-email-Frank.Li@freescale.com \
--to=frank.li@freescale.com \
--cc=linux-arm-kernel@lists.infradead.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).