The gas cap symbol has been on since I purchased my used Mazda a year ago. Now the gas cap light and engine light both came on. I had the computer re-set and the gas cap symbol stayed off but the engine light came back on.
Gas cap and engine symbols are comming on. on 2007 Mazda CX-9
You should be able to take to AutoZone and they will attach a scanner and tell you what the code(s) are, bring that info back to here and we will try to help.