Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2562707pxb; Mon, 19 Apr 2021 08:29:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7pw19HNqrbmvxM10l13tiAn743WdyQz+43GvAThMZ75GmtdayWliJRi3MZgH7tm9YeSI9 X-Received: by 2002:a17:906:40da:: with SMTP id a26mr22736201ejk.513.1618846165609; Mon, 19 Apr 2021 08:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618846165; cv=none; d=google.com; s=arc-20160816; b=i+VKNJD071Boo/1j+vznHw0SPQEXY/AZwqScu72/C9ttOk3GbVAE7Vz+1MElt0A21f 9KsAGN3blVzlocFtGuruNT0ilaQFXSuVUuZDsrg1XUHIOK/VEK5VCU96i5dDbQHJwpaP YGAMTA0P1buqwMpkCQ9xEpnoYlWPWUeiE7he8hkmXNZa3hlp/lGNiJdSPFr+TcQ0oSyv lPcJVUVRn3IAB7y+OJfHdAO5vNr7OqFEhfXukULHrejz/u1tCxLrTjpYBlgnBKxmZ2Kc 5ikK/tqDYqV81DZji1JwO7vB1nUXhzZkxcqMByU/eY3f1UAruq3JjtiNIcGIVM2rQ6mk 3zdQ== 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=cSq2O/1iRAipq1NDptikSTCGszpSsDIsr+18GK7sgEU=; b=tUwPjTpskpYTnu32/QrsIeCJRpB+p8r11FGf2rWJ4JrgFDaO1GwD1wQMqTPk3m7fFN UnNWJaiCvw2OPL9qMZqT6XeBidggOxNFjeUdgiog6fpW4gpg1sU51SBhAmWzrrVCIGzj 9Tosj+InwFtA0c9uvhz+sqummF7zltOAqSJ0fqTf+FN8FXzuoQLi36IiypRbV05eWfS3 sE8Ztq4pBH1GipXoUysAXDvwjKPZpAsQsuE/hQnz+MrslDzVKQBhcIhivykrF/NuivSp mlKW1X/iFvWc8qW3q5lt8lIYEMn3uhY4mtdEDwc9v5X/12VhSMG2NdMwhAAMXLhPtO8W b/5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xfphp8Ed; 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 qt8si12272032ejb.515.2021.04.19.08.29.01; Mon, 19 Apr 2021 08:29:25 -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=xfphp8Ed; 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 S241691AbhDSNYc (ORCPT + 99 others); Mon, 19 Apr 2021 09:24:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:54806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240702AbhDSNSm (ORCPT ); Mon, 19 Apr 2021 09:18:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06845613FB; Mon, 19 Apr 2021 13:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838099; bh=N0Ugq0o3pQAuduongTIeizdD/oz1VyPo6r7AfmJ3Uho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xfphp8EdUKHoprpxA0MRrZDf+jfLSo7F8jabq/3NrIS8drZKRv3ev8kL7yw+aAq8P mMupmGyCnKj5iEJlJdPevAuQpajuVvTz/jBf7vKPP33yhLS4rLw8QFKfEiULu32ZsT eKjO4GCzk9X6iku/6EUBenGQZjPkEFpX2HSpZN/E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Van , Dave Jiang , Vinod Koul , Sasha Levin Subject: [PATCH 5.10 007/103] dmaengine: idxd: fix opcap sysfs attribute output Date: Mon, 19 Apr 2021 15:05:18 +0200 Message-Id: <20210419130528.041395384@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@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: Dave Jiang [ Upstream commit ea6a5735d2a61b938a302eb3629272342a9e7c46 ] The operation capability register is 256bits. The current output only prints out the first 64bits. Fix to output the entire 256bits. The current code omits operation caps from IAX devices. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Reported-by: Lucas Van Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161645624963.2003736.829798666998490151.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/idxd/sysfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c index fb97c9f319a5..b3ab86ced355 100644 --- a/drivers/dma/idxd/sysfs.c +++ b/drivers/dma/idxd/sysfs.c @@ -1259,8 +1259,14 @@ static ssize_t op_cap_show(struct device *dev, { struct idxd_device *idxd = container_of(dev, struct idxd_device, conf_dev); + int i, rc = 0; + + for (i = 0; i < 4; i++) + rc += sysfs_emit_at(buf, rc, "%#llx ", idxd->hw.opcap.bits[i]); - return sprintf(buf, "%#llx\n", idxd->hw.opcap.bits[0]); + rc--; + rc += sysfs_emit_at(buf, rc, "\n"); + return rc; } static DEVICE_ATTR_RO(op_cap); -- 2.30.2