I want to say thanks for the help I've recieved over the last couple of years here by alerting my fellow readers to a common condition in 2004-6 Mazda 3's.
It starts with an intermittent "soft" p0455 code when you check engine light appears- you can kill it off then because the condition is intermittent at the start. Eventually the code goes "hard" and you're at the dealer getting the evaporative solenoid valve replaced along with the gas cap. The dealer I go go even had the parts in stock because the tech said it is so common.
I was lucky- I caught it 2K miles before the warantee expired and saved about $300. If your cel goes on - and even if you can kill the P0455 code at first- get to the dealer. It's more than a lose gas cap- it's this common problem in the evaporative system.
There is a tech bulletin on this for the techs- they are very familiar with the problem.
Symptoms and code are similar to mine. I have replaced the "purge solenoid valve" but CEL is back on.
My codes were p0442 and p2177 (if I remember well).
Car runs fine but I think it uses a little more gas.