Critical to any effective strategy (corporate or military) is to be judicious about where to play. As a general rule, one shouldn't pick battles that one can't win. In Afghanistan, our biggest problem is that the United States has yet to define victory in a way that is achievable.
If the US continues to insist on defining victory in Afghanistan as "leaving behind" a social and political system in which the men there treat their womenfolk in a way we deem appropriate - the implicit argument, for example, of idiocies like the Time Magazine cover on the right - then there is little doubt that we'll be banging our heads against the mud walls of their villages for the rest of this century.
On the other hand, if the US chooses to define success as making it clear to the local Afghan leaders (yes, including the Taliban) that they must prevent terrorists from planning attacks on the West from their territory - and should they fail to do so, that we will rain holy hellfire down on their fields and villages - then we can probably find an exit in reasonably short order.