Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4845383rwd; Tue, 30 May 2023 10:41:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Grck/YB/dPOavM+BhEgW3Oio39dMFeWMDJ0Tu2QrgNoDpFNBHeLrZpMWfF1j8ZYfPOf3G X-Received: by 2002:a05:6a20:548e:b0:10b:7b22:cbf1 with SMTP id i14-20020a056a20548e00b0010b7b22cbf1mr3916673pzk.7.1685468476530; Tue, 30 May 2023 10:41:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685468476; cv=none; d=google.com; s=arc-20160816; b=NcpXxMRHfA3jfbWxUNLYyJM29kie4jckhyjmO1UPvaNdITmEG/kg9EVaqOVUnweYU7 MEzw0gpRK4X+vcAXCB7oqxswvl35Lp43f7d4pVv/2rnVClhUMdESWzEmMOqsZe/phPMO +/1MFSjX8Be7neb6nLnnzjRFyshqSEO5eLGGWlgpg/3zpZE0LuBnqA+VmBD/oDMEy5v9 VTXoOE7tT22XSMAQITi7lWqWZ/Wu6utyje+BeCQ/4M0gN/w8iejDif8qwuE7+xyhkXLx QCxSUK2SjUuIombbDvyva7EpiMaD8tXd9v3+g31BtJyIFqmRc9K17Quc65W6jx6pVoto dltg== 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=UPIzzM2XTXYlyeunj9pSiEJHYLW/0kBAsxfRPWFzyzA=; b=hBw/2dTJ9QBoQWUGfpHz8Bz6mGS/MCOACqQ/8R8oNNi0MsZTk/Nyo7fR+d4CQBlv00 6L/+KILy/7Cg/Aj7yzEzzerhhz56rJRqK3Wc6NFe3XzG07gKzdF5wJyRAvA4PKfLvzR1 cDTqr9qiy2HbTxHh3yADH24TpDu6yJx6u4Sv9veCjEjODrri+rP21OliBhv/r4vJWlPI 63vFHXRADDbi6wwODTP4FhXUe+zWGpJsgv3EEa7gjglyOHG7lR1nhtlINdsPZo8jVOZo cOfcjZe4nUrI7z6OAivyiZx1K2Pngs4kskRSM4wnUqhSndU4DcWUrilJZ6xwzYTC6V46 pYaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Zivuydhf; 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 l189-20020a6388c6000000b0053fba84791asi1182883pgd.243.2023.05.30.10.41.04; Tue, 30 May 2023 10:41: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=Zivuydhf; 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 S232909AbjE3R3P (ORCPT + 99 others); Tue, 30 May 2023 13:29:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232951AbjE3R3O (ORCPT ); Tue, 30 May 2023 13:29:14 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6DFC1B0; Tue, 30 May 2023 10:28:40 -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=UPIzzM2XTXYlyeunj9pSiEJHYLW/0kBAsxfRPWFzyzA=; b=Zivuydhf0oPmZYxawFyEJu8cl5 tEPnHcyj7vLPGLzHaug/7uX05H9M0iL1uLFLpLrobUIt8be/bWbYSYqspdbLaYncZubNunEuXCiNv 5Fuud/fF1+k+AcNyoUM3pjIHwIHB8uOqIjoXTxD81FY9KfF0FsUYEvg4VNzR4YCM4l88=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1q438t-00EMVz-3z; Tue, 30 May 2023 19:28:19 +0200 Date: Tue, 30 May 2023 19:28:19 +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: 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: <20230530145223.1223993-1-andreas.svensson@axis.com> 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,URIBL_BLOCKED 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 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? 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. I know there are some users who want the switch to boot as fast as possible, and don't really want the additional 9ms delay. But this is also a legitimate change. I'm just wondering if we need to consider a DT property here for those with EEPROM content. Or, if there is an interrupt line, wait for the EEPROM complete interrupt. We just have tricky chicken and egg problems. At this point in time, we don't actually know if the devices exists or not. Andrew