test at Target mode

Kayoko Isshi isshi at cs.fujitsu.co.jp
Fri Jul 13 03:51:17 PDT 2001


M.Gibbs:

Thank you for an immediate answer.

"Justin T. Gibbs" wrote:

> >Dear ML-members:
> >
> >I have tested (new) AIC7xxx driver(6.1.13) at target mode.
> >
> >In this ML, target driver has few disccusion.
> >The followings will be unuseful for almost people.
> >But I will mail because we need the best target driver for AIC7xxx.
>
> The target mode support for the AIC7XXX driver was designed and
> only tested under FreeBSD.  Most if not all of the issues you
> list in this mail are due to expectations of how the OSM layer
> of the driver will setup SCBs and or handle certain types of
> events.

I recognize again that Linux receives a lot of properties from FreeBSD.

> >Changed:
> >1)At first,I get compiled errors when I forced targe mode enable.
> >    #define AHC_TARGET_MODE 1
> >    ->Maybe some definitions for upper driver interface incompletely
> >provided.
> >    Therefore I left TARGET_MODE disable.
>
> As noted above, the interface is for FreeBSD only.  FreeBSD's SCSI
> layer (CAM) has explicit support for target mode operations.  Linux
> has yet to gain such features.

Is that difficult to realize under Linux?
For example,new upper driver will support new target driver interface.

> >2)Once a BusReset occurred,following BusReset is ignored.
> >    ->I forced to set ENSCSIRST bit in SIMODE1(ahc_restart).
> >    I set ENRSTI bit in SCSISEQ_TEMPLATE,but that's no effect.
>
> This is by design.  Bus resets are only of interest when:
>
> 1) This is the first bus reset since power on.
>
> 2) We have outstanding commands as either a target or an initiator.
>
> So, once we see a bus reset, we disable them until the next outgoing
> (as initiator) or incoming (as target) command.  This prevents the
> driver from being held hostage to a third party holding the reset
> line for extrememly long periods of time which would result in an
> interrupt storm.  Semantically, there is no difference if we ignore
> any of these "extra" bus resets.

Sorry.
Your design is right:target driver should reset only once.
After that,I read the comment about BusReset in sequencer code,and I got it.

> >5)Sequencer code)At no disconnect mode(MsgOut=80),data phase stopped in
> >DT mode.
> >    ->calling set_trasfer_settings before changing data phase will be
> >needed.
>
> Actually, this is handled by the kernel driver rather than consume
> code in the sequencer.  The sequencer is already paused and we have
> to write to card registers anyway, so setting two more is cheaper
> than adding more sequencer instructions.

That's the best,I think so.

> >6)Sequencer code)When set DISCENB in SCB_CONTROL and reconnected,
> >MegOut=8x sent.
> >    ->setting MSG_IDENTIFY_DISCFLAG added.
>
> The format of target SCBs is different than for normal SCBs.  See
> the FreeBSD driver for details:
>
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/aic7xxx

I found no MSG_IDENTIFY_DISCFLAG in aic7xxx_freebsd.c.
I guess that MSG_IDENTIFY_DISCFLAG bit should be included in SCB_LUN.
Is that right?

Thanks.
------------
Kayoko Isshi


To Unsubscribe: send mail to majordomo at FreeBSD.org
with "unsubscribe aic7xxx" in the body of the message




More information about the aic7xxx mailing list