Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Feb 2004 21:54:42 -0800 (PST)
From:      Mark Terribile <materribile@yahoo.com>
To:        jerry_ch_lee@wistron.com.tw, freebsd-scsi@freebsd.org
Subject:   Re: scsi_target crashed when initiator is using LSI PCI-X Ultra320 SCSI card
Message-ID:  <20040219055442.97978.qmail@web21105.mail.yahoo.com>
In-Reply-To: <48256E3F.00071B1E.00@TWTPEDS1.WISTRON.COM.TW>

next in thread | previous in thread | raw e-mail | index | archive | help

Jerry,

> Initiator: PC with Windows 2000, LSI Ultra320 SCSI card
> Target: PC with FreeBSD 5.2, on-board Adaptec 7899W chip
> command on target:
> ./scsi_target 0:1:0 file
> 
> When I rescan hardware on initiator, the Target's scsi_target program exit
> itself. Then I re-run scsi_target program again, and rescan hardware on
>initiator, then...
> 
> Target crashed! ( I can't grab the log because it's not logged in messages)

My recent work was on a different setup (Linux initiator) but I found that
when _anything_ changed (including the SCSI target emulator exiting or dying)
I had to rescan on the initiator or else things would crash soon.  Try
rescanning the initiator after the emulator shuts down, before restarting it.

And then you have to debug the target emulator.  It took me a while to figure
out how the confounded thing works.  The key is the queues on which the
transaction structs (I don't have it in front of me and do not recall their
names, but there is one kind for ATIOs and one for CTIOs) are placed.  They
start out on one fixed queue, and are placed on another (different for ATIO
and CTIO) when the struct is sent to the SCSI target layer via the write(2)
on targN.  When they are returned with work to do, the CTIOs are placed on
queues linked to the ATIOs while the async read or write is underway.

Side note in case you haven't been watching VERY closely: /dev/targ0, 
/dev/targ1, etc., are created WHEN YOU OPEN THEM in FreeBSD5.x; if they
exist you can't open them because something else has the file open!

Hope this helps.  I'm curious about this one; I may have to play
target to a MicroSoft initiator one of these days.

Seems lots of people are making SCSI targets of themselves these days.

    Mark Terribile
    materribile@yahoo.com


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools



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