diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 04:51:10 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 04:51:10 +0000 |
commit | e4bcb14c79fb63a35aef3eb39e02c16c19b8b28d (patch) | |
tree | 06bee4b9dbf4c7b50e20c9996924d7d132cdfec2 /hw/esp.c | |
parent | 7233b355571ad2a8e7aec7eb19db5f530e81f052 (diff) | |
download | qemu-e4bcb14c79fb63a35aef3eb39e02c16c19b8b28d.zip qemu-e4bcb14c79fb63a35aef3eb39e02c16c19b8b28d.tar.gz qemu-e4bcb14c79fb63a35aef3eb39e02c16c19b8b28d.tar.bz2 |
Add -drive parameter, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/esp.c')
-rw-r--r-- | hw/esp.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -50,14 +50,11 @@ do { printf("ESP: " fmt , ##args); } while (0) #define ESP_REGS 16 #define ESP_SIZE (ESP_REGS * 4) #define TI_BUFSZ 32 -/* The HBA is ID 7, so for simplicitly limit to 7 devices. */ -#define ESP_MAX_DEVS 7 typedef struct ESPState ESPState; struct ESPState { qemu_irq irq; - BlockDriverState **bd; uint8_t rregs[ESP_REGS]; uint8_t wregs[ESP_REGS]; int32_t ti_size; @@ -65,7 +62,7 @@ struct ESPState { uint8_t ti_buf[TI_BUFSZ]; int sense; int dma; - SCSIDevice *scsi_dev[MAX_DISKS]; + SCSIDevice *scsi_dev[ESP_MAX_DEVS]; SCSIDevice *current_dev; uint8_t cmdbuf[TI_BUFSZ]; int cmdlen; @@ -172,7 +169,7 @@ static int get_cmd(ESPState *s, uint8_t *buf) s->async_len = 0; } - if (target >= MAX_DISKS || !s->scsi_dev[target]) { + if (target >= ESP_MAX_DEVS || !s->scsi_dev[target]) { // No such drive s->rregs[ESP_RSTAT] = STAT_IN; s->rregs[ESP_RINTR] = INTR_DC; @@ -621,7 +618,7 @@ void esp_scsi_attach(void *opaque, BlockDriverState *bd, int id) s->scsi_dev[id] = scsi_disk_init(bd, 0, esp_command_complete, s); } -void *esp_init(BlockDriverState **bd, target_phys_addr_t espaddr, +void *esp_init(target_phys_addr_t espaddr, void *dma_opaque, qemu_irq irq, qemu_irq *reset) { ESPState *s; @@ -631,7 +628,6 @@ void *esp_init(BlockDriverState **bd, target_phys_addr_t espaddr, if (!s) return NULL; - s->bd = bd; s->irq = irq; s->dma_opaque = dma_opaque; |