add acheck for PCIe link lost in case of MCI timeout

This commit is contained in:
Ralph Metzler 2019-03-14 12:45:30 +01:00
parent 1d4fa8f5a3
commit da39fb4c0d
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ static int ddb_mci_cmd_raw_unlocked(struct mci *state,
stat = wait_for_completion_timeout(&state->base->completion, HZ);
if (stat == 0) {
printk("MCI timeout\n");
val = ddblreadl(link, MCI_CONTROL);
if (val == 0xffffffff)
printk("Lost PCIe link!\n");
return -EIO;
}
if (res && res_len)