All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
@ 2016-05-31 13:42 Ewan D. Milne
  2016-05-31 13:43 ` Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Ewan D. Milne @ 2016-05-31 13:42 UTC (permalink / raw)
  To: linux-scsi

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},
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  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 21:14 ` Bart Van Assche
  2016-06-06  7:34 ` Hannes Reinecke
  2 siblings, 2 replies; 15+ messages in thread
From: Johannes Thumshirn @ 2016-05-31 13:43 UTC (permalink / raw)
  To: Ewan D. Milne; +Cc: linux-scsi

On Tue, May 31, 2016 at 09:42:29AM -0400, 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>

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-05-31 13:43 ` Johannes Thumshirn
@ 2016-06-03  3:19   ` Tom Yan
       [not found]   ` <CAGnHSEmS7NzEFK7uD357r6Y=xU5o1O0i+AU5qhmqcqjmp_K0Lw@mail.gmail.com>
  1 sibling, 0 replies; 15+ messages in thread
From: Tom Yan @ 2016-06-03  3:19 UTC (permalink / raw)
  To: Johannes Thumshirn; +Cc: Ewan D. Milne, linux-scsi

Why not get qemu have it fixed instead?

On 31 May 2016 at 21:43, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Tue, May 31, 2016 at 09:42:29AM -0400, 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>
>
> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
>
> --
> Johannes Thumshirn                                          Storage
> jthumshirn@suse.de                                +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)
> Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
       [not found]   ` <CAGnHSEmS7NzEFK7uD357r6Y=xU5o1O0i+AU5qhmqcqjmp_K0Lw@mail.gmail.com>
@ 2016-06-03 14:36     ` Ewan D. Milne
  2016-06-03 19:14       ` Tom Yan
  0 siblings, 1 reply; 15+ messages in thread
From: Ewan D. Milne @ 2016-06-03 14:36 UTC (permalink / raw)
  To: Tom Yan; +Cc: Johannes Thumshirn, linux-scsi

This is an existing configuration that broke with the VPD rescan
changes.  The problem is that the error causes a rescan to be
initiated, which results in endless error messages.

On Fri, 2016-06-03 at 03:15 +0000, Tom Yan wrote:
> Why not get qemu have it fixed instead?
> 
> On Tuesday, 31 May 2016, Johannes Thumshirn <jthumshirn@suse.de>
> wrote:
>         On Tue, May 31, 2016 at 09:42:29AM -0400, 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>
>         
>         Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
>         
>         --
>         Johannes Thumshirn
>         Storage
>         jthumshirn@suse.de                                +49 911
>         74053 689
>         SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
>         GF: Felix Imendörffer, Jane Smithard, Graham Norton
>         HRB 21284 (AG Nürnberg)
>         Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76
>         0850
>         --
>         To unsubscribe from this list: send the line "unsubscribe
>         linux-scsi" in
>         the body of a message to majordomo@vger.kernel.org
>         More majordomo info at
>         http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-03 14:36     ` Ewan D. Milne
@ 2016-06-03 19:14       ` Tom Yan
  2016-06-03 19:19         ` Ewan D. Milne
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Yan @ 2016-06-03 19:14 UTC (permalink / raw)
  To: Ewan D. Milne; +Cc: Johannes Thumshirn, linux-scsi

What changes are you referring to? Doesn't that mean the changes are
flawed and some actual follow-up fixes are needed instead?

On 3 June 2016 at 22:36, Ewan D. Milne <emilne@redhat.com> wrote:
> This is an existing configuration that broke with the VPD rescan
> changes.  The problem is that the error causes a rescan to be
> initiated, which results in endless error messages.
>
> On Fri, 2016-06-03 at 03:15 +0000, Tom Yan wrote:
>> Why not get qemu have it fixed instead?
>>
>> On Tuesday, 31 May 2016, Johannes Thumshirn <jthumshirn@suse.de>
>> wrote:
>>         On Tue, May 31, 2016 at 09:42:29AM -0400, 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>
>>
>>         Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
>>
>>         --
>>         Johannes Thumshirn
>>         Storage
>>         jthumshirn@suse.de                                +49 911
>>         74053 689
>>         SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
>>         GF: Felix Imendörffer, Jane Smithard, Graham Norton
>>         HRB 21284 (AG Nürnberg)
>>         Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76
>>         0850
>>         --
>>         To unsubscribe from this list: send the line "unsubscribe
>>         linux-scsi" in
>>         the body of a message to majordomo@vger.kernel.org
>>         More majordomo info at
>>         http://vger.kernel.org/majordomo-info.html
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-03 19:14       ` Tom Yan
@ 2016-06-03 19:19         ` Ewan D. Milne
  0 siblings, 0 replies; 15+ messages in thread
From: Ewan D. Milne @ 2016-06-03 19:19 UTC (permalink / raw)
  To: Tom Yan; +Cc: Johannes Thumshirn, linux-scsi

commit 09e2b0b14690fb13ccfc04af49f156df3e25b152
Author: Hannes Reinecke <hare@suse.de>
Date:   Mon Nov 9 13:24:28 2015 +0100

    scsi: rescan VPD attributes

---
see also:

commit 5ddfe0858ea7848c5d4efe3f4319e7543522e0ee
Author: Hannes Reinecke <hare@suse.de>
Date:   Fri Apr 1 08:57:36 2016 +0200

    scsi: Do not attach VPD to devices that don't support it

commit 82c43310508eb19eb41fe7862e89afeb74030b84
Author: Mika Westerberg <mika.westerberg@linux.intel.com>
Date:   Wed Jan 27 16:19:13 2016 +0200

    SCSI: Add Marvell Console to VPD blacklist

and presumably:

commit fb2d65d28918ef4f0caa1de3d8c7416949c28b41
Author: Todd Fujinaka <todd.fujinaka@intel.com>
Date:   Tue Feb 9 21:02:07 2016 -0500

    SCSI: Add Marvell configuration device to VPD blacklist


On Sat, 2016-06-04 at 03:14 +0800, Tom Yan wrote:
> What changes are you referring to? Doesn't that mean the changes are
> flawed and some actual follow-up fixes are needed instead?
> 
> On 3 June 2016 at 22:36, Ewan D. Milne <emilne@redhat.com> wrote:
> > This is an existing configuration that broke with the VPD rescan
> > changes.  The problem is that the error causes a rescan to be
> > initiated, which results in endless error messages.
> >
> > On Fri, 2016-06-03 at 03:15 +0000, Tom Yan wrote:
> >> Why not get qemu have it fixed instead?
> >>
> >> On Tuesday, 31 May 2016, Johannes Thumshirn <jthumshirn@suse.de>
> >> wrote:
> >>         On Tue, May 31, 2016 at 09:42:29AM -0400, 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>
> >>
> >>         Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
> >>
> >>         --
> >>         Johannes Thumshirn
> >>         Storage
> >>         jthumshirn@suse.de                                +49 911
> >>         74053 689
> >>         SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> >>         GF: Felix Imendörffer, Jane Smithard, Graham Norton
> >>         HRB 21284 (AG Nürnberg)
> >>         Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76
> >>         0850
> >>         --
> >>         To unsubscribe from this list: send the line "unsubscribe
> >>         linux-scsi" in
> >>         the body of a message to majordomo@vger.kernel.org
> >>         More majordomo info at
> >>         http://vger.kernel.org/majordomo-info.html
> >
> >


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  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 21:14 ` Bart Van Assche
  2016-06-06  7:34 ` Hannes Reinecke
  2 siblings, 0 replies; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 21:14 UTC (permalink / raw)
  To: Ewan D. Milne, linux-scsi, Tom Yan

On 05/31/2016 06:42 AM, Ewan D. Milne wrote:
> Linux fails to boot as a guest with a QEMU CD-ROM:
> ...
> Fix this by suppressing VPD inquiry for this device.

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  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 21:14 ` Bart Van Assche
@ 2016-06-06  7:34 ` Hannes Reinecke
  2016-06-06 14:11   ` Ewan D. Milne
  2 siblings, 1 reply; 15+ messages in thread
From: Hannes Reinecke @ 2016-06-06  7:34 UTC (permalink / raw)
  To: Ewan D. Milne, linux-scsi

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.

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?

Either way, this patch is wrong.

NACK.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-06  7:34 ` Hannes Reinecke
@ 2016-06-06 14:11   ` Ewan D. Milne
  2016-06-06 14:22     ` Hannes Reinecke
  0 siblings, 1 reply; 15+ messages in thread
From: Ewan D. Milne @ 2016-06-06 14:11 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: linux-scsi



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



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-06 14:11   ` Ewan D. Milne
@ 2016-06-06 14:22     ` Hannes Reinecke
  2016-06-06 15:05       ` Paolo Bonzini
  0 siblings, 1 reply; 15+ messages in thread
From: Hannes Reinecke @ 2016-06-06 14:22 UTC (permalink / raw)
  To: emilne; +Cc: linux-scsi, Paolo Bonzini, John Snow

On 06/06/2016 04:11 PM, Ewan D. Milne wrote:
> 
> 
> 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.
> 
Sure, if the device is misbehaving and we don't have any way of fixing
it, blacklist is the way to go.
But at the same time a recent qemu is proven to work, to blacklisting
everything is too harsh.

So either we dig into what went wrong with qemu 0.8, or we figure out
from which qemu version things start to behave nicely, and blacklist
earlier versions.

>>
>> 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.
> 
So far we just had this single report where the upstream kernel didn't
work correctly with a (really old) version of qemu.
Hardly justifying blacklisting qemu CD-ROM in general.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-06 14:22     ` Hannes Reinecke
@ 2016-06-06 15:05       ` Paolo Bonzini
  2016-06-06 15:41         ` John Snow
  0 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2016-06-06 15:05 UTC (permalink / raw)
  To: Hannes Reinecke, emilne; +Cc: linux-scsi, John Snow



On 06/06/2016 16:22, Hannes Reinecke wrote:
> So either we dig into what went wrong with qemu 0.8, or we figure out
> from which qemu version things start to behave nicely, and blacklist
> earlier versions.
> 
> > > 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.
> 
> So far we just had this single report where the upstream kernel didn't
> work correctly with a (really old) version of qemu.
> Hardly justifying blacklisting qemu CD-ROM in general.

To further complicate the matter there are two QEMU MMC devices:

1) ATAPI
   - vendor "QEMU" / product name "QEMU CD-ROM" before QEMU 0.10.0
   - vendor "QEMU" / product name "QEMU DVD-ROM" since QEMU 0.10.0

2) native SCSI
   - vendor "QEMU" / product name "QEMU CD-ROM"

VPD in the SCSI CD-ROM probably has always worked, but I would blacklist
up to 0.11 inclusive just to be safe.  Those versions are dead anyway.

VPD in the ATAPI CD-ROM is newer, and that's where the bug was reported on:

> [    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 }

For ATAPI, you have to blacklist all versions up to 2.2 inclusive.

This gives:

- QEMU / QEMU CD-ROM / 0.8.    (this is IDE and SCSI)
- QEMU / QEMU CD-ROM / 0.9.    (this is IDE and SCSI)
- QEMU / QEMU CD-ROM / 0.10    (this is SCSI only)
- QEMU / QEMU CD-ROM / 0.11    (this is SCSI only)
- QEMU / QEMU DVD-ROM / 0.8.   (this is IDE only)
- QEMU / QEMU DVD-ROM / 0.9.   (this is IDE only)
- QEMU / QEMU DVD-ROM / 0.10   (this is IDE only)
- QEMU / QEMU DVD-ROM / 0.11   (this is IDE only)
- QEMU / QEMU DVD-ROM / 0.12   (this is IDE only)
- QEMU / QEMU DVD-ROM / 0.13   (this is IDE only)
- QEMU / QEMU DVD-ROM / 0.14   (this is IDE only)
- QEMU / QEMU DVD-ROM / 0.15   (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.0    (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.1    (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.2    (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.3    (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.4    (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.5    (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.6    (this is IDE only)
- QEMU / QEMU DVD-ROM / 1.7    (this is IDE only)
- QEMU / QEMU DVD-ROM / 2.0    (this is IDE only)
- QEMU / QEMU DVD-ROM / 2.1    (this is IDE only)
- QEMU / QEMU DVD-ROM / 2.2    (this is IDE only)

Thanks,

Paolo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-06 15:05       ` Paolo Bonzini
@ 2016-06-06 15:41         ` John Snow
  2016-06-06 15:43           ` Paolo Bonzini
  0 siblings, 1 reply; 15+ messages in thread
From: John Snow @ 2016-06-06 15:41 UTC (permalink / raw)
  To: Paolo Bonzini, Hannes Reinecke, emilne; +Cc: linux-scsi



On 06/06/2016 11:05 AM, Paolo Bonzini wrote:
> 
> 
> On 06/06/2016 16:22, Hannes Reinecke wrote:
>> So either we dig into what went wrong with qemu 0.8, or we figure out
>> from which qemu version things start to behave nicely, and blacklist
>> earlier versions.
>>
>>>> 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.
>>
>> So far we just had this single report where the upstream kernel didn't
>> work correctly with a (really old) version of qemu.
>> Hardly justifying blacklisting qemu CD-ROM in general.
> 
> To further complicate the matter there are two QEMU MMC devices:
> 
> 1) ATAPI
>    - vendor "QEMU" / product name "QEMU CD-ROM" before QEMU 0.10.0
>    - vendor "QEMU" / product name "QEMU DVD-ROM" since QEMU 0.10.0
> 
> 2) native SCSI
>    - vendor "QEMU" / product name "QEMU CD-ROM"
> 
> VPD in the SCSI CD-ROM probably has always worked, but I would blacklist
> up to 0.11 inclusive just to be safe.  Those versions are dead anyway.
> 
> VPD in the ATAPI CD-ROM is newer, and that's where the bug was reported on:
> 
>> [    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 }
> 
> For ATAPI, you have to blacklist all versions up to 2.2 inclusive.
> 
> This gives:
> 
> - QEMU / QEMU CD-ROM / 0.8.    (this is IDE and SCSI)
> - QEMU / QEMU CD-ROM / 0.9.    (this is IDE and SCSI)
> - QEMU / QEMU CD-ROM / 0.10    (this is SCSI only)
> - QEMU / QEMU CD-ROM / 0.11    (this is SCSI only)
> - QEMU / QEMU DVD-ROM / 0.8.   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 0.9.   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 0.10   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 0.11   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 0.12   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 0.13   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 0.14   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 0.15   (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.0    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.1    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.2    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.3    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.4    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.5    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.6    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 1.7    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 2.0    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 2.1    (this is IDE only)
> - QEMU / QEMU DVD-ROM / 2.2    (this is IDE only)
> 

If this bug is caused by a missing VPD response, Paolo's version history
here is correct.... for upstream versions.

Various downstreams may have backported the VPD fix to older versions,
we need to be careful not to block those, too ... so targeting the core
behavior seems like the more strictly correct, easily maintainable solution.

Why not just dynamically blacklist devices that fail to respond to VPD
inquiries?

--js

> Thanks,
> 
> Paolo
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-06 15:41         ` John Snow
@ 2016-06-06 15:43           ` Paolo Bonzini
  2016-06-06 15:47             ` John Snow
  0 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2016-06-06 15:43 UTC (permalink / raw)
  To: John Snow, Hannes Reinecke, emilne; +Cc: linux-scsi



On 06/06/2016 17:41, John Snow wrote:
> On 06/06/2016 11:05 AM, Paolo Bonzini wrote:
>> For ATAPI, you have to blacklist all versions up to 2.2 inclusive.
>>
>> This gives:
>>
>> - QEMU / QEMU CD-ROM / 0.8.    (this is IDE and SCSI)
>> - QEMU / QEMU CD-ROM / 0.9.    (this is IDE and SCSI)
>> - QEMU / QEMU CD-ROM / 0.10    (this is SCSI only)
>> - QEMU / QEMU CD-ROM / 0.11    (this is SCSI only)
>> - QEMU / QEMU DVD-ROM / 0.8.   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 0.9.   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 0.10   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 0.11   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 0.12   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 0.13   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 0.14   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 0.15   (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.0    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.1    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.2    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.3    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.4    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.5    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.6    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 1.7    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 2.0    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 2.1    (this is IDE only)
>> - QEMU / QEMU DVD-ROM / 2.2    (this is IDE only)
>>
> 
> If this bug is caused by a missing VPD response, Paolo's version history
> here is correct.... for upstream versions.
> 
> Various downstreams may have backported the VPD fix to older versions,
> we need to be careful not to block those, too ... so targeting the core
> behavior seems like the more strictly correct, easily maintainable solution.

I think this is not practical.  I'm okay with the big hammer if an
algorithmic fix is not feasible; but otherwise it does seem a better
idea than blacklisting based on inquiry data...

Thanks,

Paolo

> Why not just dynamically blacklist devices that fail to respond to VPD
> inquiries?


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-06 15:43           ` Paolo Bonzini
@ 2016-06-06 15:47             ` John Snow
  2016-06-06 16:03               ` Paolo Bonzini
  0 siblings, 1 reply; 15+ messages in thread
From: John Snow @ 2016-06-06 15:47 UTC (permalink / raw)
  To: Paolo Bonzini, Hannes Reinecke, emilne; +Cc: linux-scsi



On 06/06/2016 11:43 AM, Paolo Bonzini wrote:
> 
> 
> On 06/06/2016 17:41, John Snow wrote:
>> On 06/06/2016 11:05 AM, Paolo Bonzini wrote:
>>> For ATAPI, you have to blacklist all versions up to 2.2 inclusive.
>>>
>>> This gives:
>>>
>>> - QEMU / QEMU CD-ROM / 0.8.    (this is IDE and SCSI)
>>> - QEMU / QEMU CD-ROM / 0.9.    (this is IDE and SCSI)
>>> - QEMU / QEMU CD-ROM / 0.10    (this is SCSI only)
>>> - QEMU / QEMU CD-ROM / 0.11    (this is SCSI only)
>>> - QEMU / QEMU DVD-ROM / 0.8.   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 0.9.   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 0.10   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 0.11   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 0.12   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 0.13   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 0.14   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 0.15   (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.0    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.1    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.2    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.3    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.4    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.5    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.6    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 1.7    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 2.0    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 2.1    (this is IDE only)
>>> - QEMU / QEMU DVD-ROM / 2.2    (this is IDE only)
>>>
>>
>> If this bug is caused by a missing VPD response, Paolo's version history
>> here is correct.... for upstream versions.
>>
>> Various downstreams may have backported the VPD fix to older versions,
>> we need to be careful not to block those, too ... so targeting the core
>> behavior seems like the more strictly correct, easily maintainable solution.
> 
> I think this is not practical.  I'm okay with the big hammer if an
> algorithmic fix is not feasible; but otherwise it does seem a better
> idea than blacklisting based on inquiry data...
> 
> Thanks,
> 
> Paolo
> 

You think the more practical solution is a SCSI driver that can hang
because of an incorrect/missing response and to maintain a carefully
curated blacklist to work around this behavior?

>> Why not just dynamically blacklist devices that fail to respond to VPD
>> inquiries?
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
  2016-06-06 15:47             ` John Snow
@ 2016-06-06 16:03               ` Paolo Bonzini
  0 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2016-06-06 16:03 UTC (permalink / raw)
  To: John Snow, Hannes Reinecke, emilne; +Cc: linux-scsi



On 06/06/2016 17:47, John Snow wrote:
> > > Various downstreams may have backported the VPD fix to older versions,
> > > we need to be careful not to block those, too ... so targeting the core
> > > behavior seems like the more strictly correct, easily maintainable solution.
> > 
> > I think this is not practical.  I'm okay with the big hammer if an
> > algorithmic fix is not feasible; but otherwise it does seem a better
> > idea than blacklisting based on inquiry data...
> 
> You think the more practical solution is a SCSI driver that can hang
> because of an incorrect/missing response and to maintain a carefully
> curated blacklist to work around this behavior?

The best solution would be an algorithmic fix, perhaps predicated by
some kind of quirk bit.

A carefully curated blacklist is impossible because you cannot account
for a zillion downstreams, most of which probably don't change the
inquire vendor/product data; version numbers are awful.

Paolo

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-06-06 16:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.