* [PATCH] ieee1394: sbp2: pass REQUEST_SENSE through to the target
@ 2006-12-28 18:57 Stefan Richter
2006-12-28 20:21 ` Douglas Gilbert
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2006-12-28 18:57 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-scsi
Delete some incorrect code, left over from the initial driver submission
in March 2001.
SBP-2 targets should provide sense data via the SBP-2 status block
(autosense). We have to pass the REQUEST_SENSE command through to
targets which don't implement autosense, if there are any.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
Index: linux/drivers/ieee1394/sbp2.c
===================================================================
--- linux.orig/drivers/ieee1394/sbp2.c
+++ linux/drivers/ieee1394/sbp2.c
@@ -1880,16 +1880,6 @@ static int sbp2scsi_queuecommand(struct
if (unlikely(SCpnt->device->lun))
goto done;
- /* handle the request sense command here (auto-request sense) */
- if (SCpnt->cmnd[0] == REQUEST_SENSE) {
- memcpy(SCpnt->request_buffer, SCpnt->sense_buffer,
- SCpnt->request_bufflen);
- memset(SCpnt->sense_buffer, 0, sizeof(SCpnt->sense_buffer));
- sbp2scsi_complete_command(lu, SBP2_SCSI_STATUS_GOOD, SCpnt,
- done);
- return 0;
- }
-
if (unlikely(!hpsb_node_entry_valid(lu->ne))) {
SBP2_ERR("Bus reset in progress - rejecting command");
result = DID_BUS_BUSY << 16;
--
Stefan Richter
-=====-=-==- ==-- ===--
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ieee1394: sbp2: pass REQUEST_SENSE through to the target
2006-12-28 18:57 [PATCH] ieee1394: sbp2: pass REQUEST_SENSE through to the target Stefan Richter
@ 2006-12-28 20:21 ` Douglas Gilbert
2006-12-28 20:54 ` Matthew Wilcox
2006-12-28 22:38 ` Stefan Richter
0 siblings, 2 replies; 4+ messages in thread
From: Douglas Gilbert @ 2006-12-28 20:21 UTC (permalink / raw)
To: Stefan Richter; +Cc: linux1394-devel, linux-scsi
Stefan Richter wrote:
> Delete some incorrect code, left over from the initial driver submission
> in March 2001.
>
> SBP-2 targets should provide sense data via the SBP-2 status block
> (autosense). We have to pass the REQUEST_SENSE command through to
> targets which don't implement autosense, if there are any.
Umm, REQUEST SENSE has several other useful capabilities.
It can convey information about low power conditions,
a progress indicator (e.g. during FORMAT with IMMED=1)
and informational exception warnings. It is also
defined to work any time INQUIRY works (e.g. on lun=0
when there is no lu there but there is a lun>0).
smartmontools sets MRIE to 6 in the control mode page so
it can periodically poll a disk with REQUEST SENSE to see
if it has tripped a threshold . It could use other techniques
but they would most likely interfere with normal error
processing on the host OS (and linux is one of about 8).
So, this patch is a step in the right direction.
Hopefully not too many other LLDs are playing
games with REQUEST SENSE.
Doug Gilbert
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ieee1394: sbp2: pass REQUEST_SENSE through to the target
2006-12-28 20:21 ` Douglas Gilbert
@ 2006-12-28 20:54 ` Matthew Wilcox
2006-12-28 22:38 ` Stefan Richter
1 sibling, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2006-12-28 20:54 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: Stefan Richter, linux1394-devel, linux-scsi
On Thu, Dec 28, 2006 at 03:21:45PM -0500, Douglas Gilbert wrote:
> So, this patch is a step in the right direction.
> Hopefully not too many other LLDs are playing
> games with REQUEST SENSE.
A lot of drivers play games with REQUEST_SENSE, but they mostly seem to
be doing things with their own internal state. One suspicious one is
BusLogic.c :
/*
SCSI REQUEST_SENSE commands will be executed automatically by the Host
Adapter for any errors, so they should not be executed explicitly unless
the Sense Data is zero indicating that no error occurred.
*/
if (CDB[0] == REQUEST_SENSE && Command->sense_buffer[0] != 0) {
Command->result = DID_OK << 16;
CompletionRoutine(Command);
return 0;
}
I don't know if this is OK for your scenario or not.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ieee1394: sbp2: pass REQUEST_SENSE through to the target
2006-12-28 20:21 ` Douglas Gilbert
2006-12-28 20:54 ` Matthew Wilcox
@ 2006-12-28 22:38 ` Stefan Richter
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Richter @ 2006-12-28 22:38 UTC (permalink / raw)
To: dougg; +Cc: linux1394-devel, linux-scsi
Douglas Gilbert wrote:
> Stefan Richter wrote:
>> Delete some incorrect code, left over from the initial driver submission
>> in March 2001.
>>
>> SBP-2 targets should provide sense data via the SBP-2 status block
>> (autosense). We have to pass the REQUEST_SENSE command through to
>> targets which don't implement autosense, if there are any.
>
> Umm, REQUEST SENSE has several other useful capabilities.
[...]
Well, my patch description might be misleading as REQUEST SENSE is now
going through sbp2 regardless of device capabilities. I'll chose a
better wording when pushing this upstream.
--
Stefan Richter
-=====-=-==- ==-- ===--
http://arcgraph.de/sr/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-28 22:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-28 18:57 [PATCH] ieee1394: sbp2: pass REQUEST_SENSE through to the target Stefan Richter
2006-12-28 20:21 ` Douglas Gilbert
2006-12-28 20:54 ` Matthew Wilcox
2006-12-28 22:38 ` Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox