Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2409743ybc; Wed, 20 Nov 2019 13:50:20 -0800 (PST) X-Google-Smtp-Source: APXvYqw4ICA0uFRo2KSuFuHx/y5N+PVx482/47mFvVFbbKIr8wiBOgsgvzGaySdKb/BmgQ94KchC X-Received: by 2002:a17:906:5448:: with SMTP id d8mr7968979ejp.79.1574286620439; Wed, 20 Nov 2019 13:50:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574286620; cv=none; d=google.com; s=arc-20160816; b=owcm6SvG7MUiSzz2N95GgmQNemZXBVy83I1es1NtV97oT6PJs4KG56kcEAu1ZoI75q GTntnSwSk0y28X0rc5LXCFycWryQgAtOJbihqcSJbrKfUfZVXL1IRNOGvKfKik6L3tgg JQOcn6rTBzP3suQGVN83FcObrUhRs/I19uM+i5SEjCgaHfW8pQhUGb5qpC711Xk1LWGP b3Ch1cvhBLOrl0srLo6GLbndiT62Jz/mfeBgAOnUHzXWYv5TTLb4asi3EUm0J6i+E6XL CtMNpnVpkTMMuBD129D6v9YlxajBtkSZXOc/cXuLNUedWiMp3QEfXYH4BtZnyq6nMvk2 jDtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LEOGy/aGyBlhwsYOd/UlL/bgBpedtuIvg6b3B8sUNOU=; b=V2241R8kk3XaW28l8HvHiBqEkoyynruB0lORhqyqW11UWp7fW4iuFsDU3MNGUZ00Jj bqqTrwQi6cBd7ecXw5oAQ+sxZw+8M7VSRYh60O3M8kdg62xyQpxeiVylPZoTR+VnI6RD k/TAym7yxNd3ZdDP4EB7m/ioHiVj1rKVCcBajw3bwYARP2MraT0RpNyIrUKMGfNhJL/x K3VTP1mTXnv1qHSAVDRFTKgYtsvrIetdXePBcWwBdPLOMk2Eoj2fFSy44+oWys+4HPae wflFH2R/L0Z6vnihEV9jfiCbSCbpHlq9iFOgNScbsjvsdhe4NetnuJyYd8BadTqPLFd5 Pq4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16si301389ejc.277.2019.11.20.13.49.53; Wed, 20 Nov 2019 13:50:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726202AbfKTVsv (ORCPT + 99 others); Wed, 20 Nov 2019 16:48:51 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:54028 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725820AbfKTVsv (ORCPT ); Wed, 20 Nov 2019 16:48:51 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id F2BFB1C1AB8; Wed, 20 Nov 2019 22:48:48 +0100 (CET) Date: Wed, 20 Nov 2019 22:48:48 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Anirudh Venkataramanan , Tony Brelinski , Jeff Kirsher , Sasha Levin Subject: Re: [PATCH 4.19 063/422] ice: Prevent control queue operations during reset Message-ID: <20191120214848.GA13271@duo.ucw.cz> References: <20191119051400.261610025@linuxfoundation.org> <20191119051403.783565468@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <20191119051403.783565468@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! >=20 > [ Upstream commit fd2a981777d911b2e94cdec50779c85c58a0dec9 ] >=20 > Once reset is issued, the driver loses all control queue interfaces. > Exercising control queue operations during reset is incorrect and > may result in long timeouts. >=20 > This patch introduces a new field 'reset_ongoing' in the hw structure. > This is set to 1 by the core driver when it receives a reset interrupt. > ice_sq_send_cmd checks reset_ongoing before actually issuing the control > queue operation. If a reset is in progress, it returns a soft error code > (ICE_ERR_RESET_PENDING) to the caller. The caller may or may not have to > take any action based on this return. Once the driver knows that the > reset is done, it has to set reset_ongoing back to 0. This will allow > control queue operations to be posted to the hardware again. >=20 > This "bail out" logic was specifically added to ice_sq_send_cmd (which > is pretty low level function) so that we have one solution in one place > that applies to all types of control queues. I don't think this is suitable for stable. Would driver maintainers comment? > + * > + * As this is the start of the reset/rebuild cycle, set > + * both to indicate that. > + */ > + hw->reset_ongoing =3D true; > } > } This should be =3D 1, since variable is u8... Best regards, Pavel =20 > +++ b/drivers/net/ethernet/intel/ice/ice_type.h > @@ -293,6 +293,7 @@ struct ice_hw { > u8 sw_entry_point_layer; > =20 > u8 evb_veb; /* true for VEB, false for VEPA */ > + u8 reset_ongoing; /* true if hw is in reset, false otherwise */ > struct ice_bus_info bus; > struct ice_nvm_info nvm; > struct ice_hw_dev_caps dev_caps; /* device capabilities */ > --=20 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCXdW0wAAKCRAw5/Bqldv6 8sxlAKDEha3WJuock0aOY2h8UfYbOW3HEgCcCt+6GiSmCKL4VV2nDuTaeTApljg= =AL5j -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--