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:	Wed, 27 Jan 2016 06:54:44 +0000
From:	Haibo Chen <haibo.chen@....com>
To:	Shawn Lin <shawn.lin@...k-chips.com>,
	Ulf Hansson <ulf.hansson@...aro.org>
CC:	"bcm-kernel-feedback-list@...adcom.com" 
	<bcm-kernel-feedback-list@...adcom.com>,
	"linux-rpi-kernel@...ts.infradead.org" 
	<linux-rpi-kernel@...ts.infradead.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Dong Aisheng <aisheng.dong@...escale.com>,
	Haibo Chen <haibo.chen@...escale.com>
Subject: RE: [RFC PATCH 14/21] mmc: sdhci-esdhc-imx: remove
 SDHCI_QUIRK_BROKEN_CARD_DETECTION

Hi Shawn, 

Comments below.



> -----Original Message-----
> From: Shawn Lin [mailto:shawn.lin@...k-chips.com]
> Sent: Wednesday, January 27, 2016 1:09 PM
> To: Ulf Hansson <ulf.hansson@...aro.org>
> Cc: bcm-kernel-feedback-list@...adcom.com; linux-rpi-
> kernel@...ts.infradead.org; linux-mmc@...r.kernel.org; linux-
> kernel@...r.kernel.org; Shawn Lin <shawn.lin@...k-chips.com>; Dong
> Aisheng <aisheng.dong@...escale.com>; Haibo Chen
> <haibo.chen@...escale.com>
> Subject: [RFC PATCH 14/21] mmc: sdhci-esdhc-imx: remove
> SDHCI_QUIRK_BROKEN_CARD_DETECTION
> 
> sdhci_esdhc_imx_pdata need SDHCI_QUIRK_BROKEN_CARD_DETECTION,
> so we replace it with MMC_CAP_NEEDS_POLL while probing. For other cases,
> we directly remove SDHCI_QUIRK_BROKEN_CARD_DETECTION.
> 
> Cc: Dong Aisheng <aisheng.dong@...escale.com>
> Cc: Haibo Chen <haibo.chen@...escale.com>
> Signed-off-by: Shawn Lin <shawn.lin@...k-chips.com>
> ---
> 
>  drivers/mmc/host/sdhci-esdhc-imx.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-
> esdhc-imx.c
> index f25f292..5705be1 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -952,8 +952,7 @@ static struct sdhci_ops sdhci_esdhc_ops = {  static const
> struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
>  	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_HISPD_BIT
>  			| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
> -			| SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC
> -			| SDHCI_QUIRK_BROKEN_CARD_DETECTION,
> +			| SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC,
>  	.ops = &sdhci_esdhc_ops,
>  };
> 
> @@ -1012,7 +1011,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device
> *pdev,
>  		return ret;
> 
>  	if (!IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc)))
> -		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> +		host->mmc->caps &= MMC_CAP_NEEDS_POLL;

You miss ' ~', seems you need to change to:
host->mmc->caps &=~ MMC_CAP_NEEDS_POLL;

> 
>  	return 0;
>  }
> @@ -1064,7 +1063,7 @@ static int sdhci_esdhc_imx_probe_nondt(struct
> platform_device *pdev,
> 
>  	case ESDHC_CD_CONTROLLER:
>  		/* we have a working card_detect back */
> -		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> +		host->mmc->caps &= MMC_CAP_NEEDS_POLL;

The same issue.

>  		break;
> 
>  	case ESDHC_CD_PERMANENT:
> @@ -1104,6 +1103,8 @@ static int sdhci_esdhc_imx_probe(struct
> platform_device *pdev)
>  	if (IS_ERR(host))
>  		return PTR_ERR(host);
> 
> +	host->mmc->caps |= MMC_CAP_NEEDS_POLL;
> +
>  	pltfm_host = sdhci_priv(host);
> 
>  	imx_data = devm_kzalloc(&pdev->dev, sizeof(*imx_data),
> GFP_KERNEL);
> --
> 2.3.7
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ