diff options
author | Prarit Bhargava <prarit@redhat.com> | 2010-05-17 14:25:14 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-05-18 18:00:25 -0400 |
commit | 5030718ee465c759c2a851851e79039f58b9efb3 (patch) | |
tree | dedfe6c7866cf19e3555662ceaa8782454e9338c /drivers/pci | |
parent | ee6583f6e8f8dad4a53985dbabcd7c242d66a6b6 (diff) |
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')
-rw-r--r-- | drivers/pci/access.c | 7 |
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) | |||
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
223 | if (time_after(jiffies, timeout)) | 223 | if (time_after(jiffies, timeout)) { |
224 | dev_printk(KERN_DEBUG, &dev->dev, | ||
225 | "vpd r/w failed. This is likely a firmware " | ||
226 | "bug on this device. Contact the card " | ||
227 | "vendor for a firmware update."); | ||
224 | return -ETIMEDOUT; | 228 | return -ETIMEDOUT; |
229 | } | ||
225 | if (fatal_signal_pending(current)) | 230 | if (fatal_signal_pending(current)) |
226 | return -EINTR; | 231 | return -EINTR; |
227 | if (!cond_resched()) | 232 | if (!cond_resched()) |