Skip to content

Commit

Permalink
mlx4_core: Wait 1 second after reset before accessing device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Aug 13, 2007
1 parent 6958e82 commit 947b2a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/mlx4/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ int mlx4_reset(struct mlx4_dev *dev)
writel(MLX4_RESET_VALUE, reset + MLX4_RESET_OFFSET);
iounmap(reset);

/* Docs say to wait one second before accessing device */
msleep(1000);

end = jiffies + MLX4_RESET_TIMEOUT_JIFFIES;
do {
if (!pci_read_config_word(dev->pdev, PCI_VENDOR_ID, &vendor) &&
Expand Down

0 comments on commit 947b2a8

Please sign in to comment.