Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2090227rdg; Sun, 13 Aug 2023 08:50:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1GepjdXIgEaz+z7efhWKgKZBUP1adUu41mmvHBbtpZrv9E2BQVU3is2+dtfcg3X+2gMUm X-Received: by 2002:a17:902:b591:b0:1b9:ea60:cd82 with SMTP id a17-20020a170902b59100b001b9ea60cd82mr7365521pls.5.1691941803508; Sun, 13 Aug 2023 08:50:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691941803; cv=none; d=google.com; s=arc-20160816; b=lzg5i+bGd1DiKIYAlbJ7XEck3eK6LM475recF5A2BRzkjIG84q6bWVdpQfPra6L62d EPFMXCBFcx00T6b4oWUN+iqSlTO2GXnHU764VoqX2u3zpetCOY+QvZssJ0JzrKJ2iJ0q ciYmldFF82fhQgHnzpL+2fEJ55I4GnwZG/xrcjayf7Xz6pH2WR+UMszAlhL4gNLMTLGr IvU5gklGg+ylJA/J5OYGzlnlzpkESUgJ8vXIXCQ8J3X192fW5nRn7q3T6xnKkUvLDoNo 7ICBQkFhhdezmadp+esuNwwvjUfpf/AbSqTewUR9DIcbe7IJVYTRHAbS5IByi2rdzviL 2WuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Vl5cn6LVkr+O74pI8+2nNhdI8x/6RhAFjowBHidIQo0=; fh=QK1CBqMY/NaN6Pc/9zlnqivKB+lBdunwsGZ0nb5xKHg=; b=sR+VDQkDC4qnkckfRkVUwyTNXIvuUtWwayWZbEiL4WF7g80onqVVpnGXZ3/LMD0r/4 W1hka9tL74opeJ25vimQra1L20Cj7gOUcYf1kNDwe4KPZFG4MMrHKKhQQUf/prlkWG5A 0AFn+OIOG5rDsPVJX+a49j2Oxbwrof1wm8O8P11mLo2k8d4950O8jLqRbPvpaxhV2RzH m5AljY/UVdxXC0ubJ6yxX9wZeyiY7L7GXYFaVnvkCmD27tWxyYlQrCweJnsrPqYCIXPC xSIVbHQgdvmOPOiQ7/hXv7AAj/a5KqrXeyZxgawT3qfRQW3RQ75J/n7J1KTLQl7SPuxE k/8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=girRRykM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x9-20020a170902a38900b001b9d5d4d75dsi6516373pla.112.2023.08.13.08.49.49; Sun, 13 Aug 2023 08:50:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=girRRykM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbjHMPcH (ORCPT + 99 others); Sun, 13 Aug 2023 11:32:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjHMPcG (ORCPT ); Sun, 13 Aug 2023 11:32:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC597E0 for ; Sun, 13 Aug 2023 08:32:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 35B6B62EB6 for ; Sun, 13 Aug 2023 15:32:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 681FBC433C8; Sun, 13 Aug 2023 15:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691940727; bh=pNzd0jPoK1/7tmEtl+sPzQlrbfYgD5Os2z+f6A1BXOU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=girRRykMw3vifG+WNE8zFFej5rXPVMxrEVQE8l90xOEBEEhOJhRTcDvmWk1GDConx BK0Ul3gXJFyEmsx0mis9goIEzI8rj6GgAw74cx1i+rQcnQpc8ETGYwTIsg2kYB72DV TUsZ2JpnNjX6BuNb/mPNCy+8oXRXRlij/hVaT5s4/+CYTjvZfPzK5yGwRKRFsmMp1M JXrxL2+K8j3TEzTfkvlK7OnBLdbyTiW4RBSiwraeUZrBhDTzs88d7uoVFUzhZ+0pa7 c9XEc+yXTOnRMeWM2tE7fcPV47ScVOsVNZo6hwREJUx+CtQhU9P2ezM0tk1Oe0xT1I gcQj46AtvNpUg== Date: Sun, 13 Aug 2023 17:32:03 +0200 From: Simon Horman To: Alfred Lee Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, sgarzare@redhat.com, AVKrasnov@sberdevices.ru Subject: Re: [PATCH v2 net] net: dsa: mv88e6xxx: Wait for EEPROM done before HW reset Message-ID: References: <20230811232832.24321-1-l00g33k@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230811232832.24321-1-l00g33k@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2023 at 04:28:32PM -0700, Alfred Lee wrote: > If the switch is reset during active EEPROM transactions, as in > just after an SoC reset after power up, the I2C bus transaction > may be cut short leaving the EEPROM internal I2C state machine > in the wrong state. When the switch is reset again, the bad > state machine state may result in data being read from the wrong > memory location causing the switch to enter unexpect mode nit: unexpect -> unexpected > rendering it inoperational. > > Fixes: 8abbffd27ced ("net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset") > Signed-off-by: Alfred Lee