On 16 August 2012 16:17, Markus Armbruster <arm...@redhat.com> wrote:
> Paul Brook <p...@codesourcery.com> writes:
>> 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)

This seems to be trying to draw a distinction that I don't understand.
The SD card *is* the media, it's the physical object you stuff in and
out of the slot on the side of your device.

I guess that that means that "change SD card" should ideally be modelled
as "destroy the sd.c device object and create a new one and reconnect
it to the controller" but we don't really model things quite in the
right way to permit that, so we fake it up at the moment by allowing
the underlying BDS to change its idea of media. This works except
that if the initial state is "no card present" we have a NULL BDS rather
than one which is non-NULL but has no media at the moment.

(I think Paul is suggesting that we should fix our model to
move closer to this idea rather than faking things...)

-- PMM

Reply via email to