Revision b0a7b120
b/block_int.h | ||
---|---|---|
127 | 127 |
int type; |
128 | 128 |
char device_name[32]; |
129 | 129 |
BlockDriverState *next; |
130 |
void *private; |
|
130 | 131 |
}; |
131 | 132 |
|
132 | 133 |
struct BlockDriverAIOCB { |
b/hw/ide.c | ||
---|---|---|
28 | 28 |
#include "scsi-disk.h" |
29 | 29 |
#include "pcmcia.h" |
30 | 30 |
#include "block.h" |
31 |
#include "block_int.h" |
|
31 | 32 |
#include "qemu-timer.h" |
32 | 33 |
#include "sysemu.h" |
33 | 34 |
#include "ppc_mac.h" |
... | ... | |
3352 | 3353 |
{ |
3353 | 3354 |
PCIIDEState *d; |
3354 | 3355 |
uint8_t *pci_conf; |
3356 |
int i; |
|
3355 | 3357 |
|
3356 | 3358 |
/* register a function 1 of PIIX3 */ |
3357 | 3359 |
d = (PCIIDEState *)pci_register_device(bus, "PIIX3 IDE", |
... | ... | |
3378 | 3380 |
ide_init_ioport(&d->ide_if[0], 0x1f0, 0x3f6); |
3379 | 3381 |
ide_init_ioport(&d->ide_if[2], 0x170, 0x376); |
3380 | 3382 |
|
3383 |
for (i = 0; i < 4; i++) |
|
3384 |
if (hd_table[i]) |
|
3385 |
hd_table[i]->private = &d->dev; |
|
3386 |
|
|
3381 | 3387 |
register_savevm("ide", 0, 2, pci_ide_save, pci_ide_load, d); |
3382 | 3388 |
} |
3383 | 3389 |
|
b/hw/lsi53c895a.c | ||
---|---|---|
13 | 13 |
#include "hw.h" |
14 | 14 |
#include "pci.h" |
15 | 15 |
#include "scsi-disk.h" |
16 |
#include "block_int.h" |
|
16 | 17 |
|
17 | 18 |
//#define DEBUG_LSI |
18 | 19 |
//#define DEBUG_LSI_REG |
... | ... | |
1958 | 1959 |
s->scsi_dev[id] = scsi_generic_init(bd, 1, lsi_command_complete, s); |
1959 | 1960 |
if (s->scsi_dev[id] == NULL) |
1960 | 1961 |
s->scsi_dev[id] = scsi_disk_init(bd, 1, lsi_command_complete, s); |
1962 |
bd->private = &s->pci_dev; |
|
1961 | 1963 |
} |
1962 | 1964 |
|
1963 | 1965 |
void *lsi_scsi_init(PCIBus *bus, int devfn) |
b/hw/virtio-blk.c | ||
---|---|---|
314 | 314 |
s->vdev.reset = virtio_blk_reset; |
315 | 315 |
s->bs = bs; |
316 | 316 |
s->rq = NULL; |
317 |
bs->private = &s->vdev.pci_dev; |
|
317 | 318 |
bdrv_guess_geometry(s->bs, &cylinders, &heads, &secs); |
318 | 319 |
bdrv_set_geometry_hint(s->bs, cylinders, heads, secs); |
319 | 320 |
|
Also available in: Unified diff