  We study quadratic optimal stochastic control problems with control dependent
noise state equation perturbed by an affine term and with stochastic
coefficients. Both infinite horizon case and ergodic case are treated. To this
purpose we introduce a Backward Stochastic Riccati Equation and a dual backward
stochastic equation, both considered in the whole time line. Besides some
stabilizability conditions we prove existence of a solution for the two
previous equations defined as limit of suitable finite horizon approximating
problems. This allows to perform the synthesis of the optimal control.
