[source] lantiq: ltq-atm/ltq-ptm: fix showtime handling on driver load
LEDE Commits
lede-commits at lists.infradead.org
Mon Aug 7 01:50:29 PDT 2017
mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/2d6c7c2526b6cc522975e27c26cd1d42ebb7bcd1
commit 2d6c7c2526b6cc522975e27c26cd1d42ebb7bcd1
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Thu Jun 29 06:54:00 2017 +0200
lantiq: ltq-atm/ltq-ptm: fix showtime handling on driver load
This is needed to be able to load the ltq-atm/ltq-ptm driver
from a notify script during synchronization, because the line can
reach showtime state before the driver is fully loaded.
Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
package/kernel/lantiq/ltq-atm/src/ltq_atm.c | 10 +++-------
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c | 3 +++
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c | 5 ++++-
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index 1208dd8..a08fa22 100644
--- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@ -1866,15 +1866,11 @@ static int ltq_atm_probe(struct platform_device *pdev)
port_cell.port_num = ATM_PORT_NUMBER;
ifx_mei_atm_showtime_check(&g_showtime, &port_cell, &g_xdata_addr);
if ( g_showtime ) {
- for ( i = 0; i < ATM_PORT_NUMBER; i++ )
- if ( port_cell.tx_link_rate[i] != 0 )
- break;
- for ( j = 0; j < ATM_PORT_NUMBER; j++ )
- g_atm_priv_data.port[j].tx_max_cell_rate =
- port_cell.tx_link_rate[j] != 0 ? port_cell.tx_link_rate[j] : port_cell.tx_link_rate[i];
+ atm_showtime_enter(&port_cell, &g_xdata_addr);
+ } else {
+ qsb_global_set();
}
- qsb_global_set();
validate_oam_htu_entry();
ifx_mei_atm_showtime_enter = atm_showtime_enter;
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
index 00a967b..4ce2e90 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
@@ -1518,6 +1518,9 @@ static int ifx_ptm_init(void)
port_cell.port_num = 1;
ifx_mei_atm_showtime_check(&g_showtime, &port_cell, &xdata_addr);
+ if ( g_showtime ) {
+ ptm_showtime_enter(&port_cell, &g_xdata_addr);
+ }
ifx_mei_atm_showtime_enter = ptm_showtime_enter;
ifx_mei_atm_showtime_exit = ptm_showtime_exit;
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
index 0a357f1..22f1e23 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
@@ -1022,7 +1022,10 @@ static int ifx_ptm_init(void)
enable_irq(PPE_MAILBOX_IGU1_INT);
ifx_mei_atm_showtime_check(&g_showtime, &port_cell, &g_xdata_addr);
-
+ if ( g_showtime ) {
+ ptm_showtime_enter(&port_cell, &g_xdata_addr);
+ }
+
ifx_mei_atm_showtime_enter = ptm_showtime_enter;
ifx_mei_atm_showtime_exit = ptm_showtime_exit;
More information about the lede-commits
mailing list