From: "Ewan D. Milne" <emilne@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
Date: Mon, 06 Jun 2016 10:11:39 -0400 [thread overview]
Message-ID: <1465222299.20724.114.camel@localhost.localdomain> (raw)
In-Reply-To: <5755278E.8040002@suse.de>
On Mon, 2016-06-06 at 09:34 +0200, Hannes Reinecke wrote:
> On 05/31/2016 03:42 PM, Ewan D. Milne wrote:
> > Linux fails to boot as a guest with a QEMU CD-ROM:
> >
> > [ 4.439488] ata2.00: ATAPI: QEMU CD-ROM, 0.8.2, max UDMA/100
> > [ 4.443649] ata2.00: configured for MWDMA2
> > [ 4.450267] scsi 1:0:0:0: CD-ROM QEMU QEMU CD-ROM 0.8. PQ: 0 ANSI: 5
> > [ 4.464317] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
> > [ 4.464319] ata2.00: BMDMA stat 0x5
> > [ 4.464339] ata2.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 0 dma 16640 in
> > [ 4.464339] Inquiry 12 01 00 00 ff 00res 48/20:02:00:24:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation)
> > [ 4.464341] ata2.00: status: { DRDY DRQ }
> > [ 4.465864] ata2: soft resetting link
> > [ 4.625971] ata2.00: configured for MWDMA2
> > [ 4.628290] ata2: EH complete
> > [ 4.646670] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
> > [ 4.646671] ata2.00: BMDMA stat 0x5
> > [ 4.646683] ata2.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 0 dma 16640 in
> > [ 4.646683] Inquiry 12 01 00 00 ff 00res 48/20:02:00:24:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation)
> > [ 4.646685] ata2.00: status: { DRDY DRQ }
> > [ 4.648193] ata2: soft resetting link
> >
> > ...
> >
> > Fix this by suppressing VPD inquiry for this device.
> >
> > Reported-by: Jan Stancek <jstancek@redhat.com>
> > Tested-by: Jan Stancek <jstancek@redhat.com>
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Ewan D. Milne <emilne@redhat.com>
> > ---
> > drivers/scsi/scsi_devinfo.c | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
> > index bbfbfd9..09bbd3f 100644
> > --- a/drivers/scsi/scsi_devinfo.c
> > +++ b/drivers/scsi/scsi_devinfo.c
> > @@ -228,6 +228,7 @@ static struct {
> > {"PIONEER", "CD-ROM DRM-624X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
> > {"Promise", "VTrak E610f", NULL, BLIST_SPARSELUN | BLIST_NO_RSOC},
> > {"Promise", "", NULL, BLIST_SPARSELUN},
> > + {"QEMU", "QEMU CD-ROM", NULL, BLIST_SKIP_VPD_PAGES},
> > {"QNAP", "iSCSI Storage", NULL, BLIST_MAX_1024},
> > {"SYNOLOGY", "iSCSI Storage", NULL, BLIST_MAX_1024},
> > {"QUANTUM", "XP34301", "1071", BLIST_NOTQ},
> >
> This doesn't apply to all versions of QEMU (upstream qemu works fine),
> so at the very least it needs to be restricted to a specific version.
Well, the "0.8." version shown above definitely didn't work.
>
> At the same time I'd _rather_ like to figure out why things break in the
> first place.
> QEMU CD-ROM claims to support SPC-3, for which VPD pages are mandatory.
> So why is this error generated?
Not sure why the error is generated, but if it is, we can't keep sending
the commands, the guest won't boot. I guess the real problem is do we
want to keep finding the problem devices one-by-one, or should we put in
some logic to e.g. avoid re-reading the VPD pages on rescan if the
initial scan didn't work. Seems like a lot of trouble, though, for a
broken device, and that's what the blacklist is for.
>
> Either way, this patch is wrong.
If we can identify which versions work, we can update it. Otherwise
I think we have to be conservative.
>
> NACK.
>
> Cheers,
>
> Hannes
next prev parent reply other threads:[~2016-06-06 14:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 13:42 [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist Ewan D. Milne
2016-05-31 13:43 ` Johannes Thumshirn
2016-06-03 3:19 ` Tom Yan
[not found] ` <CAGnHSEmS7NzEFK7uD357r6Y=xU5o1O0i+AU5qhmqcqjmp_K0Lw@mail.gmail.com>
2016-06-03 14:36 ` Ewan D. Milne
2016-06-03 19:14 ` Tom Yan
2016-06-03 19:19 ` Ewan D. Milne
2016-06-03 21:14 ` Bart Van Assche
2016-06-06 7:34 ` Hannes Reinecke
2016-06-06 14:11 ` Ewan D. Milne [this message]
2016-06-06 14:22 ` Hannes Reinecke
2016-06-06 15:05 ` Paolo Bonzini
2016-06-06 15:41 ` John Snow
2016-06-06 15:43 ` Paolo Bonzini
2016-06-06 15:47 ` John Snow
2016-06-06 16:03 ` Paolo Bonzini
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=1465222299.20724.114.camel@localhost.localdomain \
--to=emilne@redhat.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
/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).