All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: qemu-devel@nongnu.org, "Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [Qemu-devel] [PATCH 5/5] ide: add topology support
Date: Wed, 10 Feb 2010 23:37:51 +0100	[thread overview]
Message-ID: <20100210223751.GE11405@lst.de> (raw)
In-Reply-To: <20100210223649.GA11405@lst.de>

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>

Index: qemu/hw/ide/core.c
===================================================================
--- qemu.orig/hw/ide/core.c	2010-02-10 20:08:51.328254308 +0100
+++ qemu/hw/ide/core.c	2010-02-10 20:10:09.546152407 +0100
@@ -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;

  parent reply	other threads:[~2010-02-10 22:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 22:36 [Qemu-devel] [PATCH 1/5] virtio-blk: revert serial number support Christoph Hellwig, Christoph Hellwig
2010-02-10 22:37 ` [Qemu-devel] [PATCH 2/5] block: add topology qdev properties Christoph Hellwig
2010-02-10 22:37 ` [Qemu-devel] [PATCH 3/5] virtio-blk: add topology support Christoph Hellwig
2010-02-10 22:37 ` [Qemu-devel] [PATCH 4/5] scsi: " Christoph Hellwig
2010-02-10 22:37 ` Christoph Hellwig [this message]
2010-02-11 14:26 ` [Qemu-devel] [PATCH 1/5] virtio-blk: revert serial number support Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100210223751.GE11405@lst.de \
    --to=hch@lst.de \
    --cc=martin.petersen@oracle.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.