The curtain air bags are mounted in the front and rear window pillars, and the roof edge along both sides.
When the air bag crash sensors detect a side impact of greater than moderate force, the curtain air bag inflates quickly and helps to reduce injury mainly to the rear outboard passenger's head caused by directly hitting interior parts such as a door or window. For more details about air bag deployment, refer to "SRS Air Bag Deployment Criteria".
In a side impact:
Greater than moderate impact to one side of the vehicle will cause the curtain air bag on that side only to inflate.

(With Front Passenger Occupant Classification System) In a roll-over:
In response to a vehicle roll-over, both curtain air bags inflate.

Warning Light/Beep
A system malfunction or operation conditions are indicated by a warning.Refer to Warning/Indicator Lights. Refer to Warning Sound is Activated.
Side Air Bags
SRS Air Bag Deployment CriteriaMazda 6 Owners Manual: No.8 brake system 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 co ...
Mazda 6 Owners Manual: Scheduled Maintenance (U.S.A., Canada, and Puerto Rico)
Follow Schedule 1 if the vehicle is operated mainly where none of the following
conditions (severe driving conditions) apply.
Repeated short-distance driving
Driving in dusty conditions
Driving with extended use of brakes
Driving in areas where salt or other corrosive materials are used
...