megasas: static SAS addresses
commit76b523db0074aaf489cb80ccd0943b69ea67e30b
authorHannes Reinecke <hare@suse.de>
Wed, 1 Aug 2012 10:46:50 +0000 (1 12:46 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 3 Aug 2012 08:04:37 +0000 (3 10:04 +0200)
tree6f8370510bfd490348e0dfcb25a27740cc95f339
parent79fb50bb95ff85fe388a40e4884080f5a0c1bb21
megasas: static SAS addresses

This patch introduces a new property 'sas_address' which
allows the user to specify the SAS address for the HBA.
The default address is following the NAA locally assigned
identifier format with the locally assigned address
0x525400 as used eg for the MAC addresses.
The lower bytes are set to the pci address which
will ensure uniqueness for the local machine.

The port addresses are now calculated based on the magic
number 0x1221 (which is found in real hardware, too) plus
the device number.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andreas Faerber <afaerber@suse.de>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/megasas.c
hw/mfi.h