*BSD News Article 58363


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!in1.uu.net!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc,comp.periphs.scsi
Subject: Re: SCSI-2 Bus Hangs
Date: 28 Dec 1995 10:02:06 GMT
Organization: Private BSD site, Dresden
Lines: 55
Message-ID: <4btpuu$555@uriah.heep.sax.de>
References: <4bju5p$ihj@wilma.widomaker.com> <4bp3bp$7cc@scratchy.mosquito.com> <1995Dec26.123518.1@spcvxb.spc.edu> <4brb07$b4q@uriah.heep.sax.de> <4bsu5j$eca@kelewan.dandelion.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.3
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:11630 comp.periphs.scsi:43994

"Leonard N. Zubkoff" <lnz@dandelion.com> writes:

>   FreeBSD drivers do this already since day 1.

> Would you kindly point me to the code where the Bus Device Reset or SCSI
> Bus Reset is initiated in FreeBSD?

Sorry, i should have looked before.  Actually, the timeout code is
there, but not all adapter drivers do bus resets.  I've seen it myself
for the NCR driver.  For the Adaptec 154X driver, this is the event
chain that finally causes a timeout:

(scsi_scsi_cmd() is the central hook for all SCSI commands.)

errval
scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
    retries, timeout, bp, flags)
        struct scsi_link *sc_link;
        struct scsi_generic *scsi_cmd;
        u_int32 cmdlen;
        u_char *data_addr;
        u_int32 datalen;
        u_int32 retries;
        u_int32 timeout;
        struct buf *bp;
        u_int32 flags;
{
..
        xs->timeout = timeout;
..
        retval = (*(sc_link->adapter->scsi_cmd)) (xs);
..


static int32
aha_scsi_cmd(xs)
        struct scsi_xfer *xs;
{
..
                timeout(aha_timeout, (caddr_t)ccb, (xs->timeout * hz) / 1000);
..

static void
aha_timeout(void *arg1)
{
..



-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)