[ofw][patch][ibal] make IBBUS start up synchronous.

Sean Hefty sean.hefty at intel.com
Wed Mar 25 09:58:31 PDT 2009


>+ /* wait up to 3 seconds for the end of event propagation
>+ It is needed for enabling quick HCA disable/enable scenarios. */
>+ prev_cnt = ref_cnt - 1;
>+ for ( i = 0; i < 30; ++i ) {
>+  if (ref_cnt <= prev_cnt)
>+   break;
>+  cl_thread_suspend(100);
>+ }

We should use an actual event mechanism here, rather than spinning.

Also, I'm not a fan of

while/for (...)
	if (x)
		break;

just move 'x' into the while/for check.

- Sean




More information about the ofw mailing list