Bug 5224 - pcmcia.img doesn't recognise pcmcia controller
Summary: pcmcia.img doesn't recognise pcmcia controller
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: installer
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jay Turner
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-09-19 14:28 UTC by Hans de Goede
Modified: 2015-01-07 23:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-02-04 19:19:55 UTC

Attachments (Terms of Use)
This gzipped patch should fix the probe output parsing (499 bytes, application/octet-stream)
2000-01-19 17:08 UTC, Hans de Goede
no flags Details
Please use this one, the other one contained a minor oversight (504 bytes, application/octet-stream)
2000-01-19 17:15 UTC, Hans de Goede
no flags Details

Description Hans de Goede 1999-09-19 14:28:28 UTC
pcmcia.img (6.0.58):
Doesn't recognise the pmcia controller in my "unisys aquanta
en" laptop, this is a relabeled "acer nuovo 970" laptop. It
works fine with the stock rh-6.0 kernel. According to the
stock rh-6.0 kernel the pcmcia controller is a:
Linux PCMCIA Services 3.0.9
  kernelbuild: 2.2.5-15 #1 Mon Apr 19 22:21:09 EDT  1999
  options:  [pci] [cardbus] [apm]
Intel PCIC probe;
  Cirrus PD6729 PCI-to-PCMCIA at bus 0 slot 20, port 0x7010,
2 sockets
    hosts opts [0]: [ring] [1/3/2] [1/9/2]
    hosts opts [1]: [ring] [1/3/2] [1/9/2]

Comment 1 Hans de Goede 1999-09-19 14:56:59 UTC
Thought it might be helpfull to give the 6.0.58 installers output and
some more additional info:

---kernel vc ---
Linux PCMCIA Card Services 3.0.14
  kernel build: 2.2.12-5BOOT #1 Thu Sep 2 23:38:29 EDT 1999
  options  [pci] [cardbus]
Databook TCIC-2 PCMCIA probe: not found.

--- in installer log VC (I think it is VC 3) ---
* Flags are 0x2

* in startPcmcia()
* pmcia probe returned: |PCI bridge probe: not found.
intel PCIC probe: not found.
Databook TCIC-2 probe:   at 0x240: not found.
* need to load tcic
* going to insmod pcmcia_core.o
* going to insmod tcic.o
* failed to load pcic
* looking for devices on pci bus
* found nothing

--- And through the regular install screen it writes ---
p/tcic.o: init_module: Device or resource busy

--- cat /proc/pci output with rh6.0 ---
PCI devices found:
  Bus  0, device  0, function  0:
    Host bridge: PicoPower PT86C52x Vesuvius (rev 4).
      Slow devsel.  Master Capable.  No bursts.
  Bus  0, device  7, function  0:
    IDE interface: CMD 643 (rev 0).
      Medium devsel.  Fast back-to-back capable. Master Capable.
Latency = 32. Min Gnt=2.Max Lat=4
      IO at 0x7000 [0x7001].
  Bus  0, device  9, function  0:
    VGA compatible controller: Neomagic MagicGraph 128V (rev 1).
      Medium devsel.  Fast back-toback capable.  IRQ 9.
      Prefetchable 32 bit memory at 0x3000000 [0x3000008].
  Bus  0, device  11, function  0:
    Bridge: PicoPower Unknown device (rev 0).
      Vendor id=1066. Device id=2.
      Medium devsel. Master Capable. No bursts.
  Bus  0, device 20, function  0:
    PCMCIA bridge: Cirrus Logic CL 6729 (rev 254).
      Slow devsel.
      IO at 0x7010 [0x7011].

Comment 2 Michael K. Johnson 1999-09-25 03:08:59 UTC
Have you tried shutting the laptop off completely and trying again?
I've gotten the same error sometimes on a laptop here, but shutting
down completely, including removing and re-inserting the pcmcia
card, always fixed it for me.

Comment 3 Hans de Goede 1999-09-27 22:51:59 UTC
Doing a "cold" boot as far as laptop can do a cold boot, both with and
without my network card inserted doesn't help. Please note that my
pcmcia controller is a pci controller yet it not found by the PCI
probe, nor by the Intel PCIC probe by which it is recognised by RH-6.0
with the stock kernel and with a new kernel with pcmcia 3.1.0

Comment 4 Hans de Goede 1999-09-28 00:23:59 UTC
I've been reading the pcmcia-loader's sources and amongst other things
it contains:

   /* So this is totally counter-intuitive. Just remember that probe
       stops printing output once it finds a pcic, so this is actually
       correct */

    if (strstr(buf, "TCIC-2 probe: not found")) {
        logMessage("no pcic controller found");
    } else if (strstr(buf, "TCIC"))
        pcic = "tcic";
        pcic = "i82365";

But as already said in my first additonal comment, in the
loader-log-VC there is the following log:

* pmcia probe returned: |PCI bridge probe: not found.
intel PCIC probe: not found.
Databook TCIC-2 probe:   at 0x240: not found.

Look at the very strange: "    at 0x240: not found". in there wich
screws up the above piece of code, then again of course the probe
should find my pcmcia controller instead of not finding anything and
giving this strange output.

The probe of pcmcia 3.1.0 also gives this strange output on my
aquanta, but pcmcia works fine with this release, since the default
redhat initscripts don't use probe, but the settings in
/etc/sysconfig/pcmcia which where made by redhat-6.0's installer which
seems todo the right thing.

I also checked the probe distributed with a clean redhat6.0 install,
this gives the same strange output, so I guess redhat6.0 did
this different?

Okay, just got a bit further, the pci table in probe.c as distributed
with the later pcmcia's reads:

pci_id_t pci_id[] = {
    { 0x1013, 0x6729, "Cirrus Logic CL 6729", "Cirrus PD6729" },
    { 0x1013, 0x1110, "Cirrus Logic PD 6832", "Cirrus PD6832" },

Which according to pci.h in the linux kernel sources should be:

pci_id_t pci_id[] = {
    { 0x1013, 0x1100, "Cirrus Logic CL 6729", "Cirrus PD6729" },
    { 0x1013, 0x1110, "Cirrus Logic PD 6832", "Cirrus PD6832" },

And since /proc/pci identifies the pcmcia controller properly this
will probably fix my problem ;)

To verify this I checked what the pcmcia drivers use since they work
and they use:

    { "Cirrus PD6729", IS_CIRRUS|IS_PCI,

They use the kernel defines and they work fine, so I'm pretty
confident this should be changed.

Note though that this doesn't fix the broken behaviour regarding the
strange: "    at 0x240: not found" output even with this the installer
should still say that it couldn't find my pcmcia controller, instead
of try to install a module for a device which isn't there.

I just tried to built a new pcmcia disk with the pci-table changed as
described above, but I couldn't rebuild it with the misc tree from the
latest snapshot.

I had 3 problems:
-didn't recurse into the loader dir
-loader/pcmcia-install/include/linux/config.h is missing
-references syslinux-1.43 but ships with 1.45

With these 3 problems fixed, I could make a new install disk but ti
doesn;t get anyfurther then:

VFS: Mounted root (ext2 filesytem).

So I wonder if you couldmake me a new pcmcia disk with the above fix
in so that I can test if that fixes my problems.

Comment 5 Hans de Goede 1999-10-06 14:55:59 UTC
I can't seem to build a working loader myself.
So I took the loader from pcmcia.img and with a hex-editor replaced:
0x13 0x10 0x29 0x67
0x13 0x10 0x00 0x11

After doing this and placing the modified loader back in pmcia.img
(through a loopback device mounted from a loopback) RH-6.1 works fine
on this laptop, which again confirms this fix is valid.

I also mailed the pcmcia maintainer about this and the fix is in
pcmcia_cs-3.1.1. And afaik Bill Nottingham also has fixed this in the
current RH tree, but too late for 6.1.

So I guess this bug can be closed if:
-it is fixed in yuor current tree
-or you will upgrade your current tree to pcmcia_cs-3.1.1

Comment 6 Hans de Goede 1999-12-21 15:15:59 UTC
Before the bug is closed, it might be a good idea to change the probe output
paring so that it doesn't fail on the strange "    at 0x240: not found" output,
or similar output's by just checking for not found in each line of the output.

Comment 7 Hans de Goede 2000-01-19 01:00:59 UTC
The pcmcia loader works fine with the 6.2 beta, but it should still be modified
to cope with the strange: "    at 0x240: not found" output. I think I know why
this happens, the laptop has a soundcard on this io, and since it didn't find
the pci pcmcia controller, due to the pci-id bug which is fixed now, it thought
it found something at 0x240, and decided in the end that it wasn't a pcmcia

I think the c-code:
    if (strstr(buf, "TCIC-2 probe: not found")) {
        logMessage("no pcic controller found");
    } else if (strstr(buf, "TCIC"))
        pcic = "tcic";
        pcic = "i82365";

Should be changed to handle this, but I'm currently out of cafeine. so I won't
try right now ;)

Comment 8 Hans de Goede 2000-01-19 17:08:59 UTC
Created attachment 66 [details]
This gzipped patch should fix the probe output parsing

Comment 9 Hans de Goede 2000-01-19 17:10:59 UTC
The just attached patch should fix the parsing of the strange output.
I haven't even compiled this! since I've tried to compile the loader diskette
myself before without any success. Couldn't someone write some docs on this?

Comment 10 Hans de Goede 2000-01-19 17:15:59 UTC
Created attachment 67 [details]
Please use this one, the other one contained a minor oversight

Comment 11 Jay Turner 2000-02-04 19:19:59 UTC
Am closing out this bug as you say that it is fixed.  In addition, I am making
sure that Bill puts the patch you sent in somewhere that he will remember to
include it in the distribution.

Thanks for all of the effort!

Note You need to log in before you can comment on or make changes to this bug.