An independent inquiry has found "unacceptable racism and discrimination" is affecting patient safety.