----- Original Message -----
From: “Phillip Susi”
To: “NT Developers Interest List”
Sent: Thursday, July 20, 2000 1:33 AM
Subject: [ntdev] RE: SCSI-2 SEND command
> At 06:09 PM 7/19/00 -0700, Paul Bunn wrote:
> >No, that’s not the issue. The controllers do not respond to each other
> >because they are both in initiator mode – one of them needs to be
> >reprogrammed to operate in target mode. One possibility for this is to
>
> As far as I can tell from the scsi-2 spec, the only thing that ‘initiator’
> and ‘target’ means to scsi is the initiator is the device that initiated a
> command, and the target is the device to which the initiator is
> talking. Any device can respond to commands from some other device acting
> as an initator, or it can choose to be an initiator itself by initiating a
> command to another device.
Oops, I think I’m mixing FC in here. FC requires that a device describe
whether is it target or initiator in the initial handshake.
>
> >obtain VirtualSCSI from fellow NTDev contributor Bill Casey, info at:
> >http://www.advstor.com/vscsi.html
> >The alternative would be to use hardware that you have the source for AND
> >(importantly) freely available documentation for the SCSI chipset used. The
> >NCR (now LSI, nee Symbios) 53c9x chipset is one such example of this. It
> >might also be possible to (given the availability of documentation) simply
> >adapt (or infer from this) the correct code for SCSI cards based on the
> >other LSI chips such as the C810 or C895. This route is not a trivial
> >exercise, and explains why VirtualSCSI only works with a set number of SCSI
> >interface cards. Essentially, you’ll be taking a miniport device driver and
> >converting it to an NDIS driver, a completely different animal.
>
> I do not see why you would need to do this at all. Provided the existing
> miniport driver implements the SRB command to receive an AEN ( which I’m
> now betting those controllers on the clustering services HCL do ), you
> could write an NDIS driver to open the scsi port, and send it this SRB in a
> pass through ioctl.
>
> At 09:31 PM 7/19/00 -0400, “Dave Harvey” wrote:
>
> >AEN is defined in the SCSI protocol, and it is a mechanism by which a
> >target (e.g., disk) can asynchronously notify an initiator of some event.
> >So NT has some unimplemented concept in initiator mode that it a target
> >is sending it
> >an event. This is completely unrelated to NT running as a target or
> >initiator/target. (Also, my belief is AEN is a legacy feature that most
> >new implementations drop. I don’t expect it will ever be supported in NT.)
>
> You seem to be suggesting that there is some other way to pass data between
> controllers, other than a SEND type AEN, could you explain?
You can do a “SEND command - AEN data format”, but the only thing you are allowed
to send during the data phase is sense data, which does not allow you to pass data packets
of any reasonable size. If you use a “SEND command”, there is no relationship to AEN.
When the target miniport receives a SEND operation, some component on the target has
to request a data out phase, and then send status back to the initiator. The miniport could
be this component, but it would have to put the data somewhere.
>
> At 09:46 PM 7/19/00 -0400, “Dave Harvey” wrote:
>
>
> >So lets say you send down some “special” SRB that requests incoming messages,
> >and is completed when those arrive. I guess that you could fake-out being a
> >target completely in the miniport. When the miniport receives a SEND
> >request, and
> >it has a special SRB, it does a dataphase to transfer the data to the
> >buffer. When that
> >completes, it sends status to the initiator and completes the SRB. So I
> >guess this will
> >work for the SEND operation. The key is that the miniport is the target,
> >and cannot
> >communicate with any other driver to do target functionality. It would
> >get extremely
> >messy (including lots of deadlocks) if you received an operation in the
> >miniport,
> >completed some SRB, then waited to send status to the initiator until some
> >other
> >driver sent you an SRB.
>
> I don’t understand this waiting and deadlock you are describing. The
> controller would receive the SEND, complete the SRB, and pass the data up,
> and then go back to whatever it was doing, such as processing other SRBs.
If the SRB sent down a buffer, and the miniport did the data out (direction is
from the point of view of the initiator) phase into this buffer, then sent status
to the initiator, then completed the SRB, this would work. If instead, the
miniport immediately completed the SRB, and waited for another SRB to
initiate the data out phase, and yet another to send status, then there are probably
deadlocks relating to this same MP acting as an initiator to send in the other direction.
>
>
> >You do have to implement all the receive NEXUS stuff, probably with
> >tags. The miniport
> >has to advertise that it is both target & initiator, and it must support
> >some basic operations
> >such as Inquiry. If you were serious about this, then there are issues
> >about when you do
> >a bus scan from the NDIS driver.
>
> Hrm… do HBAs typically give the driver that much control? From glancing
> at the sample miniports in the DDK, it looked like they more or less passed
> the SRB down to the board, and let it handle all of the bus
> protocol. About the inquiry command, I am thinking that is why the 2 cards
> did not see each other: they are not responding to the INQUIRY scsi command
> which is used to scan the bus. Do you think this could be corrected in the
> scsi miniport, or would it typically require a hardware/firmware fix on the
> board?
If you are using a parallel SCSI controller that has scripts, you probably would
need to write some new scripts that would allow the HBA to act as a target, since
it only acts as an initiator on NT. This would be a lot of work.
>
> At 10:41 PM 7/19/00 -0400, “Dave Harvey” wrote:
>
> >I certainly wasn’t intending on talking about disconnect/reconnect. I’m
> >trying to
> >talk about driver layering in NT, and where responsibility for target mode
> >would
> >have to go.
>
> By ‘target mode’ are you referring to something completely different than
> what I am talking about? That being an AEN in the form of a SEND command.
>
> > > Interestingly though, it is possible for a SCSI target to enter intiator
> > > mode and send a command to another target, without any host controller
> > > involvement whatsoever. This means that disk on SCSI ID2 could read the
> > > data directly off of SCSI ID3 if it felt like it!
> >To be picky, it cannot. A device can be a target, and initiator, or an
> >initiator/target.
> >A disk that reports itself as a target cannot initiate any requests. To
> >rephrase:
> >“it is possible for a SCSI device that mostly acts as a target to enter
> >intiator
> > mode and send a command to another target, without any host controller
> > involvement whatsoever.”
>
> From reading the SCSI-2 spec, any device can be a target simply by
> responding to commands from other devices, or an initiator by simply
> sending a command to another device. The only thing special about the HBA
> is what type of device it identifies itself as in the INQUIRY command,
> specifically, a processor, as opposed to say, a disk. Is this incorrect?
I was mixing in Fibre Channel rules, as far as I can tell.
-DH
>
>
> –>Phillip Susi
> xxxxx@iag.net
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@syssoftsol.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>