After figuring out why he's having problems you'll be able to take care of them. If the problem is physical there are different solutions for many conditions today. If the problem is psychological or something else, a sexologist could probably help you out.
Don't forget, this is mainly your partner's problem so make sure he wants to take care of it as well.