@@ -545,6 +545,7 @@ intel_dp_aux_native_read(struct intel_dp *intel_dp,
int reply_bytes;
uint8_t ack;
int ret;
+ int try;
intel_dp_check_edp(intel_dp);
msg[0] = AUX_NATIVE_READ << 4;
@@ -555,7 +556,7 @@ intel_dp_aux_native_read(struct intel_dp *intel_dp,
msg_bytes = 4;
reply_bytes = recv_bytes + 1;
- for (;;) {
+ for (try = 0; try < 100; try++) {
ret = intel_dp_aux_ch(intel_dp, msg, msg_bytes,
reply, reply_bytes);
if (ret == 0)
@@ -572,6 +573,9 @@ intel_dp_aux_native_read(struct intel_dp *intel_dp,
else
return -EIO;
}
+
+ DRM_ERROR("too many retries, giving up\n");
+ return -EREMOTEIO;
}
static int