You can usually fix P0171 using the following steps: Replace the fuel pump or fuel filter. Change the fuel pressure regulator. Replace the powertrain control module. Change one or more injectors. Replace one or more oxygen sensors. Change the mass airflow sensor. Repair vacuum leak.