Received: by 10.192.165.156 with SMTP id m28csp580132imm; Mon, 16 Apr 2018 05:33:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/8bJ8DtZt03bJc3DhCKpdQD3vjhjBKyOktMOnlpfRiN8QXJ1mtOXAFCkUF4Df9zQ0sdUjZ X-Received: by 2002:a17:902:102c:: with SMTP id b41-v6mr15605952pla.39.1523882002496; Mon, 16 Apr 2018 05:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523882002; cv=none; d=google.com; s=arc-20160816; b=prMkh6C9d2VWVNhbBc0NEuPr8Wadnj2+9Uu0cYnhvkTzbh9Znrg9D+pc7klER4IH3r ieb3b09zOvOfOjvlEa7dlagGyNP/KfqQxMZvMhlWcqCNTuW/t5OK2ROsh9kyE/mV2ELg 9k9qcP6z91kXW6acpJDz3Me1yhc8Yx03h8YUNg0YWWAvreYV3Xz8g3kZKWBwZlyewTp0 SxkUTBL1vAaB6v2g5tWOcMHg/oAMXHfeBqioHRa/phioTr3vynk5+3jk7kKkAKEe3oIr njGtqNThcwAPag5YUFYrE/lncoKcbLEWRycAU8SDEYpNqNm9aVQgAuTZnjq3gNELSR+H sC3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=5OJ45vQrUbwIKqt1i+ylAF2BrE9Ah+q2lReZyO0tmRs=; b=PdqUmxtm1/xUDtQE4cbS1axeRBCPsICEh56ZHrdn1sORL3OanopMBZwoTG/iJ4EZmm SGNcLbzxLL3+0sdEpSNb2chLtd4M+YN0kQyvuQOogIhijOtiV0iMEQ+T+SkyZhf+bhQO Z65qDImMPKbrJzLAhi3m8SDrxzKs/VXO8qxhXzayK5wuXKKMcJcjD2ohAuOtrlhuvabr n1iRvka/jJdZR3ZrgxTSuvWizz522AwuQLC1vtC2x0K/OaDtfi7zjgqqCVbfHdtrkunU 9DzowIzzB/if1sG2A+WGQA9Gc73HwpF/rvjgJPj0YphJDyJPz+F439+pxBg5arVo0cua kF4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=aeUMNqPF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si1171684pga.86.2018.04.16.05.33.08; Mon, 16 Apr 2018 05:33:22 -0700 (PDT) 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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=aeUMNqPF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755134AbeDPL5a (ORCPT + 99 others); Mon, 16 Apr 2018 07:57:30 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:58960 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754624AbeDPL5S (ORCPT ); Mon, 16 Apr 2018 07:57:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5OJ45vQrUbwIKqt1i+ylAF2BrE9Ah+q2lReZyO0tmRs=; b=aeUMNqPFO1u0gxFWuZY3m3jbK 3rS82mQxDQcOcKVDsJcOEpOxE9YwBLGF7w6th1eHhu5OeGOOdyH8He1/VuWtnLFBOb6zqNUK2Twqo lEoaUu8yfISPXJG5NR4qq+pE7PtW9nQ3uu5zaLRrXF1XrpiV4fGy1Q8N+D/JaqYXKAthQ=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1f82kx-0005e9-Mr; Mon, 16 Apr 2018 11:57:12 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1f82kx-0008N1-4g; Mon, 16 Apr 2018 12:57:11 +0100 Date: Mon, 16 Apr 2018 12:57:11 +0100 From: Mark Brown To: sxauwsk Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, wangshikai@inno-instrument.cn, guojian Subject: Re: [PATCH] [PATCH v1] spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo() Message-ID: <20180416115711.GB20726@sirena.org.uk> References: <1523861200-34130-1-git-send-email-sxauwsk@163.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <1523861200-34130-1-git-send-email-sxauwsk@163.com> X-Cookie: No lifeguard on duty. User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 16, 2018 at 02:46:40PM +0800, sxauwsk wrote: > In case of xspi work in busy condition, may send bytes failed. > once something wrong, spi controller did't work any more >=20 > My test found this situation appear in both of read/write process. > so when TX FIFO is full, add one byte delay before send data; This looks sensible but doesn't seem to apply against current code, please check and resend. =20 > /* When xspi in busy condition, bytes may send failed, > - * caused communication failure so add one byte delay > + * then spi control did't work thoroughly, add one byte delay > */ > - usleep_range(10, 20); > + if (cdns_spi_read(xspi, CDNS_SPI_ISR_OFFSET) & > + CDNS_SPI_IXR_TXFULL_MASK) > + usleep_range(10, 20); It looks like this may have been sent based on a previous version of your patch, not against the driver as it is now. --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrUj5YACgkQJNaLcl1U h9CmDQf+N6GcIexi7BGApL0D9gLTDtT9RN2GdqrVoVokQLKXnP58D1THElEO/nfV vbUnVrKZqPqKGS6eWFyjNbmyOlsLvWCt8OR7vfEfmLONJdLqCgJPJewg6tf+48Dt PC6amPDgbvRcFADPym0kNHf5d0sZm9XdKrTP4FtoCrr97QP3gfByzEkCIZ4n1K/H aiAu81QYajQoD9PkxUadB8nLiFL5HpIWW6DzmIEVlsdx0CPX1fbryYZBtSc7rhNV XkBwEU5Gw3cVEyFN1WPvjbQidp65sV+9phdVLEQfoARA4ouIUe6E7GVto72xgUMJ NNHsecrT2KcN+OfGio+PMSvRQzKBGw== =xFe2 -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU--