SAN FRANCISCO -- Giants manager Bruce Bochy didnt take kindly to what he believed were two intentional pitches thrown inside at Buster Posey, and wound up getting ejected for the first time this season.Brandon Crawford felt the same way and paid the Diamondbacks back the best way he could.Crawford drove in three runs and came within a triple of hitting for the cycle, Jeff Samardzija overcame a shaky first inning to win and San Francisco beat the Arizona Diamondbacks 6-2 on Friday night.Crawfords home run came shortly after Diamondbacks starter Patrick Corbin (4-7) threw two consecutive pitches that nearly hit Posey. The second went behind Posey and nearly hit him in the back, causing home plate umpire Quinn Wolcott to warn both dugouts.Bochy came out after Wolcott issued the warnings and was ejected.That kind of fired me up, Crawford said. When (Posey) walked I wanted to make them pay for doing that. Im not going to sugarcoat it, thats what I was going for.Brandon Belt walked four times and scored for the Giants after earlier in the day being voted by fans to fill the final spot on the NL roster for next weeks All-Star Game.Crawfords homer was his ninth of the season, and he also singled, walked and doubled.Corbins pitches close to Posey followed on the heels of Samardzija hitting Arizonas Jean Segura -- who homered leading off the game -- in the top of the second.I understand theyre not happy their guy got hit but I cant have Buster being a target, Bochy said. They threw once at him, throws another one thats up high at his back. Thats enough. Thats when guys get hurt.Diamondbacks manager Chip Hale, who was ejected in the fifth for arguing balls and strikes, defended Corbin.I just think he was trying to pitch in, Hale said. He was trying to pitch in and the ball got away a little bit.Samardzija (9-5) walked three and struck out six in 6 1/3 innings to win for the first time in four starts. The right-hander gave up two runs, both in the first inning. Samardzija also scored the go-ahead run on a throwing error after doubling leading off the fifth.Three relievers completed the seven-hitter.It was a tough way to start the game but I like the way it finished, Samardzija said.Crawford had an RBI single in the third, walked in the fifth and doubled in the seventh.Corbin allowed five runs over 4 2/3 innings. The left-hander walked five with one strikeout.Gregor Blanco hit a pinch-hit home run in the eighth for the Giants.After the game the Diamondbacks announced they traded closer Brad Ziegler to the Boston Red Sox for two prospects.HITTING PITCHERSCorbin and Samardzija earn their money on the mound but both continue to show their skills at the plate. Corbin singled in the second inning to give him 13 hits this season, tops among all pitchers in the majors. Samardzijas double in the third is his third extra-base hit this season.TRAINERS ROOMDiamondbacks: RHP Zack Grienke (left oblique strain) is feeling better but has not started playing catch. ... INF Chris Owings (left foot plantar fasciitis) and OF David Peralta (low back sprain) took batting practice before the game.Giants: OF Hunter Pence (hamstring) ran the bases and will continue with baseball activities throughout the weekend. ... RHP Matt Cain allowed two runs over 5 2/3 innings with Triple-A Sacramento. . 2B Joe Panik (concussion) took grounders and hit off a tee before the game.UP NEXTDiamondbacks: LHP Robbie Ray (4-7) makes his third start against the Giants this season Saturday. Ray pitched six scoreless innings to win at AT&T Park on April 19.Giants: RHP Jake Peavy (5-7) seeks his 18th career win against Arizona. Nick Bosa Youth Jersey . Jason Zucker and Matt Cooke also scored for Minnesota, which has won five of six. Kuemper made five saves in the first, nine in the second, and nine in the third. The rookies best save came with 2:17 left in the third period when he denied former Wild forward Matt Cullen from just outside of the crease on the right side. Solomon Thomas Jersey .Y. -- Vancouver Canucks goaltender Roberto Luongo had little trouble picking up his first shutout of the season against a Buffalo Sabres team thats having trouble scoring goals. http://www.49ersrookiestore.com/Customized/ . LOUIS -- Lance Lynn was one of the more enthusiastic participants as the St. Nick Bosa Jersey . Houston won 3-0 to advance to face New York in the Eastern Conference semifinals. Last in the game, Di Vaio and Romero got into a shoving match with several Houston players. Romero appeared to elbow and kick Houston defender Kofi Sarkodie. Y.A. Tittle Youth Jersey . -- Aaron Murray threw for 408 yards and three touchdowns, ran for another score, and led No. Thursday, Adnan Virk and Randy Scott welcome CFP executive director Bill Hancock (1:15 p.m. ET), rapper Birdman (1:30), ESPNs Field Yates (2:15) and ESPN Broncos reporter Jeff Legwold (3:15).Todays main topics:? Ryan Fitzpatrick re-signs with Jets? Rams release Nick FolesText us at 737766 (msg&data rates may apply) or tweet us at twitter.ddddddddddddcom/RussilloShow -- well be with you from 1 p.m. to 4 p.m. ET on ESPN Radio and ESPNRadio.com. ' ' '