We consider a spectrum sharing communication scenario in which a primary and a secondary users are communicating, simultaneously, with their respective destinations using the same frequency carrier. Both optimal power profile and ergodic capacity are derived for fading channels, under an average transmit power and an instantaneous interference outage constraints. Unlike previous studies, we assume that the secondary user has a noisy version of the cross link and the secondary link Channel State Information (CSI). After deriving the capacity in this case, we provide an ergodic capacity generalization, through a unified expression, that encompasses several previously studied spectrum sharing settings. In addition, we provide an asymptotic capacity analysis at high and low signal-to-noise ratio (SNR). Numerical results, applied for independent Rayleigh fading channels, show that at low SNR regime, only the secondary channel estimation matters with no effect of the cross link on the capacity; whereas at high SNR regime, the capacity is rather driven by the cross link CSI. Furthermore, a practical on-off power allocation scheme is proposed and is shown, through numerical results, to achieve the full capacity at high and low SNR regimes and suboptimal rates in the medium SNR regime.