LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Cardbus card is not recognized (vendor 0xffff) (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/cardbus-card-is-not-recognized-vendor-0xffff-85845/)

angryziber 08-26-2003 08:54 AM

Cardbus card is not recognized (vendor 0xffff)
 
Hi everybody!

I'm stuck with my Trendnet TEW-221PCI wireless lan card not working in Linux... (it works in Windoze 2k). Card insertion is detected, but the card itself is not recognized.

Here is what I get:
cs: cb_alloc(bus 2): vendor 0xffff, device 0xffff
PCI: device 02:00.0 has unknown header type 7f, ignoring.
PCI: No IRQ known for interrupt pin ? of device 02:00.0

cardctl status:
Socket 0:
3.3V CardBus card
function 0: [ready]

cardctl ident:
Socket 0:
no product info available

I have several kernels (RH 9.0 and customly built 2.4.21 and 2.4.22) and manually installed pcmcia-cs-3.2.4.

The card uses ADMtek 8211 chipset (if that matters). Unfortunately I don't have other cards to test, but this one works in Windows on the same machine...

I'm really stuck, so any advice is appreciated.

akaBeaVis 08-26-2003 08:57 PM

does lspci -vv also show no interrupt for the card? Admtek has linux source code for a driver on their site, it works for my dwl-650v2.

angryziber 08-27-2003 02:44 AM

I cannot even get to the driver, when I try to load it by calling insmod, it says "No device found".

The problem is that the card is not recognized.

"lspci -vvv -x" gives all values as 0xff and states that the vendor and device IDs are illegal. The dump is also filled with FFs.

I tried disabling PCMCIA support in the kernel and using drivers from pcmcia-cs - it gave me the same result as well as a new error message "No valid ROM images found".

I don't understand where the problem might be, it is most likely something with initialization of the card on lower level - the card basically cannot be read at all. However, it works in Windows perfectly. Trendnet's website says that this card is Linux-compatible, the problem is definitely not related to this specific card. Card insertion is detected, though ("cardctl status" says that a 3.3V cardbus card is inserted).

It is even more weird that I cannot find anybody with the same problem on the internet...

Does anybody know the exact sequence of cardbus card initialization?

What "cardmgr" does with cardbus cards? Has "hotplug" anything to do with them? How are they related with PCI bus drivers?

Thanks!

akaBeaVis 08-27-2003 08:59 PM

On Mdk 9.0 at least, /sbin/hotplug is a script that is called by the kernel when a hotplug event occurs, this is consistent with the documentation here:
http://linux-hotplug.sourceforge.net/

As you follow the script it takes you inevitably to /etc/hotplug and the "agent" scripts there, as you follow the pci.agent, it becomes obvious that Mdk 9.0 searches only the /lib/modules/`uname -r`/modules.pcimap file for a matching module. Scripts placed in the /etc/hotplug/pci directory which are namesakes for loadable modules will get run when those modules are inserted.

That "no valid ROM images" thing sounds like a firmware issue, maybe... Is there a firmware upgrade for the card on trend's site or any discussion of firmware there? I'm guessing cardctl ident returns nothing useful. If it weren't for the fact that the card is functional in Windows, I would tell you that it's defective. But then again, if I knew nothing about winmodems and someone told me their modem works fine in windows, but won't work at all in linux, I could say the same thing about their winmodem... hmm, I wonder if the architecture of this card is like the architecture of a winmodem, it works in windows, but lacks enough hardware to function outside of windows...just a wacky theory

Scratch that theory, now that I think about it again and connect these 2 things in your posts:
1. no interrupt for the device (thus all the FF's)
2. nobody else seems to have the same problem

I wonder if this is actually just *hardware* issue related to the system bios settings assuming the os is windows, how do your bios settings look? Is there a choice on pcic settings? This seems to be the most likely explanation.

angryziber 08-28-2003 06:54 AM

About hotplug: who does send these hotplug events? I guess these can be interrupts from the cardbus controller, but some code must respond to them and generate these events. What is responsible for this, kernel or cardmgr?

There are no firmware upgrades available and the card is listed as Linux-compatible everywhere. Moreover, I have the driver for it, but it doesn't see the card.

About BIOS settings: not many of them in my BIOS. There is nothing related to PCIC, PCMCIA or Cardbus.

There is a setting, though, called "Installed OS". It has 2 options: Windows and Linux. I always leave it at Linux. I tried changing it, but it doesn't affect neither Linux nor Windows.

BTW, what do you mean by "no interrupt for the device" (no hardware interrupt pin connection, interrupt is not generated, no software interrupt handler?)
Do you know how do cardbus cards are initialized?

Thanks again for spending time and answering!

akaBeaVis 08-30-2003 03:31 PM

sorry, didn't notice your response until now...

about hotplug, the kernel notifies of a hotplug event (if compiled for hotplug), /sbin/hotplug takes it from there, invoking the proper "agent" for the event, which in your case should be /etc/hotplug/pci.agent, here's an excerpt from that file describing the params passed (environment vars set by kernel):

# Kernel Cardbus/PCI params are:
#
# ACTION=%s [add or remove]
# PCI_CLASS=%06X
# PCI_ID=%04X:%04X
# PCI_SLOT_NAME=%s
# PCI_SUBSYS_ID=%04X:%04X

the pci.agent in turn reads /lib/modules/`uname -r`/modules.pcimap and tries to find the best match for a module to load. That file is generated on a depmod -a. You can see lines in your /var/log/messages containing "setup somemodule for ...." that are the result of the agent's activities. This is a somewhat condensed version of events, but describes in brief how cardbus cards are initialized by the kernel at plug-time.

"PCI: No IRQ known for interrupt pin ? of device 02:00.0"

To me, this is the underlying problem that must be solved, without an interrupt the card isn't going to respond to anything. To me, this is not yet a software problem, ie: which module will work, or is pcmcia installed, etc... It's a hardware problem until you get an interrupt, as far as how, I'm none too sure, but perhaps browsing dmesg or things logged in /var/log/messages at boot will point the way if this is a conflict of some sort. Seems to me eventually a kernel parameter will have to be passed at bootup.

Can you bring this card up in windows and from the device manager (or equivalent) post what resources it's using? Irq, io addresses, dma channels, etc.

also, this could be an apm, or apic conflict of some sort, try it both ways, with and without apmd. Also, are there apic bios settings available?

angryziber 08-31-2003 02:12 PM

Thank you very much for detailed answers!

No conflicts can be seen in dmesg and /var/log/messages.
If it were conflicts, I wouldn't ask questions here :-)

My BIOS doesn't support APM, only ACPI. Disabling ACPI kernel support doesn't help. No APIC BIOS settings available.

Card resources in Windows:
IO Range: 0xFF00 - 0xFEFF
Memory Range: 0xFFDFFC00 - 0xFFDFFFFF
IRQ: 11
(this irq is used by plenty of devices)

But I have noticed one interesting thing: while Linux tries to find the card on PCI bus 2, Windows shows that it is on PCI bus 129...

Here is the full output of "lspci -v":
http://srv.angryziber.com/lspci.txt

How to ask Linux to try different bus? Maybe this can help?

akaBeaVis 09-01-2003 10:13 PM

I am personally not aware of any way to tell linux to change it's bus numbering scheme, outside of hacking the kernel source, I would doubt that it's possible. The pervasive use of irq 11 is indicative of the whole annoying acpi thing, as if there's really an IRQ 19 or something...it annoys me on a couple of my boxes too.

Though I've searched, I haven't turned anything useful up as of yet, this one's a stumper. I will soon be in the same boat as you, as I just ordered my very own trendware 802.11b pci card and should get my hands on it in a few days, If (I mean when!) I get it working, I'll post back.

"If it bleeds, we can kill it".

angryziber 09-02-2003 02:29 AM

Thank you very much for guiding me - I have finally found the solution!

I was trying all possible kernel boot parameters sequentially and "pci=assign_busses" really did help!

Now my card is recognized by PCI layer, and it is still on PCI bus 2.

Very weird that "pci=nobios", "pci=conf1", "pci=conf2", "pci=noacpi" doesn't work, only this "pci=assign_busses" does help. I wonder what it changes... Does it mean that I have any BIOS problems?

akaBeaVis 09-02-2003 08:55 PM

this is indeed good news, tell me where did you get the list of all possible kernel parameters from? I can't say whether you've got bios problems or not, may just be your bios is aimed squarely at windows, and linux has to make-do.

angryziber 09-03-2003 03:10 AM

I've got the list from Linux BootPrompt HOWTO, which is available from e.g. here: http://www.linuxhq.com/ldp/howto/BootPrompt-HOWTO.html

akaBeaVis 09-03-2003 06:31 PM

Thanks, I've been looking for a comprehensive list, excellent info!

angryziber 09-04-2003 04:35 AM

Now my card cannot detect any APs and no LEDs are flashing on it. Again, in Windows it works perfectly... :-(

When I try "iwconfig eth1 essid any", nothing happens and /proc/net/wireless has all values as zeroes.

I don't get any errors anywhere, though. According to wireless tools, it seems that communication with the card is working perfectly, but it cannot detect any signal.

8211.o driver from ADMtek is reported as "unused" by lsmod.

akaBeaVis 09-04-2003 08:21 PM

That is indeed strange, the card was fully functional and now nothing? Can you think of anything that might have changed? Is this perhaps the first time you shut down the machine since it used to work. This may sound odd but it won't hurt to try it:
iwconfig eth1 mode ad-hoc, and then iwconfig eth1 mode managed. Then go with essid.

the trendnet pci card I alluded to above arrived yesterday, don't have the model number in front of me, but the card is most definitely an admtek, It's clearly labeled on the large chip, well, I'm about to try it out, I'll let you know what happens

oops, forgot to ask this:
what does the log show? is there a long list of log entries to the effect that the card is switching channels?

angryziber 09-05-2003 12:33 PM

The problem is that the card never was fully functional.
It is detected by PCI layer now, I am able to load the driver. While using wireless tools I don't get any errors - everything's just looks like there are no access points in the range at all.

I tried setting modes as you suggested, I also tried to set essid and channel to the correct value (instead of "any") with no luck.

Unfortunately, there is no messages in the log about channels. I get no messages in the log about my wifi card after the driver has been loaded.

I don't have much experience working with wifi cards, so I don't know what am I doing wrong.


All times are GMT -5. The time now is 03:24 AM.