Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1958701imn; Mon, 1 Aug 2022 06:19:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Ea/GRGaFeDeyP/IAjsEWIZ/W2ZSbji0aNR0QkrAuKe7/z5t10kLUOdnUdYVlEDF2olLfg X-Received: by 2002:a17:90b:1a81:b0:1f4:f9ff:9028 with SMTP id ng1-20020a17090b1a8100b001f4f9ff9028mr6664415pjb.44.1659359974877; Mon, 01 Aug 2022 06:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659359974; cv=none; d=google.com; s=arc-20160816; b=GPPhl8ROpLxcKJ1BuE2yPEMB9utAQJp1fWfhefBZmAx7AnA/bVHtZ4yOw9UnQDxpfv 8L3R1Xhx6WAJGokIfGMHyngsKFbcuvHxVCW6m17CYKl6B+YrqyHSPY1Vxghabxicfibu W53xGNU5yglfOa489TwyOtqactOgynJgEkaZnReZosTstd+CRheOyk0fG36JUwLO7lbW 4k+6LVmv8W5mRDnazvYL03fVfc1BIqqAE+6EjF5QiCPQmPXsrYMPvv+zvn89vhVcOR3O h1UCe59xpyqhFoTUuiBF/r14gZwZZs5Ry45efH2zP6lgMxlnXsCw89E+pA07GVTV8BR+ bMdQ== 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=tKjMFKKMNqAMlU+V4d/zmHVITr1o33O/eblTO26dYYc=; b=m0pvWwPWWS38uQMqwhhZT/NlzfiFpAivWBoTLrTtV+vBAuuZxz46j7TYYDkKegspDF zil7baFIUrSef5dlhZiz3grn0NWKys2nGZy9tOS7HEDnHEH6U9fhJ5GrZLgoZ6CE8osn mcb75CJFuyA5afVUEtiO9xRnZ00/5GEWkcqf+KU5UytMCeN/iRf2JWSZjEu0KCEbO6ko CYFnLWELw8Wcwqk3J9svKvnkaFql4tb/tX/FlCDUkt3soIi3hfAfKGHQT7ISMUqBdhVc X1FHQkg4CL1GjuRXV4zaAmMu8lfOYKH+L3A1dzpwj7grvtFmDtWHE6959P7b0UHHjeW2 1j5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JFyi6UvW; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i137-20020a636d8f000000b0041b0abf6cd2si421268pgc.647.2022.08.01.06.19.19; Mon, 01 Aug 2022 06:19:34 -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=@linuxfoundation.org header.s=korg header.b=JFyi6UvW; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232032AbiHALw7 (ORCPT + 99 others); Mon, 1 Aug 2022 07:52:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbiHALwR (ORCPT ); Mon, 1 Aug 2022 07:52:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB6BF422F1; Mon, 1 Aug 2022 04:49:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4922EB8116E; Mon, 1 Aug 2022 11:49:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A46BBC4314B; Mon, 1 Aug 2022 11:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659354586; bh=TKjhOgk93kEZbcfX8RBju1vPWJYH5bAxIyLnN/0OsR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JFyi6UvWsGDHawE7NR7zSrgMiNQYjTVxsLipLHuC+phuYZXin7ngrJeC7EkiyG/l9 ZHuAWAcfgXm4a9sFnkMYrbIacr2vNE9nJg25ySU6jMDrqHWZkmjLTwrVi4feABNTQb BrMwcdd+2+fQw0Qg18cz5XqFzUEN5QSGF9VCb0GE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maciej Fijalkowski , George Kuruvinakunnel , Tony Nguyen Subject: [PATCH 5.10 14/65] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) Date: Mon, 1 Aug 2022 13:46:31 +0200 Message-Id: <20220801114134.282305348@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220801114133.641770326@linuxfoundation.org> References: <20220801114133.641770326@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Maciej Fijalkowski commit 283d736ff7c7e96ac5b32c6c0de40372f8eb171e upstream. Tx side sets EOP and RS bits on descriptors to indicate that a particular descriptor is the last one and needs to generate an irq when it was sent. These bits should not be checked on completion path regardless whether it's the Tx or the Rx. DD bit serves this purpose and it indicates that a particular descriptor is either for Rx or was successfully Txed. EOF is also set as loopback test does not xmit fragmented frames. Look at (DD | EOF) bits setting in ice_lbtest_receive_frames() instead of EOP and RS pair. Fixes: 0e674aeb0b77 ("ice: Add handler for ethtool selftest") Signed-off-by: Maciej Fijalkowski Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -652,7 +652,8 @@ static int ice_lbtest_receive_frames(str rx_desc = ICE_RX_DESC(rx_ring, i); if (!(rx_desc->wb.status_error0 & - cpu_to_le16(ICE_TX_DESC_CMD_EOP | ICE_TX_DESC_CMD_RS))) + (cpu_to_le16(BIT(ICE_RX_FLEX_DESC_STATUS0_DD_S)) | + cpu_to_le16(BIT(ICE_RX_FLEX_DESC_STATUS0_EOF_S))))) continue; rx_buf = &rx_ring->rx_buf[i];