summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@freescale.com>2014-09-17 05:18:51 +0800
committerDavid S. Miller <davem@davemloft.net>2014-09-19 15:36:49 -0400
commitb7bd75cf53e8b65f48b21eec8653326897c29a96 (patch)
tree3b2b54acbea755f28c6b66d507259ef2663c73ed /drivers/net/ethernet/freescale
parent709f6c58d4dcd2b300c914ec17b297acae4cb998 (diff)
net: fec: refine error handle of parser queue number from DT
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 6e93336d1d20..9772af6ff5c2 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2890,23 +2890,23 @@ 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",
- *num_tx);
+ 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",
- *num_rx);
+ 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)