Subject: Re: com_pcmcia.c and Lasat CREDIT288 faxmodem
To: tech-kern@netbsd.org, Stefan Grefen <grefen@hprc.tandem.com>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: tech-kern
Date: 01/12/2000 16:52:00
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
On Sat, Dec 26, 1998 at 08:41:59PM +0100, Stefan Grefen wrote:
> In message <199812230356.WAA25217@contents-vnder-pressvre.mit.edu>
> "Nathan J. Williams" wrote:
> >
> > >During attach, the modem gives us the normal port ranges for com1-com4,
> > >but cfe->num_iospace == 3 in the loop in com_pcmcia_attach(), so the card
> > >is ignored. When the attach retries, it is given the port range 0x330-0x337
> > >which the card doesn't seem to like.
> > ...
>
> I think the test in com_pcmcia.c:242
>
> if ((cfe->iomask != 3) && (cfe->iospace[0].start != 0))
>
> should be
> if ((cfe->iospace[0].start != 0)
>
> if cfe->iospace[].start != 0 it is safer to assume the card decodes the bits
> whatever the CIS states.
So, I finally got the machine back into my hands...
With 1.4.2_ALPHA, I have still the same problem.
I applied the patch suggested by Stefan Grefen, and it seems to work fine.
Is it generic enough to go into the tree?
FOr the patch, see below.
-is
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="laplace.patch"
Index: sys/dev/pcmcia/com_pcmcia.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pcmcia/com_pcmcia.c,v
retrieving revision 1.19
diff -u -r1.19 com_pcmcia.c
--- com_pcmcia.c 1998/12/24 03:59:00 1.19
+++ com_pcmcia.c 2000/01/12 15:49:30
@@ -239,7 +239,7 @@
* entry, which we want to avoid on the first pass and use
* exclusively on the second pass.
*/
- if ((cfe->iomask != 3) && (cfe->iospace[0].start != 0)) {
+ if (/* (cfe->iomask != 3) && */ (cfe->iospace[0].start != 0)) {
if (!pcmcia_io_alloc(pa->pf, cfe->iospace[0].start,
cfe->iospace[0].length,
0,
--YiEDa0DAkWCtVeE4--