linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Cc: Kalle Valo <kvalo@adurom.com>,
	Grazvydas Ignotas <notasas@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: htc dream wl1251 and MSM_GPIO_TO_INT(29)
Date: Mon, 17 Jan 2011 10:08:53 -0500	[thread overview]
Message-ID: <20110117150853.GC20703@hash.localnet> (raw)
In-Reply-To: <1295047993.24338.66.camel@gnutoo-laptop>

On Sat, Jan 15, 2011 at 12:33:13AM +0100, Denis 'GNUtoo' Carikli wrote:
> The problem is the following:
> When I do that:
> modprobe msm_wifi, wich is the old wifi activator from bob copeland
> available here:
> http://bobcopeland.com/srcs/android/msm_wifi.patch
> 
> it freeze the phone, and watch -n 0.1 cat /proc/interupts trough ssh
> seem frozen too
> 
> Here's the code for passing the data :
> 
> static void trout_wl1251_init(void)
> {
>         struct wl12xx_platform_data trout_wl1251_pdata;
>         int ret;
> 
>         trout_wl1251_pdata.irq = MSM_GPIO_TO_INT(29);
>         if (trout_wl1251_pdata.irq < 0)
>                 goto fail_irq;

This can't ever be true, right?

>         trout_wl1251_pdata.use_eeprom = false;
>         ret = wl12xx_set_platform_data(&trout_wl1251_pdata);
>         if (ret < 0)
>                 goto fail_irq;

More often one uses "if (ret)" unless ret > 0 has special meaning.

> fail_irq:
>         printk("trout wifi GPIO failed\n");
>         gpio_free(TROUT_WIFI_IRQ_GPIO);

But you always free a gpio here, shouldn't there be a return in there
before the fail_irq label?

> }
>

> How should I start debugging that issue? do I need a serial cable for my
> device and kgdb(doesn't serial need IRQ?, maybe I should look how msm
> serial works)?

It could be an interrupt storm, but check the above code, and
also make sure you still have the dummy msm_wifi platform device too, and
that the msm_wifi driver is getting a struct wifi_platform_data.

Unfortunately, I don't know of an easy way to debug livelocks due to
interrupt storms other than by disabling everything and then enabling one
thing at a time until it breaks again.

It's obviously going to be a lot of work, but if you can manage to get
a current kernel booting on your hardware and dump the msm_wifi module,
that would be the ideal approach.

-- 
Bob Copeland %% www.bobcopeland.com


  reply	other threads:[~2011-01-17 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 23:33 htc dream wl1251 and MSM_GPIO_TO_INT(29) Denis 'GNUtoo' Carikli
2011-01-17 15:08 ` Bob Copeland [this message]
2011-01-20 12:55   ` Denis 'GNUtoo' Carikli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110117150853.GC20703@hash.localnet \
    --to=me@bobcopeland.com \
    --cc=GNUtoo@no-log.org \
    --cc=kvalo@adurom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=notasas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).