Third-year linebacker Aldon Smith visited 49ers headquarters on Wednesday for the first time in five weeks.