Erectile dysfunction — the inability to get or maintain an erection firm enough for sex — is common in men who have diabetes, especially those with type 2 diabetes.read