Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp660428rwd; Thu, 1 Jun 2023 05:11:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6HpJEmAHVIy85vRT5Ajv39FF5/S4NboheCEWo7gy8Mknx9TU5jZ2xrQLmiDjAep78ZzQq7 X-Received: by 2002:a05:6a20:2c98:b0:10d:5c7:6608 with SMTP id g24-20020a056a202c9800b0010d05c76608mr7663354pzj.30.1685621476289; Thu, 01 Jun 2023 05:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685621476; cv=none; d=google.com; s=arc-20160816; b=MH/HQFUDGlFfd6ccidGag2CeGpp9FIUfXtVDCfqlPtk5GqCHcmCiiTabPepm4HdjRM eKMLiMn26wh+QGxFZodRpHRJCx/2k7XsaWIHcQct5WHUhlQG5+tfdwGh4I9riiexRude AUU3S3aonN7ZUtGXb8gm8kUyca2TwvrXnkI9pNIQWhAmXKSgUTfzkp0U1EwRaUEGCxz3 codU+c9THlj57iJfdSvd3CdakzRabJkppUJR/EDyKqzihG1Q5SpKtRGBexEmG4N/gRjS 5Tud/VQeZZEdRPSQJYRB1O6E1UGKSf4U2EIFkiQ1rzZCDwbl27zRET0ymVj1LX0rLGxZ avGA== 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=KV3wHUujsSOxU/oeIXKi+3r4Hg4NKOWlza+5RYzc5H4=; b=JQaIJM0pOb+aQ2DU81W0P8XTiju8RHc/wQ25pk2aQbTl3im08Agw50X4WuewmYZAZS ueUoLNmRq4i+EcMG//YC+90sojGP2/BFrT9KfAa0RsVTFdmdyOe1L/0+DgNh7ehfLT/1 X4K6E85bJGUZx9mSWMWomMjG1Cno/Xz0x+WsvG2sVb8VB7WThKdskUZ3UmWZnWXj5zZq v00igAqqOqDPxKGjhjiaq8x/rQupGA5i+QonyKgu2WPH+jsmqEEWXzsgCKgJdvD4f9oB WWO8K8i0Hb0+VxSbeqfARadS/IxLutx4EL2B19dcd4jd6aXS5DHvLiYrYPubxTafVxIF 1/bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RnpPZu0K; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020aa79570000000b006251fb701a6si3439915pfq.285.2023.06.01.05.11.03; Thu, 01 Jun 2023 05:11:16 -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=@lunn.ch header.s=20171124 header.b=RnpPZu0K; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233244AbjFAMCr (ORCPT + 99 others); Thu, 1 Jun 2023 08:02:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233254AbjFAMCm (ORCPT ); Thu, 1 Jun 2023 08:02:42 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA24EE71; Thu, 1 Jun 2023 05:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=KV3wHUujsSOxU/oeIXKi+3r4Hg4NKOWlza+5RYzc5H4=; b=RnpPZu0KctrNBkYvsUddgdvG37 dzbZhCKkPvYGI3KbQgO0PbpGVaP/2i6L7q0IOb87fkppGlNM6EQmQhbKZhVl+UjWzqjXsy16cvjFS WD9CLqPNm0nmOZggyZEGW+hj0/e6KOZN7AZYi2UBREAhKQv1L1y84aBVuVuYChIzRdd8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1q4h04-00EZ39-6U; Thu, 01 Jun 2023 14:01:52 +0200 Date: Thu, 1 Jun 2023 14:01:52 +0200 From: Andrew Lunn To: Andreas Svensson Cc: Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel@axis.com, Baruch Siach , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: dsa: mv88e6xxx: Increase wait after reset deactivation Message-ID: <133860f9-e745-44ce-9b74-c5d990cf92db@lunn.ch> References: <20230530145223.1223993-1-andreas.svensson@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Thu, Jun 01, 2023 at 11:10:58AM +0200, Andreas Svensson wrote: > On 5/30/23 19:28, Andrew Lunn wrote: > > On Tue, May 30, 2023 at 04:52:23PM +0200, Andreas Svensson wrote: > > > A switch held in reset by default needs to wait longer until we can > > > reliably detect it. > > > > > > An issue was observed when testing on the Marvell 88E6393X (Link Street). > > > The driver failed to detect the switch on some upstarts. Increasing the > > > wait time after reset deactivation solves this issue. > > > > > > The updated wait time is now also the same as the wait time in the > > > mv88e6xxx_hardware_reset function. > > > > Do you have an EEPROM attached and content in it? > > There's no EEPROM attached to the switch in our design. > > > > > It is not necessarily the reset itself which is the problem, but how > > long it takes after the reset to read the contents of the > > EEPROM. While it is doing that, is does not respond on the MDIO > > bus. Which is why mv88e6xxx_hardware_reset() polls for that to > > complete. > > Ok, yes that makes sense. I could add the mv88e6xxx_g1_wait_eeprom_done > function after the reset deactivation. I don't think that works, because how to talk to the switch is not determined until after the switch has been detected. > The datasheet for 88E6393X also states that it needs at least 10ms > before it's ready. But I suppose this varies from switch to switch. O.K, let go with this change and see if anybody really complains. We can always add a DT property later. Reviewed-by: Andrew Lunn You probably need to repost with my Reviewed-by added, now that Paolo has changed the status of the patch. Andrew