Updated

Tim Lincecum ended a three-start losing streak, Andres Torres hit a two-run homer and the San Francisco Giants beat Melky Cabrera and the Toronto Blue Jays 2-1 on Tuesday night.

Cabrera had two hits in his return to AT&T Park with Toronto for the first time since his 50-game suspension for a positive testosterone test last Aug. 15.

Lincecum (4-5) allowed Edwin Encarnacion's first-inning solo home run, then retired the next 14 Blue Jays in order.

Coming off his shortest outing of the year of 4 1-3 innings last Wednesday in a 9-6 loss to Oakland, Lincecum allowed three hits and one run, struck out six and walked one in seven impressive innings.

The Giants handed Josh Johnson (0-2) a loss in his return from the disabled list.