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:	Sat, 25 Jul 2009 19:40:30 +0100
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Adrian Hunter <adrian.hunter@...ia.com>
Cc:	Pierre Ossman <pierre@...man.eu>,
	"Lavinen Jarkko (Nokia-D/Helsinki)" <jarkko.lavinen@...ia.com>,
	"Karpov Denis.2 (EXT-Teleca/Helsinki)" <ext-denis.2.karpov@...ia.com>,
	linux-omap Mailing List <linux-omap@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 7/32] mmc: add host capabilities for SD only and MMC
	only

On Sat, Jul 25, 2009 at 07:17:14PM +0300, Adrian Hunter wrote:
> Matt Fleming wrote:
>>
>> And by saying what capabilities a host supports, when we add new
>> capabilities we don't have to modify existing code to say that it
>> doesn't support the new capability.
>
> If the capabilities are the other way around, then all existing drivers
> must be changed.  On the other hand, the if statement can easily be
> improved:
>
> #define mmc_cap_mmc(host) (!((host)->caps & MMC_CAP_NOT_MMC))
> #define mmc_cap_sd(host) (!((host)->caps & MMC_CAP_NOT_SD))
> #define mmc_cap_sdio(host) (!((host)->caps & MMC_CAP_NOT_SDIO))
>
> -	mmc_send_if_cond(host, host->ocr_avail);
> +	if (mmc_cap_sdio(host) || mmc_cap_sd(host))
> +		mmc_send_if_cond(host, host->ocr_avail);
> +

OK, that's a fair point, all drivers would need to be changed. However,
I'm not adverse to making a one-time change to all drivers in the name
of sanity. Enumerating what cards a controller doesn't support just
doesn't sound correct to me.

It wouldn't be a complicated change either, I'd even be happy to write
the patch ;-)
--
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