[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/20] scsi-disk: allow the MODE_PAGE_R_W_ERROR AWRE bit to be cha
From: |
Paolo Bonzini |
Subject: |
[PULL 16/20] scsi-disk: allow the MODE_PAGE_R_W_ERROR AWRE bit to be changeable for CDROM drives |
Date: |
Thu, 14 Jul 2022 11:02:07 +0200 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
A/UX sends a MODE_PAGE_R_W_ERROR command with the AWRE bit set to 0 when
enumerating
CDROM drives. Since the bit is currently hardcoded to 1 then indicate that the
AWRE
bit can be changed (even though we don't care about the value) so that
the MODE_PAGE_R_W_ERROR page can be set successfully.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220622105314.802852-12-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/scsi-disk.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 2b2e496ebd..db27e834da 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -1188,6 +1188,10 @@ static int mode_sense_page(SCSIDiskState *s, int page,
uint8_t **p_outbuf,
case MODE_PAGE_R_W_ERROR:
length = 10;
if (page_control == 1) { /* Changeable Values */
+ if (s->qdev.type == TYPE_ROM) {
+ /* Automatic Write Reallocation Enabled */
+ p[0] = 0x80;
+ }
break;
}
p[0] = 0x80; /* Automatic Write Reallocation Enabled */
--
2.36.1
- [PULL 11/20] scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPLE quirk for Macintosh, (continued)
- [PULL 11/20] scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPLE quirk for Macintosh, Paolo Bonzini, 2022/07/14
- [PULL 10/20] q800: implement compat_props to enable quirk_mode_sense_rom_use_dbd for scsi-cd devices, Paolo Bonzini, 2022/07/14
- [PULL 07/20] scsi-disk: add MODE_PAGE_APPLE_VENDOR quirk for Macintosh, Paolo Bonzini, 2022/07/14
- [PULL 14/20] scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_TRUNCATED quirk for Macintosh, Paolo Bonzini, 2022/07/14
- [PULL 15/20] q800: implement compat_props to enable quirk_mode_page_truncated for scsi-cd devices, Paolo Bonzini, 2022/07/14
- [PULL 12/20] q800: implement compat_props to enable quirk_mode_page_vendor_specific_apple for scsi devices, Paolo Bonzini, 2022/07/14
- [PULL 09/20] scsi-disk: add SCSI_DISK_QUIRK_MODE_SENSE_ROM_USE_DBD quirk for Macintosh, Paolo Bonzini, 2022/07/14
- [PULL 06/20] scsi-disk: add new quirks bitmap to SCSIDiskState, Paolo Bonzini, 2022/07/14
- [PULL 03/20] datadir: Use bundle mechanism, Paolo Bonzini, 2022/07/14
- [PULL 08/20] q800: implement compat_props to enable quirk_mode_page_apple_vendor for scsi-cd devices, Paolo Bonzini, 2022/07/14
- [PULL 16/20] scsi-disk: allow the MODE_PAGE_R_W_ERROR AWRE bit to be changeable for CDROM drives,
Paolo Bonzini <=
- [PULL 17/20] scsi-disk: allow MODE SELECT block descriptor to set the block size, Paolo Bonzini, 2022/07/14
- [PULL 18/20] q800: add default vendor and product information for scsi-hd devices, Paolo Bonzini, 2022/07/14
- [PULL 19/20] q800: add default vendor and product information for scsi-cd devices, Paolo Bonzini, 2022/07/14
- [PULL 20/20] pc-bios/s390-ccw: add -Wno-array-bounds, Paolo Bonzini, 2022/07/14
- Re: [PULL 00/20] SCSI, build system patches for 2022-07-13, Peter Maydell, 2022/07/15