Re: Memory technology devices.

David Woodhouse (D.W.Woodhouse@nortel.co.uk)
Thu, 18 Sep 1997 09:36:08 +0100


dhinds@hyper.stanford.edu said:
> I think this is a complicated issue and requires some serious
> thought (which maybe should have gone on before writing any code,
> rather than after).

The code was only to give me a better idea of exactly what I'm dealing with,
and give a basis for a discussion. I'm quite happy to start again. It's just
that I find the best way of understanding the intricacies of what I'm doing is
to throw some code together and see what goes wrong. They're trying to train
me out of it, but... :)

> I'm afraid that you're probably not going to like this, but I have a
> completely different suggestion for how to go about implementing a
> more "generic" MTD system that would be inclusive of PCMCIA as well
> other types of memory devices.

You'd be surprised. I originally wanted to use the existing system, first by
getting my devices to pretend to be PCMCIA (if possible), and then by
splitting the MTD stuff from the PCMCIA distribution. I thought you might get
upset if I started doing things like that to your code, though, so I tried to
do it separately.

> Currently, the MTD Helper interface I've implemented is somewhat
> incomplete, because for purely PCMCIA applications, I only coded what
> I had to. It is "impure" in the sense that the existing MTD's also
> make direct Card Services calls. This interface could be fleshed out
> by adding one or two new services, and implementing the unimplemented
> ones, so that an MTD could rely entirely on this interface and not
> call Card Services directly. Then, Card Services could become just
> one of several providers of MTD helper support. The existing bulk
> memory services code in Card Services could be broken out into a
> separate module (probably not too difficult, since they are already
> in a separate compilation unit), which would provide a generic
> interface for MTD-supported PCMCIA as well as non-PCMCIA devices.
> There are still a number of tricky issues to be dealt with, such as
> how PCMCIA events would be passed through the various layers.

> I think the PCMCIA MTD specification is, over all, a good starting
> point for thinking about how to do this in a general way, and I would
> much rather keep the same structure rather than reimplement the same
> functionality with a completely new API.

Sold. I'll disappear into the woodwork for a while longer and see what I can
manage.

Thanks for the input.

-- 
David Woodhouse,	CB3 9AN		http://dwmw2.robinson.cam.ac.uk/
	dwmw2@cam.ac.uk 		 Tel: 0976 658355        
	D.W.Woodhouse@nortel.co.uk	 Tel: 01279 402332