It should be stated right off the bat that the most common problem associated with this code is the MAF sensor or air mass meter. This is especially the case with Mercedes-Benz and Volkswagen and other European cars. At time of writing, you don't normally see this code with American-made cars, and minimally with Asian, and, to be honest, I have no idea why. It appears to me that the PCM (powertrain control module) logic used by some European car manufacturers to set a P0170 (or P0173) fault code simply isn't used by American vehicle manufacturers. It is more common to see P0171, 0174, 0172, 0175 codes set with regard to fuel trim malfunctions on American cars. There is very little information on the setting conditions for a P0170, or P0173, but what information that is available almost seems to be a redundancy of the P0171,4,2 & 5 setting conditions. I'm sure there'* a reason for it, but I can't get anyone to tell me what that is. The similarities between them may be why we don't see this code surface on domestic vehicles very often. It'* simply unnecessary. So, simply put, if you have a P0170, your PCM noticed that the fuel trims reached their rich correction limit. Basically it'* adding fuel to try to compensate for a lean condition, real or perceived.
If you have this code and access to a scan tool, observe the MAF sensor reading in grams/sec. The reading will be different for different automobiles, so get a good spec. I'm going to stick with what would be normal for a Mercedes (1.8L), since they have the bulk of the trouble. Expect to see at idle 3.5-5 g/* (ideally). At 2500 RPMs with no load it should be between 9 and 12 g/*. On road test, at WOT (wide open throttle) it should be 90 g/* or well above. If it'* not in specs, replace it. Be careful of Ebay MAFs. Often they don't work according to OE specifications. If the MAF checks out and there is no oil intrusion at the connector, check fuel pressure and ensure that there are no leaks at the regulator internally or externally. Check all vacuum hoses and confirm none are cracked, disconnected or missing. Make sure there are no vacuum leaks at the intake manifold gaskets or tears in the air supply hose. If the engine is turbo charged, be sure the hoses are in good condition and have no leaks. Leaking turbo pressure hoses could cause a rich condition. Inspect the condition of crankcase vent hose under intake manifold and operation of check valve in the hose. (In the "What are the causes?" section) If there doesn't appear to be any problems with the fuel pressure, MAF or vacuum hoses, then inspect the O2 sensor connectors for oil intrusion. A bad O2 sensor could cause a P0170, or P0173. Repair cause of oil leak and replace oil-fouled O2 sensor.