For HMS NOTTINGHAM, I seem to remember that the RAF fixed it and recovered both the Lynx and some critical stores. The RAAF looked after the crew until they were moved to Sydney and returned home on commercial flights. A small number remained on board to assist the tow.
There have been other occasions where the Royal Fleet Auxiliary or another warship has obliged.