They knew it was the village. They knew there were Taliban there shooting on US and Afghan forces. They didn't know where the civilians were - because when there is shooting going around, civilians hide and it is very hard to see if there are any around, and how many of them, especially when you're being shot at at the same time. So they called an airstrike, and that turned out to be a big mistake. They could suspect that there might be civilians - since among Taliban, just like similar groups like Hamas or Hesbollah - hiding among civilians and using them as a cover is a common tactic, and since it is a village after all - but they did not know where, how many, etc. After many hours of fighting against hundreds of Taliban and after suffering casualties, the people on the ground made decision to call in air strike. Unfortunately, that resulted in tragedy, since the places where airstrikes were asked (presumably where Taliban forces were concentrated) turned out to be at or near the same places where the civilians hid. If the US soldiers on the ground knew that, they probably could do something else, but I don't see how they had to know it in the heat of the battle.
http://www.nytimes.com/2009/05/15/world/asia/15farah.html