hw/ppc/spapr: Encode the SCSI channel (bus) in the SRP LUNs
PATCH 1/1 hw/ppc/spapr: Encode the SCSI channel (bus) in the SRP LUNs
In hw/scsi/spapr_vio.c we declare that the controller supports multiple buses by specifying "max_channel = 7" there. So in the code that fixes up the device tree nodes, we must encode the channel number (a.k.a. bus number in the "Logical unit addressing format" table of SAM5) into the 64-bit LUN, too.
--- hw/ppc/spapr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
hw/ppc/spapr.c +4 -3
@@ -2905,10 +2905,11 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p, BusState *bus,if (spapr) {/* * Replace "channel@0/disk@0,0" with "disk@8000000000000000": -* We use SRP luns of the form 8000 | (bus << 8) | (id << 5) | lun -* in the top 16 bits of the 64-bit LUN +* In the top 16 bits of the 64-bit LUN, we use SRP luns of the form +* 0x8000 | (target << 8) | (bus << 5) | lun +* (see the "Logical unit addressing format" table in SAM5) */ -unsigned id =0x8000 | (d->id <<8 ) | d->lun; +unsigned id =0x8000 | (d->id <<8 ) | (d->channel <<5 ) | d->lun;return g_strdup_printf ("%s@%" PRIX64 ,qdev_fw_name (dev), (uint64_t )id <<48 ); }else if (virtio) {
Signature · 1 line
1.8.3.1
David Gibson
AppliedQuoted 8 lines · Thomas Huth
In
hw/scsi/spapr_vio.cwe declare that the controller supports multiple buses by specifying "max_channel= 7" there. So in the code that fixes up the device tree nodes, we must encode the channel number (a.k.a. bus number in the "Logical unit addressing format" table of SAM5) into the 64-bit LUN, too.Signed-off-by Thomas Huth <[email protected]>
Applied, thanks.
Quoted 23 lines
--- hw/ppc/spapr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)hw/ppc/spapr.c +4
-3@@ -2905,10 +2905,11 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p, BusState *bus,if (spapr) {/* * Replace "channel@0/disk@0,0" with "disk@8000000000000000": -* We use SRP luns of the form 8000 | (bus << 8) | (id << 5) | lun -* in the top 16 bits of the 64-bit LUN +* In the top 16 bits of the 64-bit LUN, we use SRP luns of the form +* 0x8000 | (target << 8) | (bus << 5) | lun +* (see the "Logical unit addressing format" table in SAM5) */ -unsigned id =0x8000 | (d->id <<8 ) | d->lun; +unsigned id =0x8000 | (d->id <<8 ) | (d->channel <<5 ) | d->lun;return g_strdup_printf ("%s@%" PRIX64 ,qdev_fw_name (dev), (uint64_t )id <<48 ); }else if (virtio) {
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-quick@centos7 SHOW_ENV=1 J=8 === TEST SCRIPT END ===
The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]