1. Disconnect the negative battery cable.
2. Remove the headliner.
3. Disconnect the connector.
4. Remove the screws, and then remove the sunroof motor.

Sunroof unit disassembly/assembly
Sunroof motor installationMazda 6 Service Manual: Abs (abs/tcs) on-board diagnosis
On-Board Diagnostic (OBD) Test Description
The OBD test inspects the integrity and function of the ABS (ABS/TCS)
and outputs the results when requested by the specific tests.
On-board diagnostic test also:
- Provides a quick inspection of the ABS (ABS/TCS) usually performed at
the ...
Mazda 6 Service Manual: No.7 abs warning light stays on more than 4 seconds with ignition switch on
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 conne ...