Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp653104ybb; Thu, 28 Mar 2019 09:30:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEBDNywjWNEUZ5N8uQnrz0cuQ2gWfi90iMjMek4Q3MdYCJ4MvWXJVg1XzIcJMjHpiZp1Na X-Received: by 2002:a17:902:a81:: with SMTP id 1mr43888143plp.308.1553790624029; Thu, 28 Mar 2019 09:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553790624; cv=none; d=google.com; s=arc-20160816; b=YH8lWXHxJWIPy0GXKgDy6o7e0pqNdKKqeviUboMORB90N0iLkEJ/OXLri/vIuWS9k1 Gg+IG/ga+KCHiPICRnSq+cxrlKY+HpCtuVmH8z6V25kMBmcnwHIvrUFCyloGnpuihgL3 GmwyhUI7cAsK3aEC6n1Mvvdeyu/ZWNACSXCw2oUp4J1xKzjv5ms/11vTX7fzj0Pmzj/R Xsb5dlLPyxK6e2Z3SRlG+IeuIiP2niZ9KVnN1PUTMNJJuJSGN7MG1ovGUFtIBtnvyRcl 0N/4Ri57k/vrfi+RAxl0L5wwPEIP/KbaOIQlw6WbE1Kjk69FMpwTYmXAbGJvPLsxjSc0 YEIQ== 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:dkim-signature; bh=jzEin1H05Jj1Q+XEKrBLDcp75FHNt7kl/g/Z8NRtlTo=; b=q9EhY5dxReCepF6jreJmdS8BOjk3JtDHDYmW6hOMhUFv4fD/0TslEn7cZpM7foLjPN S0kFOiBMKj4OKQblbpPr+2DJ3UOlFiBJqHgEt6+sUgB5nKp7wYtkFZ0xGsxP8zEZpPfQ M4DjdXyq/yqMnxAduJWaG85uxuwFs6xvP6rMF+/1f+zzquMOXyL3wzuWpYFY97txmEjT TcpZZTS3HO8EekpPL0/xnlKPL8DbK1f1Sek2K/r2c6jvvp/JMGb+fGbnNSIbuceIglmm aPMqy0FasWJqc+SLSvrk+s2MZ5sJf082u6bkccyCVuSUykaBJml2+1+dSbitoE7Vwt6P CR0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b="qMAjvcB/"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=5q8ytnes; 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 y1si23675008plb.276.2019.03.28.09.30.07; Thu, 28 Mar 2019 09:30:24 -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=pass header.i=@kroah.com header.s=fm3 header.b="qMAjvcB/"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=5q8ytnes; 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 S1727513AbfC1Q2E (ORCPT + 99 others); Thu, 28 Mar 2019 12:28:04 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:50331 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbfC1Q2C (ORCPT ); Thu, 28 Mar 2019 12:28:02 -0400 X-Greylist: delayed 322 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 Mar 2019 12:28:01 EDT Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 29DF1618C; Thu, 28 Mar 2019 12:22:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 28 Mar 2019 12:22:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=jzEin1H05Jj1Q+XEKrBLDcp75FH Nt7kl/g/Z8NRtlTo=; b=qMAjvcB/11XZKHim/QoGWAngBy+gT2QkIr0InpOq6Bc l77BcU3VoNe6iLTEK68DV4wHfEw/DPBX6U9TSJy6ICGQFwnkgxYsyjvK4hUjzT9J e1IQwVTUuV5wd2N6yUz0bE3A0ZOGIcZxqbKEwjWG8ah7AjI50bz5jdtf5KPi3Tm0 xOICWQLp5RtY17f6mvpGbCfems4wX70jPIOoiLe+2CbqQTLDYdcUSwIwzrnqRAFR uTqUKLJC1+Swk4y4ZhVVmw4f0uiDxVf2nZMqplPnSLgjewkheFCsZKi4Yve0n8Ed qh1wsHdGBYcxxy12zha7iWTFTNvKvfkreYV15PNXOZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jzEin1 H05Jj1Q+XEKrBLDcp75FHNt7kl/g/Z8NRtlTo=; b=5q8ytnesnlGlAR9GjsPJZK qa9JM03NJNAqTzge71Sw9yNblJ5NmeqOJ6Whxpn4OBZ7BWIV5c63Fuh5ymkZubpD TgGFJ/TDdRB9080jST7ChAD0jxGfX/CEBuH3WARQFuezk1/hTXKndTdR8+ARY5RH L3nT/vK73eCsJvKlXRjF1v69S60GSrzprqNudAITGgwpCbFZiLRAbmimDeZfHErT KKSgyeQ6fi4aDyQqmaFayN1btH2vJErlAXcgbcC5mtRraezMY6w8Z0CSBnAKKmcj 9jCDZ/UooY4JKvvFltbgVYa+JieVpxHqAxW6kq1RCTaU32BGVnKofaoyq6O4YrSQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkeeggdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujggfsehttdertddtredvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucfkphepkeefrdekiedrkeelrddutd ejnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomhenucev lhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id BC0A2100E5; Thu, 28 Mar 2019 12:22:35 -0400 (EDT) Date: Thu, 28 Mar 2019 17:22:33 +0100 From: Greg KH To: Jean-Francois Dagenais Cc: linux-kernel@vger.kernel.org, zbr@ioremap.net, manio@skyboo.net Subject: Re: [PATCH v3] w1: ds2408: reset on output_write retry with readback Message-ID: <20190328162233.GB2173@kroah.com> References: <20190328122244.32126-1-jeff.dagenais@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190328122244.32126-1-jeff.dagenais@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 08:22:44AM -0400, Jean-Francois Dagenais wrote: > When we have success in 'Channel Access Write' but reading back latch > states fails, a write is retried without doing a proper slave reset. > This leads to protocol errors as the slave treats the next 'Channel > Access Write' as the continuation of previous command. > > This commit is fixing this by making sure if the retry loop re-runs, a > reset is performed, whatever the failure (CONFIRM_BYTE or the read > back). > > The loop was quite due for a cleanup and this change mandated it. By > isolating the CONFIG_W1_SLAVE_DS2408_READBACK case into it's own > function, we vastly reduce the visual and branching(runtime and > compile-time) noise. > > Reported-by: Mariusz Bialonczyk > Tested-by: Mariusz Bialonczyk > Signed-off-by: Jean-Francois Dagenais > --- > drivers/w1/slaves/w1_ds2408.c | 76 ++++++++++++++++++++++--------------------- > 1 file changed, 39 insertions(+), 37 deletions(-) What changed from previous versions? That information always goes below the --- line. v4 please. thanks, greg k-h