All doors lock automatically when the lock side is pressed. They unlock when the unlock side is pressed.
Driver's door

Front passenger's door

To lock all the doors from an open front door, press the lock side of the door lock switch and then close the door.
NOTE
When locking the doors this way, be careful not to leave the key inside the vehicle.
Locking, Unlocking with Transmitter
Auto Lock/Unlock FunctionMazda 6 Owners Manual: System Operation
Make sure that the Lane-keep Assist System (LAS) & Lane Departure Warning System
(LDWS) OFF indicator light in the instrument cluster is turned off. When the Lane-keep
Assist System (LAS) & Lane Departure Warning System (LDWS) OFF indicator light is
turned on, press the switch and make ...
Mazda 6 Owners Manual: No.2 air bag system warning light is illuminated all the time
Diagnostic Procedure
When performing an asterisked (*) troubleshooting inspection, shake the
wiring harness and connectors while doing the inspection to discover whether
poor contact points are the cause of any intermittent malfunction. If there
is a problem, check to make sure connec ...