Gates said that even though Turkey has had troops in northern Iraq for years , it has had to resort to air attacks and the recent ground incursion because it has not been successful in dealing with the PKK .