From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwV5j-0003fH-Cs for qemu-devel@nongnu.org; Wed, 01 Aug 2012 05:19:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwV5f-0000gH-4y for qemu-devel@nongnu.org; Wed, 01 Aug 2012 05:19:43 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42828 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwV5e-0000fV-QN for qemu-devel@nongnu.org; Wed, 01 Aug 2012 05:19:39 -0400 Message-ID: <5018F4A9.4000504@suse.de> Date: Wed, 01 Aug 2012 11:19:37 +0200 From: Hannes Reinecke MIME-Version: 1.0 References: <1343812324-17560-1-git-send-email-hare@suse.de> In-Reply-To: <1343812324-17560-1-git-send-email-hare@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] megasas: static SAS addresses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: Paolo Bonzini , Alexander Graf , qemu-devel@nongnu.org, Anthony Liguori , Andreas Faerber (Bad style to reply to my own post. I know.) On 08/01/2012 11:12 AM, Hannes Reinecke wrote: > This patch introduces a new property 'sas_address' which > allows the user to specify the SAS address for the HBA. > The default address it taken from the qumranet IEEE number > and the pci slot address. That ensures it'll be unique > and reproduceable locally. >=20 > The port addresses are now calculated based on the magic > number 0x1221 (which is found in real hardware, too) plus > the device number. >=20 > Signed-off-by: Hannes Reinecke > Cc: Paolo Bonzini > Cc: Andreas Faerber > Cc: Anthony Liguori > Cc: Alexander Graf > --- > hw/megasas.c | 63 ++++++++++++++++++++++++++++++++++++++++++--------= ------- > hw/mfi.h | 1 + > 2 files changed, 47 insertions(+), 17 deletions(-) >=20 > diff --git a/hw/megasas.c b/hw/megasas.c > index 9a0eab1..e709d4d 100644 > --- a/hw/megasas.c > +++ b/hw/megasas.c > @@ -38,6 +38,8 @@ > #define MEGASAS_MAX_SECTORS 0xFFFF /* No real limit */ > #define MEGASAS_MAX_ARRAYS 128 > =20 > +#define IEEE_COMPANY_QUMRANET 0x001A4AULL > + Something worth of note: To generate a valid SAS address I need an IEEE number. I seem to remember Qumranet donated their PCI id for KVM use. I don't actually know if that donation extends to the IEEE number, too. If not then obviously I would need to use another one here. Who would be best in a position to answer this? Paolo? Someone at RH should know ... Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)