From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfLBz-00024P-DW for qemu-devel@nongnu.org; Wed, 10 Feb 2010 17:37:55 -0500 Received: from [199.232.76.173] (port=48307 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfLBz-000246-0B for qemu-devel@nongnu.org; Wed, 10 Feb 2010 17:37:55 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfLBy-0007Qh-04 for qemu-devel@nongnu.org; Wed, 10 Feb 2010 17:37:54 -0500 Received: from verein.lst.de ([213.95.11.210]:43233) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NfLBx-0007QL-Gp for qemu-devel@nongnu.org; Wed, 10 Feb 2010 17:37:53 -0500 Date: Wed, 10 Feb 2010 23:37:51 +0100 From: Christoph Hellwig Message-ID: <20100210223751.GE11405@lst.de> References: <20100210223649.GA11405@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100210223649.GA11405@lst.de> Subject: [Qemu-devel] [PATCH 5/5] ide: add topology support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, "Martin K. Petersen" 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 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;