Mazda issued an emissions recall due to a problem with the Swirl Shutter Valve; this would cause the Check Engine light to illuminate.
2007 Mazda Mazda6 Problem Reports
RepairPal Verified 2007 Mazda Mazda6 Problem Reports
Report A Problem
Some models may have a problem with stalling under light acceleration. Updated software for the powertrain control module (PCM) is available which may help with this concern.