lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 03 Oct 2006 19:50:21 +0200
From:	Pierre Ossman <drzeus-list@...eus.cx>
To:	philipl@...rt.org
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.18 2/2] mmc: Read mmc v4 EXT_CSD

philipl@...rt.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ