[PATCH] libata: determine the err_mask when the error is found