rmmod libertas_sdio and reinsert causes problems with firmware upload.

Pierre Ossman drzeus-mmc at drzeus.cx
Tue Sep 2 11:05:07 EDT 2008


On Tue, 02 Sep 2008 10:38:15 -0400
Dan Williams <dcbw at redhat.com> wrote:

> On Mon, 2008-09-01 at 16:24 +0100, Jonathan Cameron wrote:

*snip*

> > 	ret = sdio_writesb(card->func, card->ioport,
> > 			   packet->buffer, packet->nb);
> > 	if (ret)
> > 		printk("failed?\n");
> > 	printk("I think I've reset the card by here?\n");

You might want to try this here:

sdio_func_disable(card->func);
sdio_func_enable(card->func);

Possibly also with a slight delay between the two. If the chip is
sanely designed, that should power down everything but the SDIO
frontend.

> > 	sdio_release_host(card->func);
> > 	msleep(2000);
> > release:

This should be further up or you can exit with the lock held.

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.



More information about the libertas-dev mailing list