1. Disconnect the negative battery cable.
2. Remove the headliner.
3. Disconnect the connector.
4. Remove the screws, and then remove the sunroof motor.
Mazda 6 Service Manual: Cargo compartment light switch inspection
1. Remove the liftgate lower trim. (See LIFTGATE LOWER TRIM
REMOVAL/INSTALLATION)
2. Disconnect the cargo compartment light switch connector.
3. Inspect for continuity between the cargo compartment light switch
terminals using an ohmmeter.
If not as specified, replace the liftgate lock.
...
Mazda 6 Service Manual: No.3 passenger-side air bag cut-off indicator light does not illuminate
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 ...