summaryrefslogtreecommitdiffstats
path: root/drivers/pci/access.c
diff options
context:
space:
mode:
authorPrarit Bhargava <prarit@redhat.com>2010-05-17 20:25:14 +0200
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-05-19 00:00:25 +0200
commit5030718ee465c759c2a851851e79039f58b9efb3 (patch)
treededfe6c7866cf19e3555662ceaa8782454e9338c /drivers/pci/access.c
parentPCI: fix typos pci_device_dis/enable to pci_dis/enable_device in comments (diff)
downloadlinux-5030718ee465c759c2a851851e79039f58b9efb3.tar.xz
linux-5030718ee465c759c2a851851e79039f58b9efb3.zip
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: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/access.c')
-rw-r--r--drivers/pci/access.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index affb83b42ebb..531bc697d800 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -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())