From: Benny Halevy <bhalevy@panasas.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Boaz Harrosh <bharrosh@panasas.com>,
James Bottomley <James.Bottomley@SteelEye.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
linux-scsi <linux-scsi@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@suse.de>,
Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
Christoph Hellwig <hch@infradead.org>,
Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: [PATCH ver2 5/5] arm: fas216 Use scsi_eh API for REQUEST_SENSE invocation
Date: Wed, 12 Sep 2007 11:15:36 +0300 [thread overview]
Message-ID: <46E7A028.9020609@panasas.com> (raw)
In-Reply-To: <20070912074434.GC2653@flint.arm.linux.org.uk>
Russell King wrote:
> On Mon, Sep 10, 2007 at 10:39:11PM +0300, Boaz Harrosh wrote:
>
>> - 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 | 16 +++-------------
>> drivers/scsi/arm/fas216.h | 3 +++
>> 2 files changed, 6 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c
>> index fb5f202..a715632 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->ses);
>> SCpnt->scsi_done(SCpnt);
>> }
>>
>> @@ -2103,23 +2104,12 @@ request_sense:
>> if (SCpnt->cmnd[0] == REQUEST_SENSE)
>> goto done;
>>
>> + scsi_eh_prep_cmnd(SCpnt, &info->ses, NULL, 0, ~0);
>> fas216_log_target(info, LOG_CONNECT, SCpnt->device->id,
>> "requesting sense");
>> - memset(SCpnt->cmnd, 0, sizeof (SCpnt->cmnd));
>> - SCpnt->cmnd[0] = REQUEST_SENSE;
>> - SCpnt->cmnd[1] = SCpnt->device->lun << 5;
>> - SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
>> - SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
>> - SCpnt->SCp.buffer = NULL;
>> - SCpnt->SCp.buffers_residual = 0;
>> - SCpnt->SCp.ptr = (char *)SCpnt->sense_buffer;
>> - SCpnt->SCp.this_residual = sizeof(SCpnt->sense_buffer);
>> - SCpnt->SCp.phase = sizeof(SCpnt->sense_buffer);
>> + init_SCp(SCpnt);
>> 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;
>>
>
> So where do we end up setting up the request sense command?
>
>
In scsi_eh_prep_cmnd(), when (sense_bytes != 0), called here:
+ scsi_eh_prep_cmnd(SCpnt, &info->ses, NULL, 0, ~0);
prev parent reply other threads:[~2007-09-12 8:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 19:13 [patchset ver2 0/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 19:34 ` [PATCH ver2 1/5] scsi_error: code cleanup before refactoring of scsi_send_eh_cmnd() Boaz Harrosh
2007-09-11 8:03 ` [PATCH ver3 " Boaz Harrosh
2007-09-11 8:11 ` Julian Calaby
2007-09-11 8:54 ` Benny Halevy
2007-09-11 15:41 ` Alan Stern
2007-09-11 17:38 ` Boaz Harrosh
2007-09-11 17:39 ` [PATCH ver4 " Boaz Harrosh
2007-10-03 15:55 ` James Bottomley
2007-10-08 14:29 ` Boaz Harrosh
2007-10-08 14:35 ` [PATCH ver5 " Boaz Harrosh
2007-09-10 19:35 ` [PATCH ver2 2/5] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 21:15 ` Matthew Dharm
2007-09-11 8:00 ` Boaz Harrosh
2007-09-11 8:04 ` [PATCH ver3 " Boaz Harrosh
2007-10-03 15:59 ` James Bottomley
2007-10-08 14:36 ` [PATCH ver5 " Boaz Harrosh
2007-09-10 19:36 ` [PATCH ver2 3/5] usb: transport.c use scsi_eh API in REQUEST_SENSE execution Boaz Harrosh
2007-09-10 19:37 ` [PATCH ver2 4/5] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation Boaz Harrosh
2007-09-10 19:39 ` [PATCH ver2 5/5] arm: fas216 " Boaz Harrosh
2007-09-12 7:44 ` Russell King
2007-09-12 8:15 ` Benny Halevy [this message]
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=46E7A028.9020609@panasas.com \
--to=bhalevy@panasas.com \
--cc=James.Bottomley@SteelEye.com \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=gregkh@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=rdunlap@xenotime.net \
--cc=rmk@arm.linux.org.uk \
--cc=stern@rowland.harvard.edu \
/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;
as well as URLs for NNTP newsgroup(s).