Skip to contentSkip to conversation

polling loops: change exit condition to

PATCH In review Marcin Slusarz 1 participant 1 message Dec 4, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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]

drivers/infiniband/hw/mthca/mthca_reset.c +3 -2
diff -upr -X linux-2.6.15-rc4/Documentation/dontdiff linux-2.6.15-rc4-orig/drivers/infiniband/hw/mthca/mthca_reset.c linux-2.6.15-rc4/drivers/infiniband/hw/mthca/mthca_reset.c
@@ -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