Search Linux Wireless

Re: wlcore-spi crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2014-01-31 at 11:25 -0500, Charles wrote:
> Thanks Luca,
> 
> >
> > Try this:
> >
> >
> > diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
> > index b2c018d..1278583 100644
> > --- a/drivers/net/wireless/ti/wlcore/spi.c
> > +++ b/drivers/net/wireless/ti/wlcore/spi.c
> > @@ -316,6 +316,16 @@ static int __must_check wl12xx_spi_raw_write(struct device *child, int addr,
> >         return 0;
> >  }
> >
> > +static int wl12xx_spi_power(struct device *child, bool enable)
> > +{
> > +       struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent);
> > +       struct wlcore_platdev_data *pdev_data = glue->core->dev.platform_data;
> > +
> > +       pdev_data->pdata->set_power(enable);
> > +
> > +       return 0;
> > +}
> > +
> >  static struct wl1271_if_operations spi_ops = {
> >         .read           = wl12xx_spi_raw_read,
> >         .write          = wl12xx_spi_raw_write,
> >
> > Note that this is only compile-tested, so I have no clue if it really
> > works.
> >
> > I'm *not* saying this is the right way to do it, I just hacked it up
> > quickly.
> >
> 
> I know there are not many wl1271 spi users out there, so I'm not sure
> how far down this lonely road I'll head, but we'll see.

Yeah, not many if any at all (besides you).  SPI seems to be so broken
that I'm pretty sure nobody else is using it with recent kernels. :(


> Yes this compiles as you say.  But wlcore_spi crashes when I load it:
> 
> root@sbc:~# modprobe wl12xx
> [   72.602903] Disabling lock debugging due to kernel taint
> [   72.616192] Loading modules backported from Linux version v3.12.8-0-g97f15f1
> [   72.623593] Backport generated by backports.git v3.12.8-1-0-geb41fad
> [   72.723635] cfg80211: Calling CRDA to update world regulatory domain
> root@sbc:~# lsmod
> Module                  Size  Used by
> wl12xx                 47146  0
> wlcore                164050  1 wl12xx
> mac80211              290411  2 wlcore,wl12xx
> cfg80211              194677  2 mac80211,wlcore
> compat                 11642  4 cfg80211,mac80211,wlcore,wl12xx
> autofs4                24712  2
> root@sbc:~# modprobe wlcore_spi

The right order would be to load wlcore_spi and that one would trigger
the other modules to be loaded.  But I don't think this will make much
difference in your case.




> root@sbc:~# [  102.873513] wlcore: loaded
> [  106.609236] Unable to handle kernel paging request at virtual
> address 00203fec
[...]
> [  107.124658] [<c02a0210>] (omap2_mcspi_transfer+0x0/0x410) from
> [<c029e280>] (__spi_async+0xb4/0xc0)
> [  107.134122] [<c029e1cc>] (__spi_async+0x0/0xc0) from [<c029e2dc>]
> (spi_async_locked+0x18/0x20)
> [  107.143118]  r6:cf099000 r5:cd015a84 r4:60000013 r3:00000000
> [  107.149062] [<c029e2c4>] (spi_async_locked+0x0/0x20) from
> [<c029e528>] (__spi_sync+0x90/0xa4)
> [  107.157967]  r4:cd015adc r3:00000000
> [  107.161719] [<c029e498>] (__spi_sync+0x0/0xa4) from [<c029e568>]
> (spi_sync+0x14/0x18)
> [  107.169898]  r7:cd08c000 r6:cd015c4c r5:00000000 r4:0000000a
> [  107.175852] [<c029e554>] (spi_sync+0x0/0x18) from [<bf10145c>]
> (wl12xx_spi_raw_write+0x13c/0x180 [wlcore_spi])
> [  107.186412] [<bf101320>] (wl12xx_spi_raw_write+0x0/0x180
> [wlcore_spi]) from [<bf0c5a04>]
> (wlcore_boot_upload_firmware+0x1bc/0x488 [wlcore])
> [  107.199570] [<bf0c5848>] (wlcore_boot_upload_firmware+0x0/0x488
> [wlcore]) from [<bf0ecd58>] (wl12xx_boot+0x954/0xe08 [wl12xx])
> [  107.211521] [<bf0ec404>] (wl12xx_boot+0x0/0xe08 [wl12xx]) from
> [<bf0b855c>] (wl1271_op_add_interface+0x3a0/0x800 [wlcore])
> [  107.223243] [<bf0b81bc>] (wl1271_op_add_interface+0x0/0x800
> [wlcore]) from [<bf0658d8>] (ieee80211_do_open+0x508/0xa70 [mac80211])
> [  107.235627] [<bf0653d0>] (ieee80211_do_open+0x0/0xa70 [mac80211])
> from [<bf065eb8>] (ieee80211_open+0x78/0x7c [mac80211])
> [  107.247145] [<bf065e40>] (ieee80211_open+0x0/0x7c [mac80211]) from
> [<c03a4a0c>] (__dev_open+0xb0/0x104)

This is crashing in a completely different place.

To tell you the truth, I think wlcore_spi should be completely disabled
in the kernel, because it seems to be *badly* broken.  It would be
better not to even pretend it is supported. :(

If you're willing to put the effort into fixing it, great! If not,
switch to SDIO and then we can remove SPI completely from the kernel
code.

--
Cheers,
Luca.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux