Hi Scotty,
I have 2012 Mazda CX7 with 170k miles and it's an automatic transmission. I have code P0101 Mass Air Flow sensor and I took below steps to diagnose and get the code issue resolved but none helped and the code is still there. once i clear the code it comes right away.
1. I removed the sensor and installed a new sensor. I checked all the fuses and wiring. I also checked for any vacuum leak and the air filter is also clean. Please let me know if there is anything I am missing or need to do to resolve this issue. Thank you.
Did your original MAF sensor test bad before you replaced it? Did you use an OEM replacement from a trusted source? (Amazon and Ebay are notorious for counterfeit parts and Chinese knockoffs.) Have you tested the replacement?
See below for diagnostic information:
https://www.obd-codes.com/p0101
@chucktobias The put the original MAF sensor back and the reading was fine both in idle and when i doubled the RPM. The fuses are good and also I found no vacuum leaks.