[PATCH v2 02/11] scsi-disk: add new quirks bitmap to SCSIDiskState

Mark Cave-Ayland posted 11 patches 3 years, 9 months ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>
There is a newer version of this series
[PATCH v2 02/11] scsi-disk: add new quirks bitmap to SCSIDiskState
Posted by Mark Cave-Ayland 3 years, 9 months ago
Since the MacOS SCSI implementation is quite old (and Apple added some firmware
customisations to their drives for m68k Macs) there is need to add a mechanism
to correctly handle Apple-specific quirks.

Add a new quirks bitmap to SCSIDiskState that can be used to enable these
features as required.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/scsi/scsi-disk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 090679f3b5..d89cdd4e4a 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -94,6 +94,7 @@ struct SCSIDiskState {
     uint16_t port_index;
     uint64_t max_unmap_size;
     uint64_t max_io_size;
+    uint32_t quirks;
     QEMUBH *bh;
     char *version;
     char *serial;
-- 
2.20.1
Re: [PATCH v2 02/11] scsi-disk: add new quirks bitmap to SCSIDiskState
Posted by Laurent Vivier 3 years, 8 months ago
Le 24/04/2022 à 18:49, Mark Cave-Ayland a écrit :
> Since the MacOS SCSI implementation is quite old (and Apple added some firmware
> customisations to their drives for m68k Macs) there is need to add a mechanism
> to correctly handle Apple-specific quirks.
> 
> Add a new quirks bitmap to SCSIDiskState that can be used to enable these
> features as required.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>   hw/scsi/scsi-disk.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
> index 090679f3b5..d89cdd4e4a 100644
> --- a/hw/scsi/scsi-disk.c
> +++ b/hw/scsi/scsi-disk.c
> @@ -94,6 +94,7 @@ struct SCSIDiskState {
>       uint16_t port_index;
>       uint64_t max_unmap_size;
>       uint64_t max_io_size;
> +    uint32_t quirks;
>       QEMUBH *bh;
>       char *version;
>       char *serial;

Reviewed-by: Laurent Vivier <laurent@vivier.eu>