Received: by 10.213.65.68 with SMTP id h4csp915912imn; Tue, 20 Mar 2018 20:03:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELvRFRBf8EcqB2M66fkODhUD3GgqMVHWwET6gtf5P5lahSHVipbruoWlYj7k6otkN7SdP06k X-Received: by 10.98.211.4 with SMTP id q4mr12777891pfg.0.1521601413904; Tue, 20 Mar 2018 20:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521601413; cv=none; d=google.com; s=arc-20160816; b=qYIlHnLBBSYSoLvykpYDOmFOPCNMRHViWuUe6XhMRfhVac20ZSAebawoM/6e9WPwNK lVPrTiT4wMC9Sh5PVdi9jY8eE4IzLDzTnB3be8Mn2UlFkAIOaWG265dZU+EM7PTRoBdM j07/WNHBNsSg7biqKAhWWmUTSvXBaMxJChCCc8Z16p3+HtaPbZvjUcUa0D+4Ovy/LK0S oG/IYPy3NmRNZ7N2O5l8Z2BgxD/eEh+JXP7d9Pn036Ca12CKagxTj705gn/igjuMgspc FZKXGFih4hmv3ezw72dhNABUYHt6MRZgNjySLZ1nS1YLs0VXaCb901R5tPNrGifTo7EV cP7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:references :in-reply-to:subject:cc:date:to:from:arc-authentication-results; bh=ksfDH1LwDJMsUBe3vVPplBzdCukkfIvnOsEFrcKrwj0=; b=OCtVyE3PzGouBZvSoP5LL4pWn0LGW+VlTOGZUCFw7l9HsT6e/+veM83VvTq02WkGMk 7DD0mQzIrQPNkIlgx/KYQgG9h3y3Ivh3BTtID7IiUVPoJT/pY4wE9voVqdhl+CvlOze/ W9FE2K92ho5PKuXMV2ROagKO8FHHvdBq96j7eDOVxStHVAi0QP7MNx3UxEgvR1wNwGzp TYrQnCgNv8DrUdbzbm8/qcg14LTjWn+hLDxCn83Lgl8yZnwo0q9L2mSBlSTmqHrP6Z32 tCeALOTD0Az52SQzvvsH+38gaANlAzyxgdMrTnqr6AlAUbQR7xlh20YkBfL6aeXHLEnZ bLmA== ARC-Authentication-Results: i=1; mx.google.com; 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 c32-v6si2848755plj.381.2018.03.20.20.03.18; Tue, 20 Mar 2018 20:03:33 -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; 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 S1751963AbeCUDA4 (ORCPT + 99 others); Tue, 20 Mar 2018 23:00:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:56911 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbeCUDAy (ORCPT ); Tue, 20 Mar 2018 23:00:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7B3A1AF04; Wed, 21 Mar 2018 03:00:52 +0000 (UTC) From: NeilBrown To: Matt Redfearn , John Crispin , Ralf Baechle , James Hogan Date: Wed, 21 Mar 2018 14:00:44 +1100 Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] MIPS: ralink: fix booting on mt7621 In-Reply-To: References: <87efkf9z0o.fsf@notabene.neil.brown.name> <87605r9mwf.fsf@notabene.neil.brown.name> Message-ID: <874lla874z.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, Mar 20 2018, Matt Redfearn wrote: > Hi Neil, > > > On 20/03/18 08:22, NeilBrown wrote: >>=20 >> Further testing showed that the original version of this >> patch wasn't 100% reliable. Very occasionally the read >> of SYSC_REG_CHIP_NAME0 returns garbage. Repeating the >> read seems to be reliable, but it hasn't happened enough >> for me to be completely confident. >> So this version repeats that first read. > > You almost certainly need a sync() to ensure that the write to gcr_reg0=20 > has completed before attempting to read sysc + SYSC_REG_CHIP_NAME0. That sound like exactly the right sort of thing to do, though I assume you mean __sync(). I tried to reproduce the problem so I could test the fix, and of course I failed. Over 700 reboot cycles and never read any garbage from SYSC_REG_CHIP_NAME0. So I cannot test that this works, but I have tested that it doesn't cause any obvious regression. I'll send the v3 patch separately. Thanks a lot, NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlqxytwACgkQOeye3VZi gbkt3g//QgA1xYVWLNNdRjCrDPZNqu3Xa1wc1b7nrCltNqQMK1w2B55ZOq5EdgPe 2apRzIBsepuNaxqdl3CpCLnqA26jriY7sROHwc3mcafdCcnQM8psAYEG5Y35X8up Xwrp287Pvj/3LSHyuwVnQCuSVJhOdDQmeYNUjbyp1zfKwdQUFyY2qfs5SlT+Xby9 Gp+wfjUcIhs0UTUi87dqNc7XD1l8Sn/8faVrdcQ2BDMDkwXAj5oFOftfwg6k/+UG JXyJ3BlNGFrTtuQsy2h+JE5PmFiJmfo/4jE+xcQBXYNKyHAT5Sc3K63+Appn+SDm XxZtFqvWvGaYs52HS8NgvEnUXanTjcYP9/sHNrMGNUiqAbfidka/65xqqiCfyqtn pj12rjtSNZ9D+V5lwvbGqhaRvLCLhgk66omCnDFqeka5hiUy58oZBILRVB/UAfaj ercgSyZCSBcUKfjoJzpzGLsSw/Ne/uIRbzk1P7dnAHFaptq/QYBGvMa10nKZ05Sq M97IGQqdVYnsvA6Va5Tz4anjNGZMopPnQthTT04+ph4tjN9nDYnzMEGGXA13S9XI Bpl+2puCb+TakhPIt6yq7ihslniqPuI5/TpoG0TbJLLRk/9jblYNUBQ781nSSwjX a07ygVr1sKuDFVwM372bs/Qs3Y11kD7S93DjJm2GQ9p8klhkJOg= =KSSZ -----END PGP SIGNATURE----- --=-=-=--