polling loops: change exit condition to
Subsystems (2)
PATCH 8/21 polling loops: change exit condition to
INFINIBAND SUBSYSTEM
P: Roland Dreier
M: [email protected]
P: Sean Hefty
M: [email protected]
P: Hal Rosenstock
M: [email protected]
Signed-off-by Marcin Slusarz <[email protected]>
drivers/infiniband/hw/mthca/mthca_reset.c +3 -2
@@ -153,9 +153,10 @@ int mthca_reset(struct mthca_dev *mdev)/* Now wait for PCI device to start responding again */ {u32 v; -int c =0 ; +unsigned long end_time; -for (c =0 ; c <100 ; ++c) { + end_time = jiffies +msecs_to_jiffies (10000 ); +while (time_before (jiffies, end_time)) {if (pci_read_config_dword (bridge ? bridge : mdev->pdev,0 , &v)) { err = -ENODEV ; mthca_err(mdev, "Couldn't access HCA after reset, "
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors