Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp120067lqp; Wed, 20 Mar 2024 15:58:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXq3dstvG2oY3hlwtF6S91Qypm/zJuNgDOUZcETtMJjTWAv2Enk72nK0N91tzUlnsjPLro2dArdbi2sBxd+rOelwMnWebkH65tvNYn85w== X-Google-Smtp-Source: AGHT+IFnXspj4kgTadkmu5TKi70LQdE8T2OZLKRuOpdqizlpLHzekIuoTLwLBh/BbKA94/N9Blos X-Received: by 2002:ac2:44b1:0:b0:513:c2e3:226e with SMTP id c17-20020ac244b1000000b00513c2e3226emr305332lfm.8.1710975515078; Wed, 20 Mar 2024 15:58:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710975515; cv=pass; d=google.com; s=arc-20160816; b=egZtYVgLZKy5l7vrzZga7eBeJClmNE4+9YUtO+j1ivc2ApiNjDQrxFvLV2Z8uIFN9S mhnsM3kWA/pE9SE8D/v1ctI7tDQZbnqjBNEZHeGnJSzpObcIf7cQyQ1jhVKDT/riv6Uk bOyM7SnnUEGoj7eyDtXZpZk0lg3O2TUfqIPeNke+Xg4U4Qrb68VTOs4eUQMnRYlBLD7/ GupzgyB9SuaIvGWdqdDP8b+zGKWZJ+AS8YNHJhSYaLi+shXcsMw9//A5GKG/1YTR9ase zbrdqptcKkFGh6MtWlIVEXYlDV1K4joT+dCS/JiXTCHb9L9F1zn4SvpFaXIGJ568vxgk f2ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=13ghe/Dcccxys0JDUXSMtaJE6mxH8x5jhjb9llYFpQ0=; fh=dK5q1+5K3h6mWoDEa7jl8dYP3xDFhMYF5vZ9uVV0gSI=; b=LlQYhLlBj6KRSc9EjaghnLohBow3si/Kpi/60428UkYBCi4XM3iY16Z7o7qVooCNZl zGPvmNsiN1jg8tIUWQVYopqQYr6XCZ+dg+EZE6nPx8IR1DL8waXlXsSAJJFOUPQeibq7 Qo4uuFQQwhzpMU5FmFqGt1gNCozOWQx3VKb9S7qSgfSNGQC0sDZgn/HgIqwT4Ff4qAul Xc/GaDm/tNwJ8JLP81V22aLu8Rg1KSFhhvmbB+f14VboTFquxHruOoDHKfGPIhIpkkuB xXzKZxwRTAyrSdwqIAHuE+SX5SejDJKqNo/RKvk63zslsboF2YsVmuy3qnGyDI/IGAxF jYNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=JIY3LCEt; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-109477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o21-20020a1709061b1500b00a46d018cb95si2582641ejg.807.2024.03.20.15.58.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 15:58:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=JIY3LCEt; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-109477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C7AA31F22AF0 for ; Wed, 20 Mar 2024 22:58:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5383386139; Wed, 20 Mar 2024 22:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="JIY3LCEt" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C50DF85C6C; Wed, 20 Mar 2024 22:58:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710975507; cv=none; b=Ow3PE5FyslolZ49qU5MsNB0vXdiObjbxGXX37QebmKa1k2iHrdNQl5qnu8RFuOFmO0tFiifdG3aF03cs5BCNfw0dh8fYzyfm2K/zhRIKtyJ4p6tDViaEo8nn3TszrNZ58CaSQ9+eHZjGMmpW4m+IBzvFMtzHkDUjGrsyYOr0eqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710975507; c=relaxed/simple; bh=yxbUKjR/eQ+A4TDHgpThQwIVWkZZpAq34ngZ7oYpkAc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EzkgQRAWhNJerfKyjbuvxHrjCBVJ8JbpiMOJrjrHSw+BftxyAl0Cx/jwMImyKVrYc7kvI2DA0WtZ52pMyaACZ43CmvcKvyuhHESzo5a6BSdOb63qxbOVjSc75oW8cZyEMsJuqYRTX7wni8p/3sgJ4x8O+CRU+EQ/yPDc4UB9P30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=JIY3LCEt; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=13ghe/Dcccxys0JDUXSMtaJE6mxH8x5jhjb9llYFpQ0=; b=JIY3LCEtex2FFYR6+ZBGIDiPy/ A6RA+5Cr8x6nVJ3eM+rLlJ0SiKV3IUDeOWsJp7VQVd050LKeI6Jjn6ZUJaPIFDk23BFoEXLsjiLa/ 75rGtVicd8Z2/sE4uNqdlcUfv8VslqHlP4RxirFhJKMr6CIxVJG2YUbc78qxFJyZP1W4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rn4st-00AotP-Vv; Wed, 20 Mar 2024 23:58:11 +0100 Date: Wed, 20 Mar 2024 23:58:11 +0100 From: Andrew Lunn To: Elad Nachman Cc: taras.chornyi@plvision.eu, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, kory.maincent@bootlin.com, thomas.petazzoni@bootlin.com, miquel.raynal@bootlin.com, przemyslaw.kitszel@intel.com, dkirjanov@suse.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/5] net: marvell: prestera: fix driver reload Message-ID: References: <20240320172008.2989693-1-enachman@marvell.com> <20240320172008.2989693-2-enachman@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240320172008.2989693-2-enachman@marvell.com> On Wed, Mar 20, 2024 at 07:20:04PM +0200, Elad Nachman wrote: > From: Elad Nachman > > Driver rmmod after insmod would fail because API call to reset the switch > HW and restart the firmware CPU code loading procedure was missing in > driver removal code handler. > > Firmware reset and reload is needed as the firmware termination will make > the firmware loader change its state machine to the firmware loading state, > and thus will be able to load new firmware, which is done at the beginning > of the probing of the prestera_pci module. > > Without this reset, the firmware loader will stay in the wrong state, > causing the next firmware loading phase in the probe to fail. What is missing from this is an explanation why you need to reload the firmware at the next re-probe. That just seems like a waste of time if you have already loaded it once. Andrew