Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4631223pxj; Wed, 12 May 2021 09:37:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8+AewWUEFCIp/8kHNSfKVSPRalQEKuBD3tFncsjVTD+KKYUK1AWlG4tpvFnC/1o1cyks3 X-Received: by 2002:aa7:cb48:: with SMTP id w8mr44445558edt.55.1620837467776; Wed, 12 May 2021 09:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837467; cv=none; d=google.com; s=arc-20160816; b=Nj37A3kuqv8sKGmPu7ND/O0f3hgmRaJZYeJBH2ffL6VNKutKkPcbE7JOMa7GWihHnX LhhSBwntVUWK6o1PKoDod4nEUvdeN9FCWrgKbYlbyknwy6GC60pv4/tS7F7iF0L9/Gwn dp9KmvvJNZRqmbBMyy0f/wWwxz7gDMm0xIGp2uV4JgcxMZrlG3Z+Z+dHYRLHxdlWIpmo G5rdSfp2bGV/xK+vp4WGR6M0TPaFpTkbkvAXuXHlNzXnUcu/E0XutOR0satItIo2Xvrq 3gAWFwbT+OEo/PxJmF4T6MSXcE7e/u9ceIAler+cXbUHVxGLoYE5OtAOMZrXHklFMtzb Nw5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zD22MKYm/P7mGbTVCxqr3joR4Ar4oeC4HfpEpjMZAI8=; b=sVVWPTgQYl1W/OjC9QsoeiGFwQkdx7AaU+Pu3AMgIYxMqeY+n13zpAfAf/Pajr90dY MWtUeX6xWf0MAYPI1drry6+bf5j30x0dtIJ/OM76fxtaMfILgigjFV4Anj1YMqafVW63 j2R2Uc02GgweU757SyB0w7mn7oL9MqGG9HJ3f2abs5OsvAxvhNqICgJbJlFHiH8PUBul vUB+6/eU1OL8JbEojvabgFHEDP5h2QU1MRn0IBaRr2KAxU0mtIVt02Pus5tkr0lYKjqw 9um+IxK4Ea+MjNjd4LfVJGmX7qnxsrKeHPVeVUwNL0QAX+fuvwM0nOAPCXNDiLwO8/N0 Su2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u975geIz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a90si57743edf.408.2021.05.12.09.37.23; Wed, 12 May 2021 09:37:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u975geIz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241658AbhELQee (ORCPT + 99 others); Wed, 12 May 2021 12:34:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:40100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235089AbhELPmX (ORCPT ); Wed, 12 May 2021 11:42:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C6CF61C84; Wed, 12 May 2021 15:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832915; bh=6jbx8f/0Gz8nba8YAg5+OSMl+C5x1aVC6pWPyNWnZ00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u975geIzPupUeq2xdjzPrI3kBVlbT2AorcQrXK5adKvS/NhZCzq8zeVxdDOtPm3Yu AifbPV2Dl8PDBcgMQM6EeQOCHPpu02RzQWg+qAjxeqev+NaxFCjiYv2WHwMizdp5sj XTSyWgIuhnHzipKLG5ByAO2ZVPUd54Hs7CqoKwo8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Edward Cree , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 473/530] sfc: ef10: fix TX queue lookup in TX event handling Date: Wed, 12 May 2021 16:49:43 +0200 Message-Id: <20210512144835.301606120@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Edward Cree [ Upstream commit 172e269edfce34bac7c61c15551816bda4b0f140 ] We're starting from a TXQ label, not a TXQ type, so efx_channel_get_tx_queue() is inappropriate. This worked by chance, because labels and types currently match on EF10, but we shouldn't rely on that. Fixes: 12804793b17c ("sfc: decouple TXQ type from label") Signed-off-by: Edward Cree Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/sfc/ef10.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index da6886dcac37..4fa72b573c17 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -2928,8 +2928,7 @@ efx_ef10_handle_tx_event(struct efx_channel *channel, efx_qword_t *event) /* Get the transmit queue */ tx_ev_q_label = EFX_QWORD_FIELD(*event, ESF_DZ_TX_QLABEL); - tx_queue = efx_channel_get_tx_queue(channel, - tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL); + tx_queue = channel->tx_queue + (tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL); if (!tx_queue->timestamping) { /* Transmit completion */ -- 2.30.2