[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191120214848.GA13271@duo.ucw.cz>
Date: Wed, 20 Nov 2019 22:48:48 +0100
From: Pavel Machek <pavel@...x.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Anirudh Venkataramanan <anirudh.venkataramanan@...el.com>,
Tony Brelinski <tonyx.brelinski@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 063/422] ice: Prevent control queue operations
during reset
Hi!
>
> [ Upstream commit fd2a981777d911b2e94cdec50779c85c58a0dec9 ]
>
> 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.
>
> 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.
>
> 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 = true;
> }
> }
This should be = 1, since variable is u8...
Best regards,
Pavel
> +++ b/drivers/net/ethernet/intel/ice/ice_type.h
> @@ -293,6 +293,7 @@ struct ice_hw {
> u8 sw_entry_point_layer;
>
> 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 */
> --
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists