Re: [PATCH]: Output FW warning in pci_read/write_vpd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 05/17/2010 02:08 PM, Randy Dunlap wrote:
On Mon, 17 May 2010 14:02:00 -0400 Prarit Bhargava wrote:

pci_read/write_vpd() can fail due to a timeout.  Usually the command times out
because of FW 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 FW.

Signed-off-by: Prarit Bhargava<prarit@xxxxxxxxxx>
Please spell out firewire^W firmware.



np Randy -- new patch.

P.

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.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 2f646fe..26e9c19 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())

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux