ide: cmd646 ->unit has just the value that we want
Patchworks-ID: 35307Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: BMDMAState don't need a pci_dev field anymore
Patchworks-ID: 35306Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: change cast to DO_UPCAST
Patchworks-ID: 35293Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: Remove cast in pci_register_bar
We already have a PCIDevice at that point
Patchworks-ID: 35296Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: Remove duplicated definitions
Patchworks-ID: 35297Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: remove uselsess casts from void *
Patchworks-ID: 35298Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: create ide/pci.h for common ide pci definitions
Patchworks-ID: 35299Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: export needed ide-pci functions for split
Patchworks-ID: 35300Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: split cmd646 and piix from pci.c
This patch splits cmd646 specific code from pci.c.This patch splits piix4 specific code from pci.c.And compile new piix.o and cmd646.o when they are needed.The only change that is not code movemet is removal of cmd646 specific parts...
ide: PCIIDEState type field is not needed anymore
We have split the functions that needed it for cmd646
Patchworks-ID: 35302Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: 'secondary' field is only used by cmd646
Patchworks-ID: 35303Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: cmd646 we can get the pci device with container_of
Patchworks-ID: 35305Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Clean up test for qdev_init() failure
Some callers test for != 0, some for < 0. Normalize to < 0.
Patchworks-ID: 35171Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Rename pci_create_noinit() to pci_create()
It's qdev_create() specialized for PCI, so name it accordingly.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
switch ide bus to inplace allocation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
ide/isa: convert to qdev.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ide/pci: convert to qdev.
With this patch applied ide drives (when attached to a pci adapter) canbe created via -device, like this:
-drive if=none,id=mydisk,file=/path/to/disk.img -device ide-drive,drive=mydisk,bus=ide.0,unit=0
Note that creating a master on ide1 doesn't work that way. That is a...
ide/pci: fix indention
ide/qdev: add ide bus.
split away drive init from ide_init2()
This allows the ide bus being initialized without drives attachedand the drives being attached and initialization later on asseparate step.
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: add enable_write_cache flag
Add a enable_write_cache flag in the block driver state, and use it todecide if we claim to have a volatile write cache that needs controlledflushing from the guest. The flag is off if cache=writethrough isdefined because O_DSYNC guarantees that every write goes to stable...
ide: use bdrv_aio_flush
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
mips malta: Fix fdc regression and use qdev for i8042 setup
8baf73adf664e79eae201c3f618078a220a661d9 (qdev/isa: convert fdc)breaks MIPS Malta:
Tried to create isa device isa-fdc with no isa bus present
Fix this by creating an isa bus for piix4.This change also requires some more qdev related changes...
ide: pass down DriveInfo instead of BlockDriverState
ide: move cmd+irq from IDEState to IDEBus.
These variables are per bus, not per drive. Lets move them andcleanup things a bit. And fix the cmd migration bug for real.
Fix gcc 3 warning: comparison is always true due to limited range of data type
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix merge of 59f2a78793b6d17634f39646d604e84af51e0919
ide: move code to hw/ide/