Libetas can not reload modules

Dan Williams dcbw at redhat.com
Wed Jun 17 09:43:19 EDT 2009


On Wed, 2009-06-17 at 10:08 +0800, Dongas wrote:
> 2009/6/17 Dan Williams <dcbw at redhat.com>:
> > On Tue, 2009-06-16 at 01:03 +0800, Dongas wrote:
> >> 2009/6/15 Jonathan Cameron <jic23 at cam.ac.uk>:
> >> >> 2009/6/13 Jonathan Cameron <jic23 at cam.ac.uk>:
> >> >>> Dongas wrote:
> >> >>>> Dear ALL,
> >> >>>>
> >> >>>> The issue i encounterred is that libertas modules can not be reloaed.
> >> >>>> (It works well when i first insmod them)
> >> >>>> I want to rmmod them and do the re-insmod, but the error message is
> >> >>>> shown as follows:
> >> >>>> # insmod libertas_sdio.ko
> >> >>>> libertas_sdio: Libertas SDIO driver
> >> >>>> libertas_sdio: Copyright Pierre Ossman
> >> >>>> ……
> >> >>>> libertas: failed to load helper firmware
> >> >>>> libertas leave: if_sdio_prog_helper(), ret -110
> >> >>>>
> >> >>>> After digging in the code, i found that the libertas driver will check
> >> >>>> IF_SDIO_IO_RDY and IF_SDIO_DL_RDY bit in IF_SDIO_STATUS register for
> >> >>>> the firmware downloading(CMD53 write) operation.
> >> >>>> However, the SDIO status read back of mine card indicated that the
> >> >>>> card IF_SDIO_DL_RDY bit was alway not set during the module reload
> >> >>>> operation.Then the timeout happened with '-ETIMEDOUT' returned.
> >> >>>>
> >> >>>> Is there any body know why?
> >> >>> This turns up on the mailing list from time to time.
> >> >>> I think the firmware still still doesn't play ball.
> >> >>
> >> >> Jonathan , thanks for your reply.
> >> >> (I havn't searched out many related mails failed by this issue in the maillist.)
> >> >> Could you please clarify a bit more?
> >> >
> >> > I think the last discussion about this was the one following on from...
> >> >
> >> > http://lists.infradead.org/pipermail/libertas-dev/2008-September/001928.html
> >> >
> >> >> Why the firmware still still doesn't play ball?
> >> > Don't know. Unfortunately I wasn't in a position to run Marvell's driver and find
> >> > out whether their reset code actually works, but we never managed to replicate it
> >> > using the in kernel code.
> >> >> Is there any way to fix this issue?
> >> > We never really managed to isolate the cause I'm afraid.
> >> >
> >>
> >> I also tried two methods in the thread you mentioned, a)
> >> enable/disable function and b) CMD_802_11_RESET command, but they
> >> didn't work as you experienced.
> >> From the discussion in that thread, it seems this issue has some
> >> relationship with HW errata of Marvell WiFi chip , right?
> >>
> >> I wonder did you find a work around solution for this issue at last?
> >>
> >> Since i'm using libertas driver in kernel 2.6.25, i'd also like to
> >> know if this issue still exists in kernel 2.6.29?
> >
> > It probably does.  If you're using an embedded system, you might be able
> > to hook up a GPIO to kill power to the card like the OLPC USB driver
> > does.  But at this time, there is no known way of fully resetting the
> > device other than cutting power to the 8686/8688 device.
> 
> Thanks a lot, Dan.
> Yes, i'm using an embedded system based on ARM926 core.
> We will try the HW method you mentioned.

See if that works; that's probably the *most* foolproof method at this
time.  On module unload, you'd toggle power to the card or something,
and then wait a few seconds, and then bring power back up so that
there's something to bind the driver to.

> > We'd need some insight into the firmware and bus-level stuff to figure
> > out why the card doesn't reset itself from CMD_802_11_RESET.  Maybe we
> > should investigate that again; the v10 docs still say CMD_802_11_RESET
> > is the correct method to return the card to a clean state.
> 
> Hmmm, i know Marvell  doesn't play well with community.
> AFAIK, Marvell never release the firmware code, right?
> So it may be hard to find the root cause.

Marvell is actually fairly good about playing with the community these
days, particularly in the ARM and ethernet space, and is fairly good
about the wifi space.

> BTW, it seems you have checked Mobin driver,
> How does it treat this issue?

I haven't checked, but it might make sense to do so.  I'd also actually
like to try CMD_802_11_RESET again just to make sure.

Dan

> > The sd8688 has additional commands that could also help here, Bing Zhao
> > has been adding support for those to 2.6.31 and later.  But I assume
> > you're using 8686 and thus those commands aren't supported.
> >
> I'm using 8686.
> 
> Thanks again for your kindly help.
> 
> Regards
> Dongas
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev




More information about the libertas-dev mailing list