Reversible between pump and motor use