libata: Add helper to determine when PHY events should be ignored