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: Mazda Radar Cruise Control (MRCC) (Some models)
The Mazda Radar Cruise Control (MRCC) system is designed to maintain headway
control*1 according to the vehicle speed using a radar sensor (front) to detect
the distance to a vehicle ahead, and by presetting the vehicle speed between 30
km/h (19 mph) and 145 km/h (90 mph), the driver is freed ...
Mazda 6 Owners Manual: Hold switch inspection
Operating Inspection
1. Turn the ignition switch to ON (engine OFF).
2. Verify that the HOLD indicator light is not illuminated. Depress the HOLD
switch and verify that the HOLD indicator light illuminates.
If not as specified, inspect the terminal voltage of the HOLD switch.
Voltage Insp ...