lkml.org 
[lkml]   [2006]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.18 2/2] mmc: Read mmc v4 EXT_CSD
philipl@overt.org 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-03 19:53    [W:0.044 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site