Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp810467rwd; Thu, 1 Jun 2023 06:56:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Ggyz3VcTF4ynnSrNU49vyiMyamEVMwZ35s9FO1rBw1xLrqNG6AJ1Znht3+Gl1PAn4ru2r X-Received: by 2002:a05:6a20:8f26:b0:10b:6e18:b694 with SMTP id b38-20020a056a208f2600b0010b6e18b694mr11372610pzk.55.1685627792151; Thu, 01 Jun 2023 06:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685627792; cv=none; d=google.com; s=arc-20160816; b=BoVLSePkJLIyA7wdDNlAxEGz0RR3veHZMwEAAiOhQyKN++pwGPz+IXZlJMAFFISa9r 4Nk3glpdsbk1RwDn4xAYsBu7OQDcvjoI5XJ7vrnLl+At8pmCAUixYGvW7qmr1KZOIkRC qRF734U3+z6hB84/4ORS03nBt2BjYmAp19DWALm/6Vf7AWFSK8Qva3SfIjjfmYzqKr2f JPKL3SmdEltuIQeoEzieVvzeJTvaUrwwOj6KD3pYAbnO2IvUTyif/IUNMjCdfcw0zxGd c3S/b92WMJQpfXZf7kPON9cqaZypihFfzplI3FJCnmrHqml10bC/wRIpReyaDtECWs9V Zr/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=ZPN2zqjRcvTx5BAbVRSKyrNwIPYaR9V6mursf4H+kkE=; b=I4By647CpOEZWhtbb6s2mIt3fnWfbLSwU3UNmBq/AahUOZ7bA8/ldCPPdLFrQ8lA5z 74o6x/vQXaPs2MxsF4QoaMjx/pVJuJgcjk4SHQubyOyE4JRBLeCpxoBIIy8A7eenTccD G1Rdeke0DsudlgNDfsmQZSTgiRVbG2Y1F3rJTr9P67x5MkgumckstZ5N6PjS26aSDu5M ScZVjxo8LR5VPiN0A4s8f3G631gi8Ji+haoUF450EwexOmt0qpUkKT8fxgJu3l7QHwIB mk7OCLQEnCQDqiFEJQk/t4LPNiErAEZ53kWFkVW8QPGIM7Sr8twn32/Xjb9BEgFjP4JD DEoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UBxwOJda; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h22-20020a170902f7d600b001ab089f7319si2843250plw.52.2023.06.01.06.56.19; Thu, 01 Jun 2023 06:56:32 -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=@redhat.com header.s=mimecast20190719 header.b=UBxwOJda; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233450AbjFANm4 (ORCPT + 99 others); Thu, 1 Jun 2023 09:42:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233179AbjFANmz (ORCPT ); Thu, 1 Jun 2023 09:42:55 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E59F2138 for ; Thu, 1 Jun 2023 06:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685626931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZPN2zqjRcvTx5BAbVRSKyrNwIPYaR9V6mursf4H+kkE=; b=UBxwOJdaRm2luaDY7t8k9446iy8VUnJuINRWGyS4m9RgSZFNolHiufuYbVqb/ImBpcadF6 yH/Zt8NwO4JyJTHa7PcvExjNIz0rOaWDrJaUeh83DF1UCFAGdp2Vxdg+4IYUO0KrkeuMli VkmtxDd1jqQawifUBtAmC35N39D2dP4= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-TPKvwvzBNGCuj4QVxjKI9g-1; Thu, 01 Jun 2023 09:42:10 -0400 X-MC-Unique: TPKvwvzBNGCuj4QVxjKI9g-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-30a8887f419so47294f8f.1 for ; Thu, 01 Jun 2023 06:42:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685626928; x=1688218928; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZPN2zqjRcvTx5BAbVRSKyrNwIPYaR9V6mursf4H+kkE=; b=KyhVq6on1HpLxc/VA8A7QQhBZb74JtitrUdMrszLfClcpg6oRQPX10bFTx+WwB7d0Q Bwi/muzvoxlFI/mIci0yY+6Ye1yQ9cspjbEHQh9b/Tz6GK98P0BOt/aKDcE7nr+PlXTF 8Kxkxee2wfoJV0SNhzB1tHNPZTo18G3MN2NJ03NVsCOV9Tm0QwD+5tVBi+rAbVn8zIXi NAOLc3fWT5XpXeFKhDFYxHfNYphqACWgmRfEtzuPiKQtmCXlY4HmsPX9IuY49mjUy6UC 2a/CRzm38wnE9aSHQSAwTzoqV7Zg/6cznaEsjZLxW9qLtytzwqaxOfWDTKHpD8kCSSl+ gWwA== X-Gm-Message-State: AC+VfDwDjgtXJN6IEmmVGBbBcriR06qs+qziPGt4itfa+SqLgTXxG04J HFwO/fCgpzrbLhN5SNFdB93cd0kKDKBCofGMiXeX4fdHGaPxMz9qCJ9eVncavYQ1V3QJw/g/4Qq dikELMMhKtUos97Wqefn8cEjw X-Received: by 2002:a5d:5490:0:b0:2e4:c9ac:c492 with SMTP id h16-20020a5d5490000000b002e4c9acc492mr5994558wrv.1.1685626928450; Thu, 01 Jun 2023 06:42:08 -0700 (PDT) X-Received: by 2002:a5d:5490:0:b0:2e4:c9ac:c492 with SMTP id h16-20020a5d5490000000b002e4c9acc492mr5994541wrv.1.1685626928087; Thu, 01 Jun 2023 06:42:08 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-242-89.dyn.eolo.it. [146.241.242.89]) by smtp.gmail.com with ESMTPSA id z2-20020a5d6542000000b0030c2e3c7fb3sm2963398wrv.101.2023.06.01.06.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 06:42:07 -0700 (PDT) Message-ID: <1a14013cc3e205265e4564094d4faf971b651810.camel@redhat.com> Subject: Re: [PATCH net] net: dsa: mv88e6xxx: Increase wait after reset deactivation From: Paolo Abeni To: Andrew Lunn , Andreas Svensson Cc: Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , kernel@axis.com, Baruch Siach , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 01 Jun 2023 15:42:06 +0200 In-Reply-To: <133860f9-e745-44ce-9b74-c5d990cf92db@lunn.ch> References: <20230530145223.1223993-1-andreas.svensson@axis.com> <133860f9-e745-44ce-9b74-c5d990cf92db@lunn.ch> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, 2023-06-01 at 14:01 +0200, Andrew Lunn wrote: > 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. > > > >=20 > > > > An issue was observed when testing on the Marvell 88E6393X (Link St= reet). > > > > The driver failed to detect the switch on some upstarts. Increasing= the > > > > wait time after reset deactivation solves this issue. > > > >=20 > > > > The updated wait time is now also the same as the wait time in the > > > > mv88e6xxx_hardware_reset function. > > >=20 > > > Do you have an EEPROM attached and content in it? > >=20 > > There's no EEPROM attached to the switch in our design. > >=20 > > >=20 > > > 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. > >=20 > > Ok, yes that makes sense. I could add the mv88e6xxx_g1_wait_eeprom_done > > function after the reset deactivation. >=20 > I don't think that works, because how to talk to the switch is not > determined until after the switch has been detected. >=20 > > 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. >=20 > O.K, let go with this change and see if anybody really complains. We > can always add a DT property later. >=20 > Reviewed-by: Andrew Lunn >=20 > You probably need to repost with my Reviewed-by added, now that Paolo > has changed the status of the patch. Not needed. I can restore the patch in PW. Thanks, Paolo