From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Hannes Reinecke <hare@suse.de>
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, 16 Dec 2010 12:58:31 +1100 [thread overview]
Message-ID: <1292464711.16694.514.camel@pasglop> (raw)
In-Reply-To: <4CECED12.5020109@suse.de>
> > The commit message of this commit says it's a workaround for a problem
> > with lsi:
> >
> >> - when a read is aborted due to a mark/EOF/EOD/EOM, the len reported to
> >> controller can be 0. LSI controller emulation doesn't know how to manage
> >> this. A workaround found is to call the completion routine with
> >> SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with len=0.
> >
> > Are you sure that it's not needed any more?
> >
> Don't ask me. I didn't do the patch, and my knowledge of lsi HBA
> internals is scanty.
> Nic, can you comment here?
Back to this topic...
On my current WIP code, currently based on qemu upstream commit
f711df67d611e4762966a249742a5f7499e19f99, I've just observed the
following behaviour:
Use -cdrom /dev/cdrom (which points to /dev/sr0)
No disk in the drive, scsi-disk kicks in. test-unit-ready properly says
there's no medium, so far so good.
Now, my (buggy) guest code tries to do a READ_10. At this point, qemu
hangs. What happens is that my scsi complete callback get called with
reason 1 (DATA) and arg 0. I then perform no data copy, and call back
sdev->info->read_data() which eventually calls me back again with reason
1 and arg 0, etc... in a loop.
I haven't had a chance yet to look at what's happening in the guts of
scsi-disk, but here, either I'm supposed to special case DATA with 0
bytes requested in my HBA driver, or there's a bug in scsi-disk.
I can work around it by doing a cancel_io in that case and then
completing the request is if reason had been 0 (DONE) but that's of
course just a band-aid.
I'll let you know what I find out when I get a chance to look at this
again (hopefully soon).
Cheers,
Ben.
next prev parent reply other threads:[~2010-12-16 1:58 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
2010-11-25 9:07 ` Benjamin Herrenschmidt
2010-11-25 9:25 ` Gerd Hoffmann
2010-12-16 1:58 ` Benjamin Herrenschmidt [this message]
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=1292464711.16694.514.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=hare@suse.de \
--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 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).