From: Hannes Reinecke <hare@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
linux-iscsi-target-dev@googlegroups.com
Subject: Re: [Qemu-devel] Re: [PATCH] scsi-generic: bugfixes for 'SCSIRequest' conversion
Date: Thu, 25 Nov 2010 10:06:44 +0100 [thread overview]
Message-ID: <4CEE2724.6000801@suse.de> (raw)
In-Reply-To: <1290675704.32570.114.camel@pasglop>
On 11/25/2010 10:01 AM, Benjamin Herrenschmidt wrote:
> On Thu, 2010-11-25 at 09:50 +0100, Gerd Hoffmann wrote:
>> On 11/25/10 09:46, Benjamin Herrenschmidt wrote:
>>
>>> So far tho, it appears that I can (at least with scsi-disk) rely on
>>> always been eventually called with SCSI_REASON_DONE so my code (and
>>> maybe the usb-msd code too, I haven't verified) relies on that to
>>> complete requests... Is that incorrect ?
>>
>> Yes.
>
> Well, so far it works :-) But I suppose I must be lucky.. I must admit
> that it's very unclear how that SCSI "stack" is meant to be used from
> the HBA standpoint.
>
> Right now, I've somewhat come up with:
>
> - client request occurs
> - call device send_command()
> - if result is 0, assume my complete() was called with
> SCSI_REASON_DONE
> - else, use sign of result for transfer direction, store the
> absolute value as the total expected transfer len and call
> the device scsi_data_read()/write() and wait for complete()
> - when complete() is called:
> - if SCSI_REASON_DONE, complete client request
> - else perform the client "DMA" for "arg" bytes
> - call the device scsi_data_read()/write() again
>
No, this is exactly as I'm expecting the SCSI layer to work.
So from the light of this the patch to scsi-generic is valid.
And it really looks like papering over a bug in the lsi HBA code.
Gerd?
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
next prev parent reply other threads:[~2010-11-25 9:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 8:18 [Qemu-devel] [PATCH] scsi-generic: bugfixes for 'SCSIRequest' conversion Nicholas A. Bellinger
2010-11-24 8:57 ` [Qemu-devel] " Hannes Reinecke
2010-11-24 8:57 ` Nicholas A. Bellinger
2010-11-24 9:04 ` Kevin Wolf
2010-11-24 10:16 ` Hannes Reinecke
2010-11-24 10:34 ` Kevin Wolf
2010-11-24 10:46 ` Hannes Reinecke
2010-11-25 8:46 ` Benjamin Herrenschmidt
2010-11-25 8:50 ` Gerd Hoffmann
2010-11-25 9:01 ` Benjamin Herrenschmidt
2010-11-25 9:06 ` Hannes Reinecke [this message]
2010-11-25 9:07 ` Benjamin Herrenschmidt
2010-11-25 9:25 ` Gerd Hoffmann
2010-12-16 1:58 ` Benjamin Herrenschmidt
2010-11-24 10:53 ` Nicholas A. Bellinger
2010-12-21 1:49 ` Benjamin Herrenschmidt
2010-12-23 21:58 ` Nicholas A. Bellinger
2011-01-13 14:59 ` Kevin Wolf
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=4CEE2724.6000801@suse.de \
--to=hare@suse.de \
--cc=benh@kernel.crashing.org \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=linux-iscsi-target-dev@googlegroups.com \
--cc=nab@linux-iscsi.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.