Re: [PATCH] libertas/sdio: set ECSI and SCSI bits for 1-bittransfers

From: Daniel Mack
Date: Wed Mar 31 2010 - 05:08:51 EST


On Wed, Mar 31, 2010 at 11:07:06AM +0200, MichaÅ MirosÅaw wrote:
> 2010/3/30 Daniel Mack <daniel@xxxxxxxx>:
> [...]
> > @@ -1022,6 +1025,27 @@ static int if_sdio_probe(struct sdio_func *func,
> > Â Â Â Âif (ret)
> > Â Â Â Â Â Â Â Âgoto disable;
> >
> > + Â Â Â /* For 1-bit transfers, we need to enable the interrupt flags in
> > + Â Â Â Â* the CCCR register. Temporarily set the function number to 0
> > + Â Â Â Â* for that. */
> > + Â Â Â if ((host->caps & MMC_CAP_SDIO_IRQ) &&
> > + Â Â Â Â Â (host->ios.bus_width == MMC_BUS_WIDTH_1)) {
> > + Â Â Â Â Â Â Â unsigned int num = func->num;
> > + Â Â Â Â Â Â Â u8 reg;
> > +
> > + Â Â Â Â Â Â Â func->num = 0;
> > + Â Â Â Â Â Â Â reg = sdio_readb(func, SDIO_CCCR_IF, &ret);
> > + Â Â Â Â Â Â Â if (ret)
> > + Â Â Â Â Â Â Â Â Â Â Â goto release_int;
> > +
> > + Â Â Â Â Â Â Â reg |= SDIO_BUS_ECSI | SDIO_BUS_SCSI;
> > + Â Â Â Â Â Â Â sdio_writeb(func, reg, SDIO_CCCR_IF, &ret);
> > + Â Â Â Â Â Â Â if (ret)
> > + Â Â Â Â Â Â Â Â Â Â Â goto release_int;
> > +
> > + Â Â Â Â Â Â Â func->num = num;
> > + Â Â Â }
> > +
> > Â Â Â Âcard->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
> > Â Â Â Âif (ret)
> > Â Â Â Â Â Â Â Âgoto release_int;
>
> You should probably just use mmc_io_rw_direct() in this case instead
> of abusing func->num.

Hmm, that function isn't exported, and I didn't want to change this. You
say you'd prefer that? I can cook up something that does it, no problem.


Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/