aboutsummaryrefslogtreecommitdiffstats
path: root/hw/ide
AgeCommit message (Collapse)AuthorFilesLines
2009-10-27ide: pre VMState functions are not needed anymoreJuan Quintela2-26/+0
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: port pci ide to vmstateJuan Quintela5-63/+43
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: port pmac ide to vmstateJuan Quintela1-31/+11
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: port isa ide to vmstateJuan Quintela1-19/+12
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: port ide mmio to vmstateJuan Quintela1-19/+12
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: include bus in MMIOStateJuan Quintela1-20/+14
Change pointer to struct by embedded struct. Adjust all callers Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: port microdrive to vmstateJuan Quintela1-43/+18
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: add VMSTATE_IDE_BUS and VMSTATE_IDE_DRIVESJuan Quintela1-0/+10
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: microdrive cycle field is set as uint8_tJuan Quintela1-1/+1
Really, it is used as a boolean Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: port ide_drive to vmstateJuan Quintela1-57/+56
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: change identify_data type to uint8_tJuan Quintela2-13/+14
It is used everywhere as uint8_t except in one place. Cast to uint16_t in that place Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ide: port idebus to vmstateJuan Quintela1-4/+14
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: BMDMAState don't need a pci_dev field anymoreJuan Quintela3-3/+0
Patchworks-ID: 35306 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: cmd646 ->unit has just the value that we wantJuan Quintela1-2/+2
Patchworks-ID: 35307 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: cmd646 we can get the pci device with container_ofJuan Quintela1-6/+11
Patchworks-ID: 35305 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: 'secondary' field is only used by cmd646Juan Quintela1-1/+1
Patchworks-ID: 35303 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: PCIIDEState type field is not needed anymoreJuan Quintela3-30/+11
We have split the functions that needed it for cmd646 Patchworks-ID: 35302 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: split cmd646 and piix from pci.cJuan Quintela3-338/+478
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 in bmdma_readb/writeb for piix. Patchworks-ID: 35301 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: export needed ide-pci functions for splitJuan Quintela2-10/+20
Patchworks-ID: 35300 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: create ide/pci.h for common ide pci definitionsJuan Quintela2-13/+19
Patchworks-ID: 35299 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: remove uselsess casts from void *Juan Quintela2-13/+13
Patchworks-ID: 35298 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: Remove duplicated definitionsJuan Quintela1-6/+0
Patchworks-ID: 35297 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: Remove cast in pci_register_barJuan Quintela1-12/+6
We already have a PCIDevice at that point Patchworks-ID: 35296 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: change cast to DO_UPCASTJuan Quintela1-2/+2
Patchworks-ID: 35293 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-07Clean up test for qdev_init() failureMarkus Armbruster2-2/+2
Some callers test for != 0, some for < 0. Normalize to < 0. Patchworks-ID: 35171 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-07New qdev_init_nofail()Markus Armbruster1-1/+1
Like qdev_init(), but terminate program via hw_error() instead of returning an error value. Use it instead of qdev_init() where terminating the program on failure is okay, either because it's during machine construction, or because we know that failure can't happen. Because relying in the latter is somewhat unclean, and the former is not always obvious, it would be nice to go back to qdev_init() in the not-so-obvious cases, only with proper error handling. I'm leaving that for another day, because it involves making sure that error values are properly checked by all callers. Patchworks-ID: 35168 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05Rename pci_create_noinit() to pci_create()Markus Armbruster1-1/+1
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>
2009-10-05switch ide bus to inplace allocation.Gerd Hoffmann4-39/+36
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori2-11/+11
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. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Get rid of _t suffixmalc2-11/+11
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-09-15ide/isa: convert to qdev.Gerd Hoffmann1-8/+53
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15ide/pci: convert to qdev.Gerd Hoffmann1-69/+117
With this patch applied ide drives (when attached to a pci adapter) can be 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 side effect of qemu creating a cdrom automagically even if you don't ask for it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15ide/pci: fix indentionGerd Hoffmann1-6/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15ide/qdev: add ide bus.Gerd Hoffmann2-1/+147
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15split away drive init from ide_init2()Gerd Hoffmann2-32/+40
This allows the ide bus being initialized without drives attached and the drives being attached and initialization later on as separate step. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-11Unexport ticks_per_sec variable. Create get_ticks_per_sec() functionJuan Quintela1-1/+1
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11ide: use bdrv_aio_flushChristoph Hellwig1-3/+13
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11block: add enable_write_cache flagChristoph Hellwig1-2/+5
Add a enable_write_cache flag in the block driver state, and use it to decide if we claim to have a volatile write cache that needs controlled flushing from the guest. The flag is off if cache=writethrough is defined because O_DSYNC guarantees that every write goes to stable storage, and it is on for cache=none and cache=writeback. Both scsi-disk and ide now use the new flage, changing from their defaults of always off (ide) or always on (scsi-disk). Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04mips malta: Fix fdc regression and use qdev for i8042 setupStefan Weil1-9/+4
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 (similar changes were applied to pc.c) and allows cleaning of piix3/piix4 code. Thanks to Gerd Hoffmann for his hints. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04ide: move cmd+irq from IDEState to IDEBus.Gerd Hoffmann3-63/+55
These variables are per bus, not per drive. Lets move them and cleanup things a bit. And fix the cmd migration bug for real. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04ide: pass down DriveInfo instead of BlockDriverStateGerd Hoffmann7-15/+13
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-29Fix gcc 3 warning: comparison is always true due to limited range of data typeBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-28Fix merge of 59f2a78793b6d17634f39646d604e84af51e0919Blue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-27ide: move code to hw/ide/Gerd Hoffmann7-0/+4905
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>