T2 was never started when sending a command.
Start it when sending a command for the first attempt
and stop it once we receive the answer.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
                ndlc->t1_active = true;
                mod_timer(&ndlc->t1_timer, time_sent +
                        msecs_to_jiffies(NDLC_TIMER_T1));
+               /* start timer t2 for chip availability */
+               ndlc->t2_active = true;
+               mod_timer(&ndlc->t2_timer, time_sent +
+                       msecs_to_jiffies(NDLC_TIMER_T2));
        }
 }
 
                ndlc->t2_active = false;
                ndlc->t1_active = false;
                del_timer_sync(&ndlc->t1_timer);
-
+               del_timer_sync(&ndlc->t2_timer);
                ndlc_close(ndlc);
                ndlc->hard_fault = -EREMOTEIO;
        }