Almost sure stability of stochastic linear systems with ergodic pparameters: a small-gain theorem