The sunshade can be opened and closed by hand.
The sunshade opens automatically when the moonroof is opened, but must be closed by hand.

CAUTION
Jam-safe Moonroof
Security SystemMazda 6 Owners Manual: Power window motor inspection
Drivers Side
1. Disconnect the power window motor connector.
2. Apply battery positive voltage to the power window motor terminals E and F
and inspect the operation the power window motor operation.
If not as specified, replace the power window motor.
3. Apply battery positive voltage ...
Mazda 6 Owners Manual: Dtc c1145, c1155, c1165, c1175
Caution
When attaching the tester lead to the DSC HU/CM connector the SST
(49 G066 004) must be used.
Diagnostic procedure
...