I battled this same code for quite some time, and as a result, I changed out the O2 sensors, the MAF sensor, the catalytic converter, PCV valve, a half-dozen other things that the dealership told me to change (including the gas cap, WTF???), and checked everything else along the way. The problem ended up being a small air intake leak causing too much air to be drawn into the system behind the MAF sensor. I had checked the system for leaks before, but didn't check my supercharger very well, which was exactly where the leak was occurring. Some high-temp silicone fixed the problem, and the truck ran much smoother, and the check-engine light went out. It's now been driving great for about 4 months, and I got my MPG back.
After being raped by dealerships and being fed their BS for way too long, my advice is to see if you can locate the problem yourself first. Check thoroughly for intake leaks, make sure that MAF sensor is clean, and read the 4X4wire article about PO171 trouble codes. <img src="/forums/images/graemlins/kewl.gif" alt="" />


'99 Tacoma Xtra cab V6 TRD
TRD Supercharged, URD 7th injector and 2.2" pulley, 32X11.5 BFG All-Terrains, OME 881 3-inch lift/Toytec AAL, 5100 Series Bilsteins all around, and ProComp 130 lights.
No I'm not some creepy naked guy...