Received: from SOUTH-STATION-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA20989; Sun, 31 Dec 95 01:53:07 EST
Received: from pain.lcs.mit.edu by MIT.EDU with SMTP
	id AA20284; Sun, 31 Dec 95 01:52:58 EST
Received: (from daemon@localhost) by pain.lcs.mit.edu (8.6.12/8.6.9) id XAA06135; Sat, 30 Dec 1995 23:33:58 -0500
Received: from CHIMAY.MACH.CS.CMU.EDU by pain.lcs.mit.edu (8.6.12/8.6.9) with SMTP id XAA05980 for <port-i386@netbsd.org>; Sat, 30 Dec 1995 23:25:01 -0500
Received: from CHIMAY.MACH.CS.CMU.EDU by CHIMAY.MACH.CS.CMU.EDU id aa14405;
          30 Dec 95 23:24:55 EST
To: port-i386@netbsd.org
From: Dave Johnson <dbj@cs.cmu.edu>
Subject: PCMCIA problem with NetBSD 1.1
Date: Sat, 30 Dec 95 23:24:44 EST
Message-Id: <14403.820383884@CHIMAY.MACH.CS.CMU.EDU>
Sender: owner-port-i386@NetBSD.ORG
Precedence: list
X-Loop: port-i386@NetBSD.ORG

I'm trying to get Stefan Grefen's PCMCIA code to work in a NetBSD
1.1 kernel, running on an IBM ThinkPad 755Cs.  I started with the
NetBSD 1.1 port of the PCMCIA code done by John Kohl (from
ftp://sipb.mit.edu/pub/netbsd/pcmcia-1.1-diffs-95-12-03.gz) and
added them into a standard 1.1 kernel.  I then built a boot floppy
for the ThinkPad containing this kernel, following the same procedure
as used for the kcadp11 and kcoth11 floppies.

Everything works fine until I get to the PCMCIA initialization
during booting (after inserting the second floppy).  If the PCMCIA
slots are empty, it boots fine, but if I have any card in a slot
(I've tried an IBM Credit Card Adapter for Ethernet II, an AT&T
WaveLAN card, and an IBM Wireless Modem for Cellular/CDPD), it hangs
after telling what kind of card it found.

I've so far tracked the problem to the pcic_wait() routine, called
from the PCMCIA_OP_RESET case of pcic_service(), in dev/isa/pcmcia_pcic.c.
PCMCIA_OP_RESET executes twice during the initialization, and it hangs
on the second one.  After doing the reset, pcic_wait() is called to wait
for the PCIC_READY status.  For the second reset, though, the status
returned from all the pcic_rd() calls in pcic_wait() is 0x5f, which doesn't
include PCIC_READY.  The loop runs for a *long* time, then finally
times out and the initialization fails.

I don't currently have documentation for the Intel 82365 PCMCIA controller
in the ThinkPad, so I'm not sure what to try next.  If anyone else has
tried this, particularly on a ThinkPadb 755Cs, I'd appreciate any
suggestions.  Thanks...

					Dave

--
David B. Johnson                      E-mail: dbj@cs.cmu.edu
Assistant Professor                   Home page: http://www.cs.cmu.edu/~dbj
Computer Science Department           Phone: (412) 268-7399
Carnegie Mellon University            Fax: (412) 268-5576
5000 Forbes Avenue
Pittsburgh, PA  15213-3891

