Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp674072ybl; Wed, 8 Jan 2020 04:04:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxosnZnePvCs72cwB5ZoBeISLAEmRIeFj+pCf+JKahcLIdpp6XV7eR2QN5G6DEn/g07yXW8 X-Received: by 2002:aca:1a05:: with SMTP id a5mr2813237oia.97.1578485085778; Wed, 08 Jan 2020 04:04:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578485085; cv=none; d=google.com; s=arc-20160816; b=BgEshRxamxqI5lMK33Ke1eGOI6PMIlbB8MagD8iNwXQyEfnlmlll/mfQQUcQbR31WZ Khq6fkJoA0M/2Cnwqjxhb80W2ER8Zu0Ny6JCM9AUxhcLI+zZdWsmfq08CzHCl0PRfRYN vc/aloZfhMNKNMx+ruv55agCG9fYuSabapPPB4vs6GZSQazj9M/6VNaEHi/ZPO50Q6UF N6WzgCTs/EtW4U2Vn88nPQoW5nKal+YAyTSn/SbFyfPGlObjEdSKTb5HS5/6E/27f7Av OG7V00FzL600Pv/nliYFqjZ/ch8Q/zYg0Rj1tZS6a7DkVHT/UIyhimzZgdW2XbClItAg 7syA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=TS4HVoZf6mCDU3VkYm2kQBuI8PTmVXqYeMVkBBo4qSo=; b=jRtyaPmFhwxbxJeDZJixbOQyKnrdvtRFzawvQmG9iK4GJ3myE7Ul2L2EZxUX9mpYOT a7rs6CpKKuD1k7JwcO10g6ssNz/0sPR0SuXf8ExAyCVYs32kP5v4YeU/iAwAv2fWOlju 2ej/XeCnd3qD2C0ch2Mb8sttqmBAHVfXapudOsfzs9caZVFDLFBpt3rCnLWmTjs5wNBM IT9dcfd9OzN+t3B62noAAWmj7/4bUKN3sfPxbs3Vh3Bk78Mcd1Zt8peJxVi0EW5Y6hAC rW+riLIia90fwG+dnoVOHKd9aViHjXBlUFw5WXtpro8lMLqjMRmZKmmURxgvPAe8GzUe kLtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=atpPpGq2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si1623673otk.177.2020.01.08.04.04.32; Wed, 08 Jan 2020 04:04:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=atpPpGq2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727319AbgAHMDO (ORCPT + 99 others); Wed, 8 Jan 2020 07:03:14 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:35500 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726852AbgAHMDO (ORCPT ); Wed, 8 Jan 2020 07:03:14 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 008C342V120327; Wed, 8 Jan 2020 06:03:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1578484984; bh=TS4HVoZf6mCDU3VkYm2kQBuI8PTmVXqYeMVkBBo4qSo=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=atpPpGq2XvtsQ//KW8+fgVuabAV6GRlgP7mE18I/Ay5fmfO8YE72K9StNDvWn+XmI SZXJqfQ1/bkA65Gd7Qxjx+xSUbA1YdOrtgOlW57yoTOrym+qyZ7FLXGxbIcL+d4MQf Yz4mKodE9ABZE0MgNl8olYIvGgaFEBWsuZBQNm0Y= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 008C34p1101107 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 8 Jan 2020 06:03:04 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Wed, 8 Jan 2020 06:03:03 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Wed, 8 Jan 2020 06:03:03 -0600 Received: from [172.24.190.4] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 008C31iN107760; Wed, 8 Jan 2020 06:03:02 -0600 Subject: Re: [PATCH 0/3] Fix issues with command queuing in arasan controllers To: Adrian Hunter , , CC: , References: <20191230092343.30692-1-faiz_abbas@ti.com> <837996b2-c69f-1446-fda4-5577e28ba8e1@ti.com> <9c74c1b9-8ae4-49be-68e3-8e827d07cc66@intel.com> From: Faiz Abbas Message-ID: Date: Wed, 8 Jan 2020 17:34:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <9c74c1b9-8ae4-49be-68e3-8e827d07cc66@intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adrian, On 08/01/20 5:29 pm, Adrian Hunter wrote: > On 8/01/20 1:49 pm, Faiz Abbas wrote: >> Adrian, >> >> On 08/01/20 5:12 pm, Adrian Hunter wrote: >>> On 8/01/20 1:30 pm, Faiz Abbas wrote: >>>> Hi, >>>> >>>> On 30/12/19 2:53 pm, Faiz Abbas wrote: >>>>> In some Arasan SDHCI controllers, after tuning, the tuning pattern data >>>>> is leftover in the sdhci buffer. This leads to issues with future data >>>>> commands, especially when command queuing is enabled. The following >>>>> patches help fix this issue by resetting data lines after tuning is >>>>> finished. The first two patches have been tested with TI's am65x and >>>>> j721e SoCs using the sdhci_am654 driver. >>>>> >>>>> I have a strong suspicion that this is the same issue with >>>>> the sdhci-of-arasan driver where they are forced to dump data from the >>>>> buffer before enabling command queuing. I need help from someone with a >>>>> compatible platform to test this. >>>>> >>>> >>>> I had some discussions with our hardware team and they say we should be >>>> asserting both SRC and SRD reset after tuning to start from a clean >>>> state. Will update the patches to do that in v2. >>> >>> Can you use the ->execute_tuning() for that instead of a quirk? >>> >> >> ->platform_execute_tuning() is called before __sdhci_execute_tuning(). I >> need this to be done after that. Should I add a post_tuning() callback? > > I meant hook host->mmc_host_ops.execute_tuning and call > sdhci_execute_tuning() and then sdhci_reset(), like in intel_execute_tuning(). > Ok. Makes sense. Thanks, Faiz