1. Disconnect the negative battery cable.
2. Disconnect the brake switch connector harness.
3. Inspect for continuity between the brake switch connector terminals.


Brake pedal inspection
Brake pedal removal/installationMazda 6 Service Manual: Cruise Control (Some models)
With cruise control, you can set and automatically maintain any speed of more
than about 25 km/h (16 mph).
WARNING
Do not use the cruise control under the following conditions: Using
the cruise control under the following conditions is dangerous and could result
in loss of vehicle control.
...
Mazda 6 Service Manual: Drive shaft (mtx) disassembly/assembly
1. Disassemble in the order indicated in the table.
2. Assemble in the reverse order of disassembly.
Clip Disassembly Note
1. Mark the drive shaft and outer ring for proper assembly.
Caution
Mark with paint; do not use a punch.
2. Remove the clip.
Balls, Inner Ring, Cage Disassembl ...