Displaying 4 results from an estimated 4 matches for "if_raid".
Did you mean:
afraid
2009 Oct 27
0
[PATCH 1/4] Add 'raid' interface class
...a/hw/pc.c b/hw/pc.c
index 83012a9..26aad4c 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1345,6 +1345,11 @@ static void pc_init1(ram_addr_t ram_size,
for (bus = 0; bus <= max_bus; bus++) {
pci_create_simple(pci_bus, -1, "lsi53c895a");
}
+
+ max_bus = drive_get_max_bus(IF_RAID);
+ for (bus = 0; bus <= max_bus; bus++) {
+ pci_create_simple(pci_bus, -1, "megasas");
+ }
}
if (extboot_drive) {
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 410fa3f..855a1ad 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -85,6 +85,7 @@ void drive_h...
2009 Oct 27
0
[PATCH 1/4] Add 'raid' interface class
...a/hw/pc.c b/hw/pc.c
index 83012a9..26aad4c 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1345,6 +1345,11 @@ static void pc_init1(ram_addr_t ram_size,
for (bus = 0; bus <= max_bus; bus++) {
pci_create_simple(pci_bus, -1, "lsi53c895a");
}
+
+ max_bus = drive_get_max_bus(IF_RAID);
+ for (bus = 0; bus <= max_bus; bus++) {
+ pci_create_simple(pci_bus, -1, "megasas");
+ }
}
if (extboot_drive) {
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 410fa3f..855a1ad 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -85,6 +85,7 @@ void drive_h...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...amp;dev->qdev, 1, MAX_RAID_DEVS, NULL);
+ memset(s->luns, 0, sizeof(struct megasas_lun_t) * MAX_RAID_DEVS);
+ for (unit = 0; unit < MAX_RAID_DEVS; unit++) {
+ struct megasas_lun_t *lun = &s->luns[unit];
+ SCSIBus *bus = &s->bus;
+ DriveInfo *dinfo;
+
+ dinfo = drive_get(IF_RAID, bus->busnr, unit);
+ if (dinfo == NULL)
+ continue;
+ lun->bdrv = dinfo->bdrv;
+ lun->sdev = scsi_bus_legacy_add_drive(bus, dinfo, unit);
+ if (!lun->sdev) {
+ DPRINTF("Cannot allocate drive %d\n", unit);
+ lun->bdrv = NULL;
+ continue;
+ }
+ /* check if...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...amp;dev->qdev, 1, MAX_RAID_DEVS, NULL);
+ memset(s->luns, 0, sizeof(struct megasas_lun_t) * MAX_RAID_DEVS);
+ for (unit = 0; unit < MAX_RAID_DEVS; unit++) {
+ struct megasas_lun_t *lun = &s->luns[unit];
+ SCSIBus *bus = &s->bus;
+ DriveInfo *dinfo;
+
+ dinfo = drive_get(IF_RAID, bus->busnr, unit);
+ if (dinfo == NULL)
+ continue;
+ lun->bdrv = dinfo->bdrv;
+ lun->sdev = scsi_bus_legacy_add_drive(bus, dinfo, unit);
+ if (!lun->sdev) {
+ DPRINTF("Cannot allocate drive %d\n", unit);
+ lun->bdrv = NULL;
+ continue;
+ }
+ /* check if...