提交 5030718e 编写于 作者: P Prarit Bhargava 提交者: Jesse Barnes

PCI: output FW warning in pci_read/write_vpd

pci_read/write_vpd() can fail due to a timeout.  Usually the command
times out because of firmware issues (incorrect vpd length, etc.) on the
PCI card.  Currently, the timeout occurs silently.

Output a message to the user indicating that they should check with
their vendor for new firmware.
Reviewed-by: NRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 ee6583f6
......@@ -220,8 +220,13 @@ static int pci_vpd_pci22_wait(struct pci_dev *dev)
return 0;
}
if (time_after(jiffies, timeout))
if (time_after(jiffies, timeout)) {
dev_printk(KERN_DEBUG, &dev->dev,
"vpd r/w failed. This is likely a firmware "
"bug on this device. Contact the card "
"vendor for a firmware update.");
return -ETIMEDOUT;
}
if (fatal_signal_pending(current))
return -EINTR;
if (!cond_resched())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册