From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCFeX-00085f-G7 for qemu-devel@nongnu.org; Tue, 08 Jan 2008 09:42:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCFeV-000851-IE for qemu-devel@nongnu.org; Tue, 08 Jan 2008 09:42:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCFeV-00084w-Ch for qemu-devel@nongnu.org; Tue, 08 Jan 2008 09:42:03 -0500 Received: from relay01.mx.bawue.net ([193.7.176.67]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JCFeV-0000BR-4E for qemu-devel@nongnu.org; Tue, 08 Jan 2008 09:42:03 -0500 Date: Tue, 8 Jan 2008 14:42:11 +0000 From: Thiemo Seufer Subject: Re: [Qemu-devel] [RFC] ide: multi-profile DVD-ROM support v2.1 Message-ID: <20080108144211.GA30298@networkno.de> References: <20080107122644.GE24641@tapir> <200801071536.15936.paul@codesourcery.com> <20080108124500.GA13619@tapir> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080108124500.GA13619@tapir> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Carlo Marcelo Arenas Belon Cc: Paul Brook , qemu-devel@nongnu.org Carlo Marcelo Arenas Belon wrote: > This is version 2.1 of the patch to re-implement the "GET CONFIGURATION" > MMC-6 command as used by the IDE emulation to match the published SPEC > and that was originally published in : > > http://lists.gnu.org/archive/html/qemu-devel/2007-11/msg00849.html > > Important changes from the previous patches : > > * Use a 99min CD size as the bigger possible sector count for CD profile > * Don't recalculate the number of sectors > * Use an inline helper function to set the profiles in a cleaner way > * Avoid extra computations from constants except for #define values > * Reduce the use of magic numbers and use defines when possible > > Remaining issues that will need to be addressed in future versions : > > * MMC-6 also applies to SCSI devices and so the definitions might need > to be moved to a common header when that code is developed. > * The use of the buffer might not be safe for unaligned access in some > architectures, but the same applies to all other commands that are > currently using the io_buffer directly as the hardware does. > * The heuristic used tries to guess the kind of media from the size of > it and is not that reliable for really small DVDs that could fit in a > CD. > * The response uses the io_buffer and is therefore limited to the size > of it (not really a problem now when the maximum response size will > be 20 bytes) but could be a problem when more features/profiles are > implemented. > * When using the host_device driver media changes could go unnoticed > and result in the wrong profile being selected due to limitations > in the current implementation of the ide emulation. Please add those caveats as comments to the source code. Thiemo