Subject: Re: PCMCIA lossage
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 02/06/2000 23:37:13
Jason Thorpe wrote:

> On Sun, 06 Feb 2000 20:02:18 +0100
>  Lennart Augustsson <lennart@augustsson.net> wrote:
>
>  > I updated to current on my desktop and got the same problems with the ray driver
>  > as Peter Seebach reported.  I.e., it stopped working.
>  > The problem turned out to be the recent change in i82365.c that enabled
>  > 16 bit memory accesses.  By forcing mem8=1 in that file I can get things working
>  > again.
>  >
>  > I don't know PCMCIA, but I think the code in pcmcia/pcmcia.c looks suspicious.
>  > In pcmcia_function_enable() there is a call to pcmcia_mem_map() to map part
>  > of the PCMCIA device into memory.  But this call does not force 8 bit memory
>  > access.  What if the device cannot handle 16 bit access?  Shouldn't that call play
>  > it safe and always map in 8 bit mode?
>
> Seems more like the driver should supply the mem8 flag when necessary (even
> if the CIS doens't provide it).

Yes, that would work for the mapping from pcmcia_function_enable(), but I think
the code needs to be rewritten slightly to handle it.
Then there is the mapping of memory in pcmcia_scan_cis(), which happens
before we know anything about the card.  I think this mapping should be done
in 8 bit mode to be safe.


--

        -- Lennart