Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2002 09:39:32 -0600
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        "Sabapathi, Vanishree" <vanis@lsil.com>, freebsd-scsi@FreeBSD.ORG
Subject:   Re: Reg: Reset and Abort Entry point in CAM scsi driver
Message-ID:  <3134680000.1029512372@aslan.scsiguy.com>
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E5701265BCC@EXA-ATLANTA.se.lsil.com>
References:   <0E3FA95632D6D047BA649F95DAB60E5701265BCC@EXA-ATLANTA.se.lsil.co m>

next in thread | previous in thread | raw e-mail | index | archive | help
> Hi,
> 	I would like to know when the Abort and reset entry point is called
> in a CAM-Scsi driver... These entry points are never getting called in my
> driver...
> I tried running i/o's on my disk and pulling the power of one of the disks
> on which the i/o was running...The i/o's were freezed on screen...  Now I
> expected XPT_ABORT/XPT_RESET entry points in my driver to be called... but
> my Driver's entry point was never called... ( I mean my driver was never
> called with any entry point)
> 
> Please advice if I should be doing something special to handle these
> cases..

FreeBSD != Linux.  The SIM drivers are responsible for honoring the timeout
field as specified in the CCB.  If you look at other SIM drivers in the
FreeBSD tree, you will see them either using the "timeout" function or
the "callout_reset" APIs.  See callout.9 for details.  When a SIM sees
a timeout, it is up to the SIM to determine what recovery actions are
required to restore operation.  This avoids lots of ugly issues with
timeouts managed by the upper SCSI layer:

1) When should the timeout be started?  Only the SIM knows when I/O is
   really started, so it should make that decision.

2) What if a timeout occurs just as a command completed?   Only the SIM
   can determine if this is the case and properly ignore the timeout and
   return the command as completed correctly.

3) How do you untangle the semantics of "abort" if it can either mean,
   abort this command because I'm no longer interested in it, or my
   watchdog timer expired so I'm just flailing about aborting stuff in
   the hopes that the SIM will restore bus operation.

For these and other reasons, the SIMS are responsible for timeout
management.

I would expect you to see an XPT_RESET ccb just after probe unless your
path inquiry data has PIM_NOBUSRESET set.

--
Justin

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?3134680000.1029512372>