Subject: Clios and CF Cards...
To: None <>
From: Matthew Orgass <>
List: tech-kern
Date: 11/16/2004 20:30:41
  I previously posted about strange PCMCIA behavior I was seeing on my
Clio C-1000 trying to use a Ratoc CF USB Host Controller:

  On the C-1000, PCMCIA reads and writes for this card would sometimes be
bad.  I picked up a used Clio C-1050 (Vr4121, config patches for PCMCIA in
port-hpcmips/28228) to see if the card would work on that.  The one I have
is the MainStreet Networks branded version.  It most likely also has a
VG-469 PCMCIA controller (writing to an extended register works).  On this
machine, I get a bus fault in pcmcia_scan_cis (__bs_r_1) when the Ratoc
card is inserted.  I tried adding lots of delays in pcmcia_scan_cis and
adding as many extra wait states and memory access slowdowns I could find
(in both standard and extended registers).  The only thing that makes a
little difference is delays around the register accesses in
pcmcia_scan_cis (as exist in 2.0; changing the delays to 100000 makes no
extra difference), which just change the bus fault address (to 0x0e or
0x10 offset rather than 0, 2, or 4, although it still seems to be only one
or two non faulting reads).  Under CE, inserting the card causes an
incorrect driver setup dialog to appear which complains that the device is
unrecognized.  This dialog appears twice before getting the standard
unrecognized device dialog.  Sounds played (screen/keyboard tap) seem to
not end properly, giving a low "crashing"  sound that doesn't go away
until the card is removed (however, all other system operations that I
tried appear normal).  I noticed that on my PC the CIS version reported is
"PC Card Standard 8.0", which I have not seen on any other PCMCIA devices
I have (my PC PCMCIA controller is actually a cardbus controller, but with
only PCMCIA sockets, however the CIS on this card is read fine on an old
i386 laptop).  Lowering the ISA bus speed seems to have a similar effect
as the extra delays.

  The two compact flash cards and a PCMCIA hard drive that failed to work
on the C-1000 still don't work, but they now seem to probe correctly and
give "ready intr before drq" when I try to mount them.  They work in CE.
Slowing the ISA bus speed makes them work, but CE doesn't do this
(otherwise it would be set that way when NetBSD starts. I tried booting
with the card in, but not change).  Perhaps there are extra delays in the
CE driver?  However, it works fine on my PC as is. The default ISA speed
is about 5.6MHz, which seems likely to be slower than the PCMCIA bus speed
on the desktop system.  The slower speed I set is about 3.5MHz (I didn't
try any settings in between).  Slowing the bus speed does not make the
cards work on the C-1000.  Under -current (what I used on the 1050), no
drive is attached.  In 2.02_RC4 the drive is detected but cannot be

  Now that I bought a C-1050, I made some more progress on the Ratoc card
on the C-1000 :/.  I noticed that it repeats the data port for three
bytes, so I tried using offset 2 for the read instead of offset 1.  This
seems to work perfectly.  I tried several versions of a hpcmips_wbflush
function with the offset at 1 to make sure that this has nothing to do
with the write buffer, but none fixed the issue.  Under CE on the C-1000,
inserting the Ratoc card gives the expected "unrecognized card" dialog
with no unusual behavior of any kind.

Matthew Orgass