[email protected] wrote:
> + list_for_each_entry(card, &host->cards, node) {
> + if (card->state & (MMC_STATE_DEAD|MMC_STATE_PRESENT))
> + continue;
>
Please use the macros.
> + if (card->csd.mmca_vsn < CSD_SPEC_VER_4)
> + continue;
> +
>
You need to check that the card isn't SD before you can look at that
part of the csd structure. BUG_ON or similar is acceptable if you
consider it an error to call this function if SD cards are present.
> + err = mmc_select_card(host, card);
> + if (err != MMC_ERR_NONE) {
> + mmc_card_set_dead(card);
> + continue;
> + }
> +
> + memset(&cmd, 0, sizeof(struct mmc_command));
> +
> + cmd.opcode = MMC_SEND_EXT_CSD;
> + cmd.arg = 0;
> + cmd.flags = MMC_RSP_R1;
> +
> + memset(&data, 0, sizeof(struct mmc_data));
> +
> + data.timeout_ns = card->csd.tacc_ns * 10;
> + data.timeout_clks = card->csd.tacc_clks * 10;
>
We have a new function for setting timeouts that you should use called
mmc_set_data_timeout().
Rgds
Pierre
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]