public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: James Bottomley <James.Bottomley@SteelEye.com>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Russell King <rmk@arm.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Subject: [PATCH 5/5] arm: fas216 Use scsi_eh API for REQUEST_SENSE invocation
Date: Mon, 10 Sep 2007 17:29:22 +0300	[thread overview]
Message-ID: <46E554C2.6020804@panasas.com> (raw)
In-Reply-To: <46E5508B.7030108@panasas.com>


  - Use new scsi_eh_prep/restor_cmnd() for synchronous
    REQUEST_SENSE invocation.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
 drivers/scsi/arm/fas216.c |    5 ++---
 drivers/scsi/arm/fas216.h |    3 +++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c
index fb5f202..d80702b 100644
--- a/drivers/scsi/arm/fas216.c
+++ b/drivers/scsi/arm/fas216.c
@@ -2018,6 +2018,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt,
 	 * the upper layers to process.  This would have been set
 	 * correctly by fas216_std_done.
 	 */
+	scsi_eh_restore_cmnd(SCpnt, &info->sesci);
 	SCpnt->scsi_done(SCpnt);
 }
 
@@ -2103,6 +2104,7 @@ request_sense:
 	if (SCpnt->cmnd[0] == REQUEST_SENSE)
 		goto done;
 
+	scsi_eh_prep_cmnd(SCpnt, &info->sesci, NULL, 0, 1);
 	fas216_log_target(info, LOG_CONNECT, SCpnt->device->id,
 			  "requesting sense");
 	memset(SCpnt->cmnd, 0, sizeof (SCpnt->cmnd));
@@ -2117,9 +2119,6 @@ request_sense:
 	SCpnt->SCp.phase = sizeof(SCpnt->sense_buffer);
 	SCpnt->SCp.Message = 0;
 	SCpnt->SCp.Status = 0;
-	SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
-	SCpnt->sc_data_direction = DMA_FROM_DEVICE;
-	SCpnt->use_sg = 0;
 	SCpnt->tag = 0;
 	SCpnt->host_scribble = (void *)fas216_rq_sns_done;
 
diff --git a/drivers/scsi/arm/fas216.h b/drivers/scsi/arm/fas216.h
index 00e5f05..8449416 100644
--- a/drivers/scsi/arm/fas216.h
+++ b/drivers/scsi/arm/fas216.h
@@ -16,6 +16,8 @@
 #define NO_IRQ 255
 #endif
 
+#include <scsi/scsi_eh.h>
+
 #include "queue.h"
 #include "msgqueue.h"
 
@@ -311,6 +313,7 @@ typedef struct {
 
 	/* miscellaneous */
 	int			internal_done;		/* flag to indicate request done */
+	struct scsi_eh_save_cmnd_info *sesci;		/* holds request sense restore info */
 	unsigned long		magic_end;
 } FAS216_Info;
 
-- 
1.5.3.1



  parent reply	other threads:[~2007-09-10 14:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 14:11 [patchset 0/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 14:21 ` [PATCH 1/5] scsi_error: code cleanup before refactoring of scsi_send_eh_cmnd() Boaz Harrosh
2007-09-10 14:23 ` [PATCH 2/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 15:12   ` Christoph Hellwig
2007-09-10 15:19   ` Randy Dunlap
2007-09-10 14:25 ` [PATCH 3/5] usb: transport.c use scsi_eh API in REQUEST_SENSE execution Boaz Harrosh
2007-09-10 14:25 ` [PATCH 4/5] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation Boaz Harrosh
2007-09-10 14:29 ` Boaz Harrosh [this message]
2007-09-10 15:58 ` [patchset 0/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Alan Stern
2007-09-10 17:03 ` Matthew Dharm
2007-09-10 17:09   ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46E554C2.6020804@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox