Bug 207910
Summary: | problem to detect modem on multifunction pcmcia cards | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Fabrice Bellet <fabrice> |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | fabrice, wtogami |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 2.6.20-1.2925.fc6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-03-15 21:33:52 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Description
Fabrice Bellet
2006-09-25 11:12:16 UTC
I inserted some debug statements with jprobes in the pcmcia code, and I have a better view of what certainly occurs: when powered up, the pcmcia card shows a single function (network), so the 3c589_cs is loaded. Then the 3CXEM556.cis firmware is loaded by the network driver, that overrides the cards buggy cis. Now the cis tells that the card has multifunctions (network+modem), but it's too late, because there's no pcmcia_bus_rescan() occuring after the new cis has been loaded. Does it make sense ? Created attachment 137504 [details]
linux-2.6.17-pcmcia-rescan-when-rewriting-cis.patch
The ret variable is not supposed to be zero here, because it is initialised to
the value of count (size of the cis file), and is only modified when
pcmcia_replace_cis() fails (-EIO). This patch forces a pcmcia_bus_rescan() when
writing a new cis file through the /sys/ interface.
Created attachment 137505 [details]
linux-2.6.17-pcmcia-delete-devices-after-cis-update.patch
When a new cis file is loaded, pcmcia_bus_rescan() is called, and nothing will
occur if the previous cis already provided a function that got registered.
This is the case with the megahertz 3CXEM556 B network/modem card : initially,
only the network function is advertized by the card.
Maybe we can assume that the previous registered information simply needs to be
dropped, before re-adding the card _from scratch_. This is what this patch
proposes.
It works for me : the modem function is correctly detected, I just need to
manually launch pcmcia-socket-startup, so pcmcia_bus_rescan() is called after
the new cis file has been loaded, triggered by the 3c589_cs module.
But : there's still an IRQ conflict between network and modem functions, that
cannot be used simultaneously. This is not really a problem, because a
workaround consists simply to disable the network device, and to autoconfigure
the serial port :
# ifconfig eth0 down
# setserial autoconfig auto_irq /dev/ttyS0
Created attachment 140264 [details]
start over after CIS override
Many thanks for debugging this issue. The attached patch should address it in a
slightly different way; for only in the "replace CIS" codepath devices will be
removed and re-added.
It works for me (2.6.19-rc4-git7). The pre-required steps now to make the modem function of my pcmcia card usable are : - prevents the network driver from being loaded (install 3c589_cs /bin/true in modprobe.conf), else there's irq conflict between network and modem function (see following log, "pcmcia: request for exclusive IRQ could not be fulfilled") - manually load the CIS file via sysfs (cat /lib/firmware/3CXEM556.cis > /sys/class/pcmcia_socket/pcmcia_socket0/cis), altough the CIS has already been loaded by the network driver from another code path (see following log too, "ds: trying to load firmware 3CXEM556.cis"). I'm wondering if the setup process could be somewhat automatized via the generic udev rules (does it make sense to blacklist this card in pcmcia-check-broken-cis for example ?) Created attachment 140463 [details]
log with 3cxem556-b multifunction card, kernel-2.6.19-rc4-git7 + dominik patch
Please see https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.17/+bug/52510 It is fixed for me now! Thanks to all the people involved! Now it works fine with kernel-2.6.20-1.2925.fc6 |