<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/include/scsi, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/include/scsi?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/include/scsi?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-07-13T14:58:58+00:00</updated>
<entry>
<title>scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPLE quirk for Macintosh</title>
<updated>2022-07-13T14:58:58+00:00</updated>
<author>
<name>Mark Cave-Ayland</name>
</author>
<published>2022-06-22T10:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=09274de1f70e0773b95f865ef4980599e51aa67d'/>
<id>urn:sha1:09274de1f70e0773b95f865ef4980599e51aa67d</id>
<content type='text'>
Both MacOS and A/UX make use of vendor-specific MODE SELECT commands with PF=0
to identify SCSI devices:

- MacOS sends a MODE SELECT command with PF=0 for the MODE_PAGE_VENDOR_SPECIFIC
  (0x0) mode page containing 2 bytes before initialising a disk

- A/UX (installed on disk) sends a MODE SELECT command with PF=0 during SCSI
  bus enumeration, and gets stuck in an infinite loop if it fails

Add a new SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPLE quirk to allow both
PF=0 MODE SELECT commands and implement a MODE_PAGE_VENDOR_SPECIFIC (0x0)
mode page which is compatible with MacOS.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Message-Id: &lt;20220622105314.802852-7-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi-disk: add MODE_PAGE_APPLE_VENDOR quirk for Macintosh</title>
<updated>2022-07-13T14:58:57+00:00</updated>
<author>
<name>Mark Cave-Ayland</name>
</author>
<published>2022-06-22T10:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=09d37867627a86f23248c138f380bd38bada4073'/>
<id>urn:sha1:09d37867627a86f23248c138f380bd38bada4073</id>
<content type='text'>
One of the mechanisms MacOS uses to identify CDROM drives compatible with MacOS
is to send a custom MODE SELECT command for page 0x30 to the drive. The
response to this is a hard-coded manufacturer string which must match in order
for the CDROM to be usable within MacOS.

Add an implementation of the MODE SELECT page 0x30 response guarded by a newly
defined SCSI_DISK_QUIRK_MODE_PAGE_APPLE_VENDOR quirk bit so that CDROM drives
attached to non-Apple machines function exactly as before.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
Message-Id: &lt;20220622105314.802852-3-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi: inline sg_io_sense_from_errno() into the callers.</title>
<updated>2021-03-06T10:42:56+00:00</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2020-11-16T18:40:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a108557bbff8a3f44233982f015f996426411be8'/>
<id>urn:sha1:a108557bbff8a3f44233982f015f996426411be8</id>
<content type='text'>
Currently sg_io_sense_from_errno() converts the two input parameters
'errno' and 'io_hdr' into sense code and SCSI status. Having
split the function off into scsi_sense_from_errno() and
scsi_sense_from_host_status(), both of which are available generically,
we now inline the logic in the callers so that scsi-disk and
scsi-generic will be able to pass host_status to the HBA.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Message-Id: &lt;20201116184041.60465-7-hare@suse.de&gt;
[Put together from "scsi-disk: Add sg_io callback to evaluate status"
 and what remains of "scsi: split sg_io_sense_from_errno() in two functions",
 with many other fixes. - Paolo]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi: Add mapping for generic SCSI_HOST status to sense codes</title>
<updated>2021-03-06T10:41:54+00:00</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2020-11-16T18:40:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=db66a15cb80f09da24a5311a3f3b8f0c1835bf71'/>
<id>urn:sha1:db66a15cb80f09da24a5311a3f3b8f0c1835bf71</id>
<content type='text'>
As we don't have a driver-specific mapping (yet) we should provide
for a detailed mapping from host_status to SCSI sense codes.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Message-Id: &lt;20201116184041.60465-6-hare@suse.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi: Rename linux-specific SG_ERR codes to generic SCSI_HOST error codes</title>
<updated>2021-03-06T10:41:54+00:00</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2020-11-16T18:40:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=41af878b96582fc8c83303ab8921e40468403702'/>
<id>urn:sha1:41af878b96582fc8c83303ab8921e40468403702</id>
<content type='text'>
We really should make a distinction between legitimate sense codes
(ie if one is running against an emulated block device or for
pass-through sense codes), and the intermediate errors generated
during processing of the command, which really are not sense codes
but refer to some specific internal status. And this internal
state is not necessarily linux-specific, but rather can refer to
the qemu implementation itself.
So rename the linux-only SG_ERR codes to SCSI_HOST codes and make
them available generally.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Message-Id: &lt;20201116184041.60465-5-hare@suse.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi: introduce scsi_sense_from_errno()</title>
<updated>2021-02-25T13:14:32+00:00</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2021-02-24T15:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d7a84021db8eeddcd5d24ab591a1434763caff6c'/>
<id>urn:sha1:d7a84021db8eeddcd5d24ab591a1434763caff6c</id>
<content type='text'>
The new function is an extension of the switch statement in scsi-disk.c
which also includes the errno cases only found in sg_io_sense_from_errno.
This allows us to consolidate the errno handling.

Extracted from a patch by Hannes Reinecke &lt;hare@suse.de&gt;.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi/utils: Add INVALID_PARAM_VALUE sense code definition</title>
<updated>2021-01-22T13:51:35+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-01-20T15:35:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=2e8f72acb0e948566c129d3e819cd77b9a8789ac'/>
<id>urn:sha1:2e8f72acb0e948566c129d3e819cd77b9a8789ac</id>
<content type='text'>
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-Id: &lt;20210120153522.1173897-3-philmd@redhat.com&gt;
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi-generic: Fix HM-zoned device scan</title>
<updated>2020-09-30T17:09:20+00:00</updated>
<author>
<name>Dmitry Fomichev</name>
</author>
<published>2020-08-11T22:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=afff2db61f6ace9bb2c4d81c7c57601f5c009acd'/>
<id>urn:sha1:afff2db61f6ace9bb2c4d81c7c57601f5c009acd</id>
<content type='text'>
Several important steps during device scan depend on SCSI type of the
device. For example, max_transfer property is only determined and
assigned if the device has the type of TYPE_DISK.

Host-managed ZBC disks retain most of the properties of regular SCSI
drives, but they have their own SCSI device type, 0x14. This prevents
the proper assignment of max_transfer property for HM-zoned devices in
scsi-generic driver leading to I/O errors if the maximum i/o size
calculated at the guest exceeds the host value.

To fix this, define TYPE_ZBC to have the standard value from SCSI ZBC
standard spec. Several scan steps that were previously done only for
TYPE_DISK devices, are now performed for the SCSI devices having
TYPE_ZBC too.

Reported-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: Dmitry Fomichev &lt;dmitry.fomichev@wdc.com&gt;
Message-Id: &lt;20200811225122.17342-3-dmitry.fomichev@wdc.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros</title>
<updated>2020-09-18T18:12:32+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2020-09-16T18:25:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=30b5707c269cac1ad80b72f777e52c8e08b2ff19'/>
<id>urn:sha1:30b5707c269cac1ad80b72f777e52c8e08b2ff19</id>
<content type='text'>
One of the goals of having less boilerplate on QOM declarations
is to avoid human error.  Requiring an extra argument that is
never used is an opportunity for mistakes.

Remove the unused argument from OBJECT_DECLARE_TYPE and
OBJECT_DECLARE_SIMPLE_TYPE.

Coccinelle patch used to convert all users of the macros:

  @@
  declarer name OBJECT_DECLARE_TYPE;
  identifier InstanceType, ClassType, lowercase, UPPERCASE;
  @@
   OBJECT_DECLARE_TYPE(InstanceType, ClassType,
  -                    lowercase,
                       UPPERCASE);

  @@
  declarer name OBJECT_DECLARE_SIMPLE_TYPE;
  identifier InstanceType, lowercase, UPPERCASE;
  @@
   OBJECT_DECLARE_SIMPLE_TYPE(InstanceType,
  -                    lowercase,
                       UPPERCASE);

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Acked-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Acked-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
Acked-by: Paul Durrant &lt;paul@xen.org&gt;
Acked-by: Thomas Huth &lt;thuth@redhat.com&gt;
Message-Id: &lt;20200916182519.415636-4-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>Use OBJECT_DECLARE_TYPE where possible</title>
<updated>2020-09-09T13:27:11+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2020-08-31T21:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c821774a3b7ca991d684c3966171d8657f842aea'/>
<id>urn:sha1:c821774a3b7ca991d684c3966171d8657f842aea</id>
<content type='text'>
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the
typedefs can be safely removed.

Generated running:

$ ./scripts/codeconverter/converter.py -i \
  --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]')

Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-16-ehabkost@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-17-ehabkost@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-18-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
</feed>
