Surrey seamer Tim Linley has been forced to retire from first-class cricket due to a knee injury.