Received: from eggs.gnu.org ([208.118.235.92]:55309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T21pa-0006pC-5B for qemu-devel@nongnu.org; Thu, 16 Aug 2012 11:17:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T21pV-0008G6-03 for qemu-devel@nongnu.org; Thu, 16 Aug 2012 11:17:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T21pU-0008Fr-N5 for qemu-devel@nongnu.org; Thu, 16 Aug 2012 11:17:48 -0400 From: Markus Armbruster References: <1345124754-4173-1-git-send-email-peter.maydell@linaro.org> <871uj7diz7.fsf@blackfin.pond.sub.org> <201208161556.52432.paul@codesourcery.com> Date: Thu, 16 Aug 2012 17:17:41 +0200 In-Reply-To: <201208161556.52432.paul@codesourcery.com> (Paul Brook's message of "Thu, 16 Aug 2012 15:56:50 +0100") Message-ID: <87mx1u7tnu.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 0/3] Drop default SD card creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org, patches@linaro.org Paul Brook writes: >> On 16 August 2012 15:11, Markus Armbruster wrote: >> > Peter Maydell writes: >> >> As suggested in the recent discussion on Markus' patchset to suppress >> >> unused default drives, this patchset cleans up the omap and pxa2xx >> >> >> >> SD card controllers to behave like the other controllers: >> >> * the init function looks for the next IF_SD drive >> >> * if there isn't one, we start up as a controller with no card >> >> >> >> present >> > >> > Isn't this an incompatible change? Before, you get an SD card reader >> > backed by an empty BDS default. You can load/unload cards in the >> > monitor. After, you get an SD card reader that isn't backed by a BDS by >> > default. Device models prepared for that can treat it as permanently >> > empty. >> >> Hmm, yes, but most of our SD controllers already act that way. >> We should probably fix them all... >> >> So what's the block layer equivalent of drive_get_next() that always >> returns us something we can get a bdrv from? > > I think this may be the wrong way to fix this. SD cards aren't really have > removable media. In the same way that a SCSI HDD are generally not removable > media - you hotplug the whole drive. If an SD card device doesn't support media change, then the device model should: 1. Insist on non-null, non-empty BDS on initialization (this ensures we got media) 2. Not implement BlockDevOps method change_media_cb() (this ensures we keep it). > Don't we really want a proper QOM device for the SD card, with hotplug > support. Don't we really want that for any device model?