[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] hw/ppc/spapr: Encode the SCSI channel (bus) in th
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH] hw/ppc/spapr: Encode the SCSI channel (bus) in the SRP LUNs |
Date: |
Fri, 11 Jan 2019 11:27:47 +1100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Jan 09, 2019 at 03:03:23PM +0100, Thomas Huth wrote:
> 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.
>
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1663160
> Signed-off-by: Thomas Huth <address@hidden>
Applied, thanks.
> ---
> hw/ppc/spapr.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 5671608..1f49489 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2905,10 +2905,11 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p,
> BusState *bus,
> if (spapr) {
> /*
> * Replace "address@hidden/address@hidden,0" with
> "address@hidden":
> - * 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("address@hidden"PRIX64, qdev_fw_name(dev),
> (uint64_t)id << 48);
> } else if (virtio) {
--
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
signature.asc
Description: PGP signature