Gates wraps up his trip to Afghanistan Wednesday .