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]
Message-ID: <20140327001216.GC30531@saruman.home>
Date:	Wed, 26 Mar 2014 19:12:17 -0500
From:	Felipe Balbi <balbi@...com>
To:	Felipe Balbi <balbi@...com>
CC:	Balaji T K <balajitk@...com>, <chris@...ntf.net>,
	<ulf.hansson@...aro.org>, <linux-mmc@...r.kernel.org>,
	Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/5] mmc: host: omap_hsmmc: set max_blk_size correctly

Hi,

On Wed, Mar 26, 2014 at 07:04:50PM -0500, Felipe Balbi wrote:
> @@ -1867,6 +1879,37 @@ static inline struct omap_mmc_platform_data
>  }
>  #endif
>  
> +static void omap_hsmmc_set_max_blk_size(struct omap_hsmmc_host *host)
> +{
> +	struct mmc_host *mmc = host->mmc;
> +
> +	if (of_device_is_compatible(host->dev->of_node, "ti,omap4-hsmmc")) {
> +		u32 mem;
> +		u32 reg;
> +
> +		reg = omap_hsmmc_read_no_offset(host, OMAP_HSMMC_HL_HWINFO);
> +		mem = OMAP_HSMMC_HL_HWINFO_MEM_SIZE(reg);
> +
> +		switch (mem) {
> +		case 1:
> +			mmc->max_blk_size = 512;
> +			break;
> +		case 2:
> +			mmc->max_blk_size = 1024;
> +			break;
> +		case 4:
> +			/* FALLTHROUGH */
> +		case 8:
> +			/* FALLTHROUGH */
> +		default:
> +			mmc->max_blk_size = 2048;
> +			break;
> +		}
> +	} else {
> +		mmc->max_blk_size = 512;       /* Block Length at max can be 1024 */

looks like here, we could read CAPA register to figure out if older
devices support bigger block sizes. According to TRM, omap3 should
support 1024 just fine.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ