Hmmm. Actually, this looks broken either way. It looks like it is trying to wait until the mbox is empty? But it breaks out of the loop if the mbox is busy or not-empty, from what I can tell.
Could an Adaptec SCSI guru take a look at this code ? There's probably some poor sob running EISA who's scratching his head right now :-) -Matt static __inline void ahbqueuembox(struct ahb_softc *ahb, u_int32_t mboxval, u_int attn_code) { u_int loopmax = 300; while (--loopmax) { u_int status; status = ahb_inb(ahb, HOSTSTAT); if ((status & HOSTSTAT_MBOX_EMPTY|HOSTSTAT_BUSY) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ != HOSTSTAT_MBOX_EMPTY) break; DELAY(20); } if (loopmax == 0) panic("ahb%ld: adapter not taking commands\n", ahb->unit); ahb_outl(ahb, MBOXOUT0, mboxval); ahb_outb(ahb, ATTN, attn_code); } To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message