Re: Prerelease kernel will not hotplug a USB host-controller when it is inserted into a Cardbus slot.

2001-01-03 Thread Miles Lane

David Brownell wrote:



> The root cause seems to be the Cardbus/PCI hotplug invocation not
> happening for you.

Yep.

> Was this with or without the "pcmcia_cs" package installed?  My
> own take on it is that 2.4 _should_ hotplug that controller
> just fine if "pcmcia_cs" isn't installed.  Otherwise, I'd be
> pleasantly surprised to know it works properly.

You are more or less correct.  I've looked a little bit at
the source and now understand a little bit better.  It turns
out that parts of the Cardbus code in the kernel source
includes code from the pcmcia_cs package.  The "cs:" messages
in the log are generated by this code.  I *think* this code
reads configuration files from /etc/pcmcia, but I haven't
found the place in the code that does it.  Anyhow, these
messages:

cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x280-0x28f 0x378-0x37f 
   0x3a0-0x3a7 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.

change when I modify /etc/pcmcia/config.opts.
The /etc/pcmcia/config* files get installed by the pcmcia_cs
package, so even when I am only using the cardbus functionality,
there seems to be some need to pcmcia_cs, since the config.opts
file contains "magic" good defaults numbers for safe irqs, ports
and memory ranges.

As I have already discussed with David Brownell, there is huge a
problem getting a usable cardbus solution with the current pcmcia_cs
package.  Even when I tell it I am using a 2.4.0 kernel and that
I want to use the development kernel's drivers, it maps loads of
device IDs to the pcmcia_cs drivers which don't exist in this
configuration!  For example, it maps the 3c575 device ID to
3c575_cb instead of 3c59x.


>> For the Cardbus hotplug event, is it expected that the hotplug
>> debug info would be dumped after the insert event is processed
>> and the required driver is loaded?
> 
> 
> No -- you were seeing the USB hotplug event, not the cardbus one.
> 
> Plugging a cardbus OHCI into your machine should cause two hotplug
> events ... first for PCI, eventually modprobing "usb-ohci", and
> then as that module initializes you'll get a second one for USB,
> reporting a new (root) hub.
> 
> So you should see an invocation "arguments (pci) env (...)"
> followed by "arguments (usb) env (...)"; but you reported the
> second one.

Well, I have no idea why the "arguments (pci) env (...)"
message wasn't emitted.  I do know that with the test12-pre5
kernel I get working hotplug for the BusPort Mobile.

Thanks for all your help!

Miles

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Prerelease kernel will not hotplug a USB host-controller when it is inserted into a Cardbus slot.

2001-01-03 Thread Andrew Morton

Miles Lane wrote:
> 
> Hi Linus and Co.,
> 
> I am writing to let you know that in all test12-pre6+ kernels,
> I get a "Bad PCI invocation" error when hotplug attempts to
> handle the insertion of a USB host-controller into a Cardbus
> slot.

That message is coming from your hotplug scripts.

At approximately test12-o'clock the following change was made:

diff -u --recursive --new-file t12p7/linux/drivers/pci/pci.c linux/drivers/pci/pci.c
--- t12p7/linux/drivers/pci/pci.c   Thu Dec  7 15:56:26 2000
+++ linux/drivers/pci/pci.c Thu Dec  7 12:21:51 2000
@@ -360,9 +360,9 @@
if (!hotplug_path[0])
return;
 
-   sprintf(class_id, "PCI_CLASS=%X", pdev->class);
-   sprintf(id, "PCI_ID=%X/%X", pdev->vendor, pdev->device);
-   sprintf(sub_id, "PCI_SUBSYS_ID=%X/%X", pdev->subsystem_vendor, 
pdev->subsystem_device);
+   sprintf(class_id, "PCI_CLASS=%04X", pdev->class);
+   sprintf(id, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device);
+   sprintf(sub_id, "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, 
+pdev->subsystem_device);
sprintf(bus_id, "PCI_SLOT_NAME=%s", pdev->slot_name);
 
i = 0;

So I guess your PCI hotplug script hasn't caught up with this
change in the format of its arguments.

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/