Statistics
| Branch: | Revision:

root / hw / ide / internal.h @ 2860e3eb

History | View | Annotate | Download (18.9 kB)

# Date Author Comment
33231e0e 04/27/2011 05:20 pm Kevin Wolf

ide: Split atapi.c out

Besides moving code, this patch only fixes some whitespace issues in the moved
code and makes all functions in atapi.c static which can be static.

Signed-off-by: Kevin Wolf <>

996faf1a 04/13/2011 01:20 pm Amit Shah

atapi: GESN: implement 'media' subcommand

Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION
command. This helps us report tray open, tray closed, no media, media
present states to the guest.

Newer Linux kernels (2.6.38+) rely on this command to revalidate discs...

cd369c46 01/24/2011 12:08 pm Christoph Hellwig

ide: factor dma handling helpers

Factor the DMA I/O path that is duplicated between read and write
commands, into common helpers using the s->is_read flag added for
the macio ATA controller.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

ccf0fd8b 12/17/2010 05:11 pm Roland Elek

ide: add ncq identify data for ahci sata drives

I modified ide_identify() to include the zero-based queue length
value in word 75, and set bit 8 in word 76 to signal NCQ support
in the identify data for AHCI SATA drives.

Signed-off-by: Roland Elek <>...

40a6238a 12/17/2010 05:11 pm Alexander Graf

ide: Split out BMDMA code from ATA core

The ATA core is currently heavily intertwined with BMDMA code. Let's loosen
that a bit, so we can happily replace the DMA backend with different
implementations.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

7cff87ff 12/17/2010 05:11 pm Alexander Graf

ide: split ide command interpretation off

The ATA command interpretation code can be used for PATA and SATA
interfaces alike. So let's split it out into a separate function.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

3835510f 12/11/2010 11:27 pm Gleb Natapov

Store IDE bus id in IDEBus structure for easy access.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

9fbef1ac 11/24/2010 06:31 pm Avi Kivity

ide: convert bmdma address ioport to ioport_register()

cmd646, via compile tested, pci lightly boot tested.

Signed-off-by: Avi Kivity <>
Signed-off-by: Kevin Wolf <>

e2bcadad 10/22/2010 03:49 pm Kevin Wolf

ide: Handle flush failure

Instead of always assuming success for bdrv_aio_flush, actually do something
with the error. This respects the werror option and accordingly ignores the
error, reports it to the guest or stops the VM and retries after cont.

Ignoring the error is trivial, obviously. For stopping the VM and retrying...

50641c5c 07/27/2010 12:19 am Juan Quintela

ide: fix migration in the middle of pio operation

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

3abb6260 07/27/2010 12:19 am Juan Quintela

Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"

This reverts commit ed487bb1d69040b9dac64a4fc076d8dd82b131d6.

The conflicts are due to commit 4fc8d6711aff7a9c11e402c3d77b481609f9f486
that is a fix to the ide_drive_pre_save() function. It reverts both...

cd8722bb 07/06/2010 06:05 pm Markus Armbruster

ide: Replace IDEState members is_cdrom, is_cf by drive_kind

The two aren't independent variables. Make that obvious.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

c4d74df7 07/06/2010 06:05 pm Markus Armbruster

ide: Make ide_init_drive() return success

It still always succeeds. The next commits will add failures.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

f8b6cc00 07/02/2010 02:18 pm Markus Armbruster

qdev: Decouple qdev_prop_drive from DriveInfo

Make the property point to BlockDriverState, cutting out the DriveInfo
middleman. This prepares the ground for block devices that don't have
a DriveInfo.

Currently all user-defined ones have a DriveInfo, because the only way...

124964b5 06/04/2010 12:43 pm Markus Armbruster

ide: Remove useless IDEDeviceInfo members unit, drive

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

57dac7ef 06/04/2010 12:43 pm Markus Armbruster

ide: Remove redundant IDEState member conf

Commit 428c149b added IDEState member conf to let commit 0009baf1 find
the BlockConf from there. It exists only for qdev drives, created via
ide_drive_initfn(), not for drives created via ide_init2().

But for a qdev drive, we can just as well reach its IDEDevice, which...

57234ee4 06/04/2010 12:43 pm Markus Armbruster

ide: Split non-qdev code off ide_init2()

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

6ced55a5 06/04/2010 12:43 pm Markus Armbruster

ide: Turn drive serial into a qdev property ide-drive.serial

It needs to be a qdev property, because it belongs to the drive's
guest part.

Bonus: info qtree now shows the serial number.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

70ae65f5 05/01/2010 10:44 pm Igor V. Kovalenko

cmd646: pass pci_dev as it needs it

Instead of doing tricks to get the pci_dev, just pass it in the 1st
place. Patch is a bit longer that reverting the pci_dev field, but it
states more clearly (IMHO) what we are doing.

It also fixes the bm test, now that you told me that ->unit is not...

ed487bb1 02/19/2010 11:33 pm Marcelo Tosatti

ide save/restore pio/atapi cmd transfer fields and io buffer

Save/restore information necessary to continue in progress PIO/ATAPI CMD
transfers.

This includes the IO buffer.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

428c149b 02/11/2010 12:53 am Christoph Hellwig

block: add topology qdev properties

Add three new qdev properties to export block topology information to
the guest. This is needed to get optimal I/O alignment for RAID arrays
or SSDs.

The options are:

- physical_block_size to specify the physical block size of the device,...
47c06340 01/20/2010 12:31 am Gerd Hoffmann

ide: device version property

This patch adds a new property named 'ver' to ide-drive which allows to
specify the version which the virtual disk/cdrom should report to the
guest. By default this is the qemu version (i.e. 0.12). usage:

-drive if=none,id=disk,file=......
90228ee3 12/13/2009 09:03 pm Igor V. Kovalenko

workaround for cmd646 bmdma register access while no dma is active

This is a workaround only, and is a partial revert
of a few changes to BMDMAState which removed pci_dev
field on the way.

- cmd646 pci_from_bm() expects bm->unit value to
correspond with bm data being passed to callback...

ce4b6522 12/03/2009 07:45 pm Kevin Wolf

ide: Implement rerror option

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

4a643563 11/07/2009 04:13 pm Blue Swirl

IDE: Fix reset handling

Problem: x86 systems could not survive a few system_resets.

Clear most of IDE state when reset. Implement the missing reset handlers.

Signed-off-by: Blue Swirl <>

407a4f30 10/27/2009 07:28 pm Juan Quintela

ide: port pci ide to vmstate

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

b3a7d328 10/27/2009 07:28 pm Juan Quintela

ide: pre VMState functions are not needed anymore

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

b38436e3 10/27/2009 07:28 pm Juan Quintela

ide: add VMSTATE_IDE_BUS and VMSTATE_IDE_DRIVES

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

96c35ceb 10/27/2009 07:28 pm Juan Quintela

ide: change identify_data type to uint8_t

It is used everywhere as uint8_t except in one place. Cast to uint16_t
in that place
Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

d1570baa 10/12/2009 05:42 pm Juan Quintela

ide: BMDMAState don't need a pci_dev field anymore

Patchworks-ID: 35306
Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

edcca5a3 10/12/2009 05:42 pm Juan Quintela

ide: Remove duplicated definitions

Patchworks-ID: 35297
Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

1f850f10 10/05/2009 05:32 pm Gerd Hoffmann

switch ide bus to inplace allocation.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

da4d0419 09/15/2009 10:23 pm Gerd Hoffmann

ide/qdev: add ide bus.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

88804180 09/15/2009 10:23 pm Gerd Hoffmann

split away drive init from ide_init2()

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 <>
Signed-off-by: Blue Swirl <>

f455e98c 09/04/2009 05:37 pm Gerd Hoffmann

ide: pass down DriveInfo instead of BlockDriverState

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

9cdd03a7 09/04/2009 05:37 pm Gerd Hoffmann

ide: move cmd+irq from IDEState to IDEBus.

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 <>
Signed-off-by: Anthony Liguori <>

757506d2 08/29/2009 04:37 pm Blue Swirl

Fix gcc 3 warning: comparison is always true due to limited range of data type

Signed-off-by: Blue Swirl <>

59f2a787 08/28/2009 04:46 am Gerd Hoffmann

ide: move code to hw/ide/

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>