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: Rearview Mirror
WARNING
Do not stack cargo or objects higher than the seatbacks: Cargo stacked
higher than the seatbacks is dangerous. It can block your view in the rearview mirror,
which might cause you to hit another car when changing lanes.
Rearview mirror adjustment
Before driving, adjust the rearview mi ...
Mazda 6 Service Manual: Dtc c1095, c1096
Caution
When attaching the tester lead to the ABS (ABS/TCS) HU/CM harnesses
connector the SST (49 G066 001) must be used. (See ABS (ABS/TCS) HU/CM
INSPECTION.)
Diagnostic procedure
...