Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 1999 17:32:05 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Matthew Jacob <mjacob@feral.com>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: bug in i386/eisa/ahb.c (fwd)
Message-ID:  <199901280132.RAA83106@apollo.backplane.com>
References:   <Pine.LNX.4.04.9901271724580.27188-100000@feral-gw>

next in thread | previous in thread | raw e-mail | index | archive | help
    Addendum:  I followed up to current and will repeat to freebsd-scsi,
    that even after proper parenthesizing ,the code still looks wrong to
    me.  It looks wrong either way.

					-Matt


:---------- Forwarded message ----------
:Date: Wed, 27 Jan 1999 17:06:56 -0800 (PST)
:From: Matthew Dillon <dillon@apollo.backplane.com>
:To: current@FreeBSD.ORG
:Subject: bug in i386/eisa/ahb.c
:
: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);
:}
:
:    & has higher precedence, so this is equivalently:
:
:	if (((status & HOSTSTAT_MBOX_EMPTY) | HOSTSTAT_BUSY) ...
:
:    Rather then:
:
:	if ((status & (HOSTSTAT_MBOX_EMPTYHOSTSTAT_BUSY)) ...
:
:    Fixed.
:
:					-Matt
:					Matthew Dillon 
:					<dillon@backplane.com>
:
:To Unsubscribe: send mail to majordomo@FreeBSD.org
:with "unsubscribe freebsd-current" in the body of the message
:
:

					Matthew Dillon 
					<dillon@backplane.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901280132.RAA83106>