sync woth r9400

Reworked patch to apply on 9400…