aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-02-10 23:37:51 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-02-10 16:53:54 -0600
commit0009baf16c30f6a0ef4d9deadbabd53143ac3c93 (patch)
tree0751ad4b9405d6256913e75f7943ec1b0b337af5 /hw/ide/core.c
parentee3659e38580c64f7df74984ef09a2742958c8ab (diff)
ide: add topology support
Export the physical block size in the ATA IDENTIFY command. The other topology values are not supported in ATA so skip them. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 4cfaf38211..37a5151570 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -164,6 +164,8 @@ static void ide_identify(IDEState *s)
put_le16(p + 101, s->nb_sectors >> 16);
put_le16(p + 102, s->nb_sectors >> 32);
put_le16(p + 103, s->nb_sectors >> 48);
+ if (s->conf && s->conf->physical_block_size)
+ put_le16(p + 106, 0x6000 | get_physical_block_exp(s->conf));
memcpy(s->identify_data, p, sizeof(s->identify_data));
s->identify_set = 1;