megasas: LSI MegaRAID SAS HBA emulation
Subsystems (3)
PATCH 2/4 megasas: LSI MegaRAID SAS HBA emulation
This patch add an emulation for the LSI MegaRAID SAS HBA. It is using SG_IO to forward / pass through SCSI commands to the underlying block driver, so no emulation is done currently.
--- Makefile.hw | 2 +- hw/megasas.c | 1134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/pci_ids.h | 2 + 3 files changed, 1137 insertions(+), 1 deletions(-) create mode 100644 hw/megasas.c
Makefile.hw +1 -1
@@ -33,7 +33,7 @@ obj-y += wdt_i6300esb.o obj-y += ne2000.o # SCSI layer -obj-y += lsi53c895a.o +obj-y += lsi53c895a.o megasas.o obj-$(CONFIG_ESP) += esp.o obj-y += dma-helpers.o sysbus.o isa-bus.o
hw/megasas.c new file +1134 -0
1,134 lines not on this page · raw message
hw/pci_ids.h +2 -0
@@ -15,6 +15,7 @@#define PCI_CLASS_STORAGE_SCSI 0x0100#define PCI_CLASS_STORAGE_IDE 0x0101 +#define PCI_CLASS_STORAGE_RAID 0x0104#define PCI_CLASS_STORAGE_OTHER 0x0180#define PCI_CLASS_NETWORK_ETHERNET 0x0200
@@ -46,6 +47,7 @@#define PCI_VENDOR_ID_LSI_LOGIC 0x1000#define PCI_DEVICE_ID_LSI_53C895A 0x0012 +#define PCI_DEVICE_ID_LSI_SAS1078 0x0060#define PCI_VENDOR_ID_DEC 0x1011#define PCI_DEVICE_ID_DEC_21154 0x0026
Signature · 1 line
1.6.0.2
Hi,
Review
Quoted 3 lines
(quoted diff) +3
-0+ /* The current Qemu infrastructure allows only for LUN 0 */ + if (lun == 0&& target< MAX_RAID_DEVS) + cmd->lun =&s->luns[target];
One more thing which should be fixed in qemu instead of worked around in your driver. After all even good old parallel scsi knows multiple luns.
Guess this is how you end up with 128 scsi devices (16 ids with 8 luns
each)?
cheers,
Gerd
Hi,
Review
Quoted 3 lines
(quoted diff) +3
-0+ /* The current Qemu infrastructure allows only for LUN 0 */ + if (lun == 0&& target< MAX_RAID_DEVS) + cmd->lun =&s->luns[target];
One more thing which should be fixed in qemu instead of worked around in your driver. After all even good old parallel scsi knows multiple luns.
Guess this is how you end up with 128 scsi devices (16 ids with 8 luns
each)?
cheers,
Gerd