Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 1999 11:54:47 -0700 (MST)
From:      "Justin T. Gibbs" <gibbs@narnia.plutotech.com>
To:        "Kenneth D. Merry" <ken@plutotech.com>
Cc:        scsi@FreeBSD.org
Subject:   Re: CAM flags
Message-ID:  <199903251854.LAA35035@narnia.plutotech.com>
In-Reply-To: <199903251648.JAA86680@panzer.plutotech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <199903251648.JAA86680@panzer.plutotech.com> you wrote:
> amobbs@allstor-sw.co.uk wrote...
>> 
>> Could somebody please explain what effect "CAM_DEV_QFRZDIS" has, beyond
>> "Disable DEV Q freezing", i.e. what is "DEV Q freezing", do I want it
>> disabled, and if so, why?
> 
> Whenever an error occurs for a SCSI CCB, the command queue for the device
> in question is frozen until error recovery actions have completed.
> 
> If you're writing an application that goes through the passthrough driver,
> and you want to do your own error recovery, you'll probably want to disable
> queue freezing since you control your own queue of commands, and can do
> your own error recovery.

The choice of disabling freezing the queue really depends on how you
do your error recovery.  Having the queue frozen is almost essential
for an application that uses overlapped commands regardless of whether
they are a userland peripheral driver or one in the kernel.  Without
queue freezing, it is possible for a command queued after the one
that received the error to be sent to the device before your error
recovery routines can intervene.

Without overlapped commands, you may feel that having to issue an extra
ccb to unfreeze the queue for every error you encounter to be cumbersome.
We actually added the flag for use by applications that have no concept
of a frozen device queue, like cdrecord, at least until the application
can be modified to understand the way CAM works.

> Otherwise, you'll have to unfreeze the queue if an error occurs.  You can
> tell if the queue has been frozen by looking at the CAM_DEV_QFRZN bit of
> the status field in the CCB header.
> 
> This only applies when autosense is enabled, which is the default.  If
> autosense is disabled (CAM_DIS_AUTOSENSE), the controller won't freeze
> the queue in case of an error.

Not true.  The queue will be frozen on any error unless the command
requested that this feature be disabled.

--
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?199903251854.LAA35035>