US Defense Secretary Jim Mattis says sections of Taliban are open to talks with Afghan government during inpromptu trip to the country.