[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 01/58] spapr: proper qdevification

From: Paolo Bonzini
Subject: Re: [Qemu-ppc] [PATCH 01/58] spapr: proper qdevification
Date: Mon, 19 Sep 2011 08:59:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

On 09/19/2011 08:55 AM, Thomas Huth wrote:
>  Note that in addition to that, the PAPR spec specifies only one
>  "device" (whatever that means) per vscsi instance.
Really? In that case, I wonder why Linux is using the "Logical unit
addressing format" with target IDs and bus numbers instead of the
"Flat space addressing method" for vscsi ... according to
drivers/scsi/ibmvscsi/ibmvscsi.c :

static inline u16 lun_from_dev(struct scsi_device *dev)
        return (0x2<<  14) | (dev->id<<  8) | (dev->channel<<  5) | dev->lun;

In case there's really only one device per vscsi instance, shouldn't
that code use addressing method 0x1 instead of 0x2 here?

As long as dev->id == 0, dev->channel == 0, dev->lun < 31, the three addressing methods are all equivalent.

Some comments in ibmvscsi.c say that iOS needs non-zero channels, so there does seem to be someone else who doesn't follow the PAPR spec too well. :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]