aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Tripathi <stripathi@apm.com>2015-06-23 05:17:15 -0400
committerDavid S. Miller <davem@davemloft.net>2015-06-23 10:19:19 -0400
commit2c7be0ac566e4706f45c4cc82b2d767f0e9f7add (patch)
treeae57dc75fbb14d83dd25e2897249dfd43debfc3b
parent0738c54d63249bd4a51aa2e899877c8316f19957 (diff)
drivers: net: xgene: Implement the backward compatibility with the old and new firmware w.r.t Tx completion IRQ interrupt.
This patch implements the backward compatibility with the old firmware where the Tx completion IRQ interrupt was absent whereas incase of new firmware the Tx completion IRQ interrupt is present. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: Suman Tripathi <stripathi@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 17f0df508f72..0d6ac7aad268 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -1024,11 +1024,13 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)
1024 if (pdata->phy_mode != PHY_INTERFACE_MODE_RGMII) { 1024 if (pdata->phy_mode != PHY_INTERFACE_MODE_RGMII) {
1025 ret = platform_get_irq(pdev, 1); 1025 ret = platform_get_irq(pdev, 1);
1026 if (ret <= 0) { 1026 if (ret <= 0) {
1027 dev_err(dev, "Unable to get ENET Tx completion IRQ\n"); 1027 pdata->cq_cnt = 0;
1028 ret = ret ? : -ENXIO; 1028 dev_info(dev, "Unable to get Tx completion IRQ,"
1029 return ret; 1029 "using Rx IRQ instead\n");
1030 } else {
1031 pdata->cq_cnt = XGENE_MAX_TXC_RINGS;
1032 pdata->txc_irq = ret;
1030 } 1033 }
1031 pdata->txc_irq = ret;
1032 } 1034 }
1033 1035
1034 pdata->clk = devm_clk_get(&pdev->dev, NULL); 1036 pdata->clk = devm_clk_get(&pdev->dev, NULL);
@@ -1105,13 +1107,11 @@ static void xgene_enet_setup_ops(struct xgene_enet_pdata *pdata)
1105 pdata->mac_ops = &xgene_sgmac_ops; 1107 pdata->mac_ops = &xgene_sgmac_ops;
1106 pdata->port_ops = &xgene_sgport_ops; 1108 pdata->port_ops = &xgene_sgport_ops;
1107 pdata->rm = RM1; 1109 pdata->rm = RM1;
1108 pdata->cq_cnt = XGENE_MAX_TXC_RINGS;
1109 break; 1110 break;
1110 default: 1111 default:
1111 pdata->mac_ops = &xgene_xgmac_ops; 1112 pdata->mac_ops = &xgene_xgmac_ops;
1112 pdata->port_ops = &xgene_xgport_ops; 1113 pdata->port_ops = &xgene_xgport_ops;
1113 pdata->rm = RM0; 1114 pdata->rm = RM0;
1114 pdata->cq_cnt = XGENE_MAX_TXC_RINGS;
1115 break; 1115 break;
1116 } 1116 }
1117 1117