ST. PETERSBURG -- Dustin Pedroia had gone exactly two months without a home run when he capitalized on some recent adjustments in the cage by smashing a two-run homer to left that helped lead the Red Sox to an 8-3 victory over the Rays on Friday night.

Pedroia's trot around the bases after a shot that Statcast™ projected at 386 feet marked the end of a stretch of 165 at-bats without a home run, the longest he'd gone without a long ball since a 176 at-bat stretch from July 31-Sept. 15, 2013.

The drought didn't end by accident.

"He's been working on that," Red Sox hitting coach Chili Davis said. "I can't really tell you what he's doing. But he made an adjustment the other day just to take a little bit of pressure off his knee."

Pedroia had left knee surgery in October and some ensuing discomfort from a collision with Manny Machado on April 21. He has also battled other ailments this season.

"He made a really nice adjustment and the beautiful thing about it is now he feels free, and he feels pain-free when he gets to the ball inside and he's still able to hit the ball the other way," Davis said. "It was a simple, simple adjustment that he made.

"It's just funny how the game is, you think there's 25 things wrong with your swing and there's one thing that is causing the other 24 to show up. He made a real simple adjustment and we took a note of that because I definitely want him to remember that when he comes back [from the All-Star break]."

It was Pedroia's third home run of the season, and a sign he might be ready to hit at his typical level of production.

"Season's not over, is it?" Pedroia asked.

No, it's not close to over. The Red Sox have 75 games left.

Does Pedroia feel like he's getting healthier as the season goes?

"Not really," said Pedroia. "[I] just go play, man. It's my job."

Whether Pedroia is at 100 percent or not, he usually finds a way to be an impact player.

"There's no one way to get him out," Rays manager Kevin Cash said of his former teammate. "He makes adjustments, constantly. [Jake Odorizzi] struck him out his first at-bat. I'm sure Petey saw a pitch that he was kind of looking for and saying, 'If he throws it again, I'm going to be ready for it,' and he was."

Since June 10, Pedroia is slashing .333/.422/.419 and raised his average from .286 to .302.

"He's a good hitter, so he fought through whatever he was dealing with. Hopefully this means he's going to take off in the second half," Davis said.

When Pedroia is displaying his full array of skills offensively, he makes a big difference in Boston's lineup.

"I think he's feeling a little more free with his lower half and being able to turn on the ball like he did tonight, that's an encouraging sign," Red Sox manager John Farrell said. "While the average has been there, throughout the course of his career he's been known to have a little bit more power [than this season]. So I think he's starting to figure some things out after the knee problem."

Ian Browne has covered the Red Sox for MLB.com since 2002. Follow him on Twitter @IanMBrowne and Facebook.