[laptop-discuss] Re: Re: Re: Cardbus report: PCMCIA CDMA modem
Vincent R Wang
Vincent.Wang at Sun.COM
Tue Nov 14 07:29:43 PST 2006
Douglas Atique wrote:
>>The first argument of ndi_devi_enter() is a dev_info
>>structure. It has
>>a devi_busy_thread member showing the thread that
>>blocks the caller of
>>ndi_devi_enter().
>>
>>
>
>I don't understand. Is this some sort of cooperative synchronization? Do you mean that one thread can "see" another thread that is blocking it? I thought all synchronization was handled in a very low level (even lower than device drivers and I/O) and was thus transparent to any code except the scheduler and maybe a few other very privileged bits...
>
>
>
This is very low level kernel code, with sufficient privilege. See the
source code of ndi_devi_enter() in usr/src/uts/common/os/devcfg.c.
You'll immediately understand what's going on.
>>mt_config_thread() and config_grand_children() are
>>deadlocking each other.
>>
>>
>
>I am not familiar with the code, so forgive me for this stupid question: If this deadlock is being caused by power management code, can we simply disable power management (I mean by commenting out the power management driver entry points) for the cardbus-related drivers? Could that provide a temporary workaround?
>
>
>
Disabling power management does appear to workaround the deadlock. I've
just tried it. It worked for me:
In usr/src/uts/common/pcmcia/nexus/pcmcia.c
@@ -403,12 +403,6 @@
* implement it.
*/
- if (pm_create_components(dip, 1) != DDI_SUCCESS) {
- cmn_err(CE_WARN, "%s: not power managed\n",
- ddi_get_name_addr(dip));
- } else {
- pm_set_normal_power(dip, 0, 1);
- }
/*
* setup the info necessary for Card Services/SocketServices
Need to recompile pcmcia from usr/src/uts/intel/pcmcia/Makefile.
DISCLAIMER: This is _not_ an official patch from Sun. Use at your own risk.
I'll investigate further to see if there's a better solution.
>By the way, I just downloaded and installed SXCR b51 and it deadlocks right on the first reboot after installation (while doing the "Configuring devices"). I also found out that my Toshiba BIOS has a PC Card configuration setting that can be set to "Automatic", "PCIC compatible" or "Cardbus/16-bit". On automatic, the b51 hangs on boot. On "Cardbus/16-bit" it panics on some dev configuration routine. I haven't tested "PCIC compatible" because I think it is not what we want.
>
>
>
Please use Cardbus/16-bit.
Toshiba laptops usually have a serial port. You may connect the RS232
port to another PC to diagnose the problems during boot.
- If it panicks, check the stack trace.
- If it hangs, press F1-a to drop into kmdb and use $<threadlist to
show all the threads. Need to edit the grub menu(press 'e' ) and use
the following boot options:
grub edit> kernel /platform/i86pc/multiboot -B console=ttya -k
Vincent.
>I wish I could understand what is going on and investigate the code myself.
>
>
More information about the laptop-discuss
mailing list