If you are concerned about erectile dysfunction, talk to your doctor, even if it embarrasses you. Sometimes treatment of an underlying condition is enough to reverse erectile dysfunction. In other cases, medications or other direct treatments may be needed.