Search Linux Wireless

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

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

 



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.

Best Regards,
Michał Mirosław
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux