Linux SCSI subsystem development
 help / color / mirror / Atom feed
* sense buffer length for REQUEST SENSE?
@ 2002-07-27  3:03 Luben Tuikov
  2002-07-27  4:47 ` Douglas Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Luben Tuikov @ 2002-07-27  3:03 UTC (permalink / raw)
  To: linux-scsi

The sense buffer size is 64 bytes.

According to SAM-3, to make sure that that an application
client has gotten all the sense data the sense buffer
should be 252 bytes.

How safe am I to actually set the allocation length
to 252 bytes? (in terms of borken hardware devices, etc.)

-- 
Luben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sense buffer length for REQUEST SENSE?
  2002-07-27  4:47 ` Douglas Gilbert
@ 2002-07-27  3:57   ` Matthew Jacob
  2002-07-27  8:50   ` Steve McIntyre
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Jacob @ 2002-07-27  3:57 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: Luben Tuikov, linux-scsi


> Yes I can see that number in SPC-3. Has anyone every seen
> an actual REQUEST SENSE response (sense buffer) anywhere near 
> that size? The new "descriptor" sense data format should
> further reduce the size requirement.

Some specialized RAID units do this, IIRC. Very rare.

Every now and then I get a Fibre Channel disk that actually sends back via the
QLogic HBA several continuation responses- that means the sense data is > 64
bytes.

I wouldn't expect this to be anything but rare. Even if you have such data,
it's probably very application specific that you'd *do* anything with it. I
would think 64 is fine. Perhaps one should architect an exception condition
that is similar to AUTOSENSE FAILED, i.e. AUTOSENSE OVERFLOW- it's up to the
HBA to store the 252 bytes of data somewhere until a REQUEST SENSE comes down
to pick it up. And the REQUEST SENSE can have more than enough data space
allocated.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sense buffer length for REQUEST SENSE?
  2002-07-27  3:03 sense buffer length for REQUEST SENSE? Luben Tuikov
@ 2002-07-27  4:47 ` Douglas Gilbert
  2002-07-27  3:57   ` Matthew Jacob
  2002-07-27  8:50   ` Steve McIntyre
  0 siblings, 2 replies; 4+ messages in thread
From: Douglas Gilbert @ 2002-07-27  4:47 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: linux-scsi

Luben Tuikov wrote:
> 
> The sense buffer size is 64 bytes.

I can plead guilty to that. A finger in the air trade off
between the standard ** and reality. It previously was 16
bytes (changed in lk 2.3 I think). At 64 bytes it matches 
the size of the Scsi_Cmnd::sense_buffer array 
(and Scsi_Request::sr_sense_buffer).
 
> According to SAM-3, to make sure that that an application

SAM-3 is new (it branched off recently from SAM-2) and adds
SAS to its protocol tables. SAS is SCSI over Serial ATA
type infrastructure ... SAS may displace Ultra 640.

> client has gotten all the sense data the sense buffer
> should be 252 bytes.

Yes I can see that number in SPC-3. Has anyone every seen
an actual REQUEST SENSE response (sense buffer) anywhere near 
that size? The new "descriptor" sense data format should
further reduce the size requirement.
 
> How safe am I to actually set the allocation length
> to 252 bytes? (in terms of borken hardware devices, etc.)

Following the lead from 36 byte INQUIRYs, what does Windows
do?

BTW I have not seen a report of the current 64 byte allocation
length causing a problem.

** SCSI-2 said 18 bytes or greater and now SPC-3 says at least
   252 bytes.

Doug Gilbert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sense buffer length for REQUEST SENSE?
  2002-07-27  4:47 ` Douglas Gilbert
  2002-07-27  3:57   ` Matthew Jacob
@ 2002-07-27  8:50   ` Steve McIntyre
  1 sibling, 0 replies; 4+ messages in thread
From: Steve McIntyre @ 2002-07-27  8:50 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: linux-scsi

On Sat, Jul 27, 2002 at 12:47:17AM -0400, Douglas Gilbert wrote:
>Luben Tuikov wrote:
>> client has gotten all the sense data the sense buffer
>> should be 252 bytes.
>
>Yes I can see that number in SPC-3. Has anyone every seen
>an actual REQUEST SENSE response (sense buffer) anywhere near 
>that size? The new "descriptor" sense data format should
>further reduce the size requirement.

Looking at the SCSI spec of a 12" WORM autoloader I've worked with, it
uses up to 246 bytes...

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
Support the Campaign for Audiovisual Free Expression: http://www.eff.org/cafe/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-07-27  8:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-27  3:03 sense buffer length for REQUEST SENSE? Luben Tuikov
2002-07-27  4:47 ` Douglas Gilbert
2002-07-27  3:57   ` Matthew Jacob
2002-07-27  8:50   ` Steve McIntyre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox