aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.co.il>2007-08-13 10:57:03 -0400
committerRoland Dreier <rolandd@cisco.com>2007-08-13 11:47:44 -0400
commit947b2a8083a03e6fff448ce8928956015614855e (patch)
treea5dc653181c0029c11c2d45ac417c67a15573b21 /drivers
parent6958e827f187c9c5cd39af075567f74f02bf3dd1 (diff)
mlx4_core: Wait 1 second after reset before accessing device
Put a 1000 msec delay after resetting the device before attempting to do config cycles on it. Not waiting causes system hangs on some chipsets, e.g. Intel E7520, when the driver is loaded. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mlx4/reset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/mlx4/reset.c b/drivers/net/mlx4/reset.c
index e4dfd4b11a4a..e199715fabd0 100644
--- a/drivers/net/mlx4/reset.c
+++ b/drivers/net/mlx4/reset.c
@@ -119,6 +119,9 @@ int mlx4_reset(struct mlx4_dev *dev)
119 writel(MLX4_RESET_VALUE, reset + MLX4_RESET_OFFSET); 119 writel(MLX4_RESET_VALUE, reset + MLX4_RESET_OFFSET);
120 iounmap(reset); 120 iounmap(reset);
121 121
122 /* Docs say to wait one second before accessing device */
123 msleep(1000);
124
122 end = jiffies + MLX4_RESET_TIMEOUT_JIFFIES; 125 end = jiffies + MLX4_RESET_TIMEOUT_JIFFIES;
123 do { 126 do {
124 if (!pci_read_config_word(dev->pdev, PCI_VENDOR_ID, &vendor) && 127 if (!pci_read_config_word(dev->pdev, PCI_VENDOR_ID, &vendor) &&