Date: Fri, 13 Oct 2000 12:36:21 -0700 (PDT) From: Matthew Jacob <mjacob@feral.com> To: John Baldwin <jhb@FreeBSD.ORG> Cc: arch@FreeBSD.ORG, Jake Burkholder <jburkhol@home.com> Subject: Re: when is it safe to call msleep? Message-ID: <Pine.LNX.4.21.0010131230160.3882-100000@zeppo.feral.com> In-Reply-To: <XFMail.001013111611.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hmm... yes... now I don't know why I thought that the switch to SMP would magically make all kernel services available during probetime... Sorry- I didn't do my homework. I'm not going to even try the suggestion you made- we still have all of the other stuff which needs to happen as well. What I was trying do to was to eliminate the need for polling in Qlogic driver. I have the mutex stuff ready to go, and didn't want to have to do any runtime switching. Instead, I'll now have to do (below)... too bad- most of the obnoxious time delay in booting with fibre channel has to do with dealing with mailbox commands that take a very long time to die and tell you that the fabric controller is dead. Zut. The assumption is, as it has been, that the intr_config_hook has to run to let me know that it's safe to use interrupt style mechanisms. -------- static INLINE void isp_mbox_wait_complete(struct ispsoftc *); static INLINE void isp_mbox_wait_complete(struct ispsoftc *isp) { if (isp_can_lock) { isp->isp_osinfo.mboxwaiting = 1; #if ISP_PLATFORM_VERSION_MAJOR > 5 || \ (ISP_PLATFORM_VERSION_MAJOR == 5 && ISP_PLATFORM_VERSION_MINOR >= 4) (void) msleep(&isp->isp_osinfo.mboxwaiting, &isp->isp_osinfo.lock, PRIBIO, "isp_mboxwaiting", 5 * hz); #else (void) tsleep(&isp->isp_osinfo.mboxwaiting, PRIBIO, "isp_mboxwaiting", 5 * hz); #endif if (isp->isp_mboxbsy != 0) { isp_prt(isp, ISP_LOGWARN, "mailbox timeout"); isp->isp_mboxbsy = 0; } isp->isp_osinfo.mboxwaiting = 0; } else { int j; for (j = 0; j < 60 * 2000; j++) { if (isp_intr(isp) == 0) { USEC_DELAY(500); } if (isp->isp_mboxbsy == 0) { break; } } if (isp->isp_mboxbsy != 0) { isp_prt(isp, ISP_LOGWARN, "mailbox timeout"); } } } --------- -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0010131230160.3882-100000>