Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp36803lqs; Mon, 4 Mar 2024 14:11:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWWyC/ag23p7Q/EnJFy4zVMn8fauwvvJiQ4FVUPy//VWACQAK1pZa7Kzxbj8wzoD1ZG+Ppt9LSiFJ3Jc+SmJhCv1gruUmtP4uNsVCuC2A== X-Google-Smtp-Source: AGHT+IG+xmkuEc5UHBZ5Vvu8RLw2TbrkDZ0RWYNyYhLTvzfYXcK43bSWXrCaTgSAX6wdIZnNNIjl X-Received: by 2002:a05:620a:1481:b0:788:27a5:bc3c with SMTP id w1-20020a05620a148100b0078827a5bc3cmr72020qkj.77.1709590268011; Mon, 04 Mar 2024 14:11:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709590267; cv=pass; d=google.com; s=arc-20160816; b=AINPnsYWmepxkdcPjyReqOrOFikDhGXC92rZcu1IDEwp4Y265QWZPoaRR9ReML5uer RMfyxnZwYEYbumldH+Y89dqtUKR2HTBIljHcb8ztOi7DHSY5bmx+30PP++xqNlUJBnOs cYAkoCniUf/Z0aaXrXaRSfPOy4BRyDQ7Y6Y18jzUWpo13ynbuXStIGYj7T2cJ0kfimKJ DJYaad0BRnxDwhuFnXeZ42vgUsjyfZm0oVkIN1jku/nPXoBkVe9NeVtmAru098mfHtl7 S1Oq1dvWdq/h/G76y3LmB8sP24DeARJNChVrQsQ97MJtvWeEqSI5r0jqNcuiQzKCztTH RM3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=u66W4yA8M+KF0Llg68xH23MwaMjWX70CKgHvWJ3oECY=; fh=8wYrfTglLuU0U+aM+UtQ5piUZ9lW0pvF/9TljwMDT7U=; b=TzrYd5iOYR06TjyVheHAE2OdCxzFRCltN36eLdTtonrgbF/SLOCLuTzg7UF3W7U/dk NlW4YCSsMJSS06TmeYVaB7gCkqPTv+k3x5WczvWH9iwNW4INlDbHPlSUEyStfFVvmM9p oKFEEtAfnmSDm0HHHQnBn7iy82b49htU4TaySJoFTDTxBBKCvpc7CRXVakVcK8QV1FMA IwN96EvED//yflq2osER4QQ4npkatT0sbHa+KvCNK1QxYEMi3vUNDgU9nmmHrwpNQotM 37yK9p0/YQ4l4U1ey3YljbFT72i+aEBRvS9WvtUD7dRk0oe4kLoT50CeVGYptOKKUMWT Ha+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=YFF2GFFk; arc=pass (i=1 spf=pass spfdomain=flex--ipylypiv.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-91342-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id wh15-20020a05620a56cf00b007882901e27bsi3049166qkn.30.2024.03.04.14.11.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 14:11:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91342-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=YFF2GFFk; arc=pass (i=1 spf=pass spfdomain=flex--ipylypiv.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-91342-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 22B6C1C23595 for ; Mon, 4 Mar 2024 22:11:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D63C27E792; Mon, 4 Mar 2024 22:08:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YFF2GFFk" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 411F579DCE for ; Mon, 4 Mar 2024 22:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709590116; cv=none; b=MUDDX/CVhNOTzkFF4etZaZylMAbfnsmfs6MnlB1lq7dHIjFBXSK/6g4THfC0hrdjsckK5wlj68g1+0A4K8O1gqt+yEf4d94ZhHyXVNf7Hl0Bt96Mi9Id0dj5FPm/YtHpMVW3U0+cugMv8AxUOKVjFp8LvoG5crHE/tUmrts1BsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709590116; c=relaxed/simple; bh=SbjbdjZWUXBzT2LxbKT4DNqotCfdqsZJ3zhnbS10R1g=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=syuXygb2DXYfb4LBXNd8xkR2YUbJXmzQPBrPzOdXJSjx1hjqxDgOnMDlAqum3pD8sdzyp3FOpMnDJSX6mplMnM+wJ/lEsT5DaIAFxIcecYbbWC1KJtA7qHsFKFks1S2KMNo8ENPc08kC//eneSml4B0fpJxdyHAL1ctmCyBX9oY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--ipylypiv.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YFF2GFFk; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--ipylypiv.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc647f65573so8751790276.2 for ; Mon, 04 Mar 2024 14:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709590114; x=1710194914; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=u66W4yA8M+KF0Llg68xH23MwaMjWX70CKgHvWJ3oECY=; b=YFF2GFFkect0CcmJBk6glB9KZUeLUXgxIcsgpYgUr8T2Vq4vqlCF+bQLvgOP1ZTmtO GF7PseOy70CcoeozA+NodicCvjCi+rtuVIy6j9QTUlHIRgzSNRCJOK6jHc+/GfpgvGJr FerfHqQupkyZadxBDohuqNYYH6jGkcZUKDuRO6pZfTCt4UoPI+siEvXAz2ud89LpsCOg D8zyHD20UKBwW7Ow458+3eBrPUp7ryWU81E7SPRMPXM/Jw6gh+L8yxnLl1KGi/nDI0mj IHxLHI710sjYLhN/TsbzlWye5+YAH5no1nS5CdLpcpLiSMzXtUvCJAH1thNdKgRp27yL sRYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709590114; x=1710194914; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u66W4yA8M+KF0Llg68xH23MwaMjWX70CKgHvWJ3oECY=; b=dsU4flcfpORFBMlzs2RJXn3y+XOVfP2RX4ochsl5XKyWwCdxdt0psezZOs+YrBc2i9 PL3pmMywpMd6OfAPyk83hq9QrCcKPoZQ418nMz7iBwlZDJQJABBCJeytCbjoMKfO2Sh5 UsGnYStQJBWUe6tu47gyIHqh2r+UxotjeDS30qCivy+1zZWxLnVYLnGcpxSWLAk/4/CN ofbp7w9dOH6QOOylOOZbF8+97vCUw+uJasx63znCARYKirA4OR8BVWZjN3VkpMOsOAtg 6pGtYnL6lt/oKu7YthX7sqBZRF9yv6mSnwnHaSd5AAQXOOUbMvk/cNhzQ70Bt8cO67Jv RvZg== X-Forwarded-Encrypted: i=1; AJvYcCV8Wg8hcvQ3bstVFp2bN+lSSUV3BnfdTwM0cn5oVNclRAgjba/PcOdYUj6cI+7C11koUrJNIGoDLxIyj1gT4cxBypFlNgnJQqgKdkrC X-Gm-Message-State: AOJu0Yz6fBDmGXyGiyx/z9mqE8fwFZHEAEkNXlTwkP6Npj+gZsCbMpNf gk6jFfPY83GJoEAE7jZzCT/1UmSWkOqqjKTdJbk2VZ27tZgHheYxX26T5EdrQOIC5J8wuAIU0df QWRZlJ2wAoA== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:e901:e760:20cd:d870]) (user=ipylypiv job=sendgmr) by 2002:a25:abc2:0:b0:dc6:e5e9:f3af with SMTP id v60-20020a25abc2000000b00dc6e5e9f3afmr2651172ybi.9.1709590114389; Mon, 04 Mar 2024 14:08:34 -0800 (PST) Date: Mon, 4 Mar 2024 14:08:13 -0800 In-Reply-To: <20240304220815.1766285-1-ipylypiv@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240304220815.1766285-1-ipylypiv@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240304220815.1766285-6-ipylypiv@google.com> Subject: [PATCH v4 5/7] scsi: hisi_sas: Add libsas SATA sysfs attributes group From: Igor Pylypiv To: Damien Le Moal , Niklas Cassel , John Garry , Jason Yan , "James E.J. Bottomley" , "Martin K. Petersen" , Jack Wang , Hannes Reinecke , Xiang Chen , Artur Paszkiewicz , Bart Van Assche Cc: TJ Adams , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Igor Pylypiv Content-Type: text/plain; charset="UTF-8" The added sysfs attributes group enables the configuration of NCQ Priority feature for HBAs that rely on libsas to manage SATA devices. Reviewed-by: John Garry Signed-off-by: Igor Pylypiv --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 6 ++++++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 73b378837da7..b5d379ebe05d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3544,6 +3544,11 @@ static struct attribute *host_v2_hw_attrs[] = { ATTRIBUTE_GROUPS(host_v2_hw); +static const struct attribute_group *sdev_groups_v2_hw[] = { + &sas_ata_sdev_attr_group, + NULL +}; + static void map_queues_v2_hw(struct Scsi_Host *shost) { struct hisi_hba *hisi_hba = shost_priv(shost); @@ -3585,6 +3590,7 @@ static const struct scsi_host_template sht_v2_hw = { .compat_ioctl = sas_ioctl, #endif .shost_groups = host_v2_hw_groups, + .sdev_groups = sdev_groups_v2_hw, .host_reset = hisi_sas_host_reset, .map_queues = map_queues_v2_hw, .host_tagset = 1, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index b56fbc61a15a..9b69ea16a1e6 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2929,6 +2929,11 @@ static struct attribute *host_v3_hw_attrs[] = { ATTRIBUTE_GROUPS(host_v3_hw); +static const struct attribute_group *sdev_groups_v3_hw[] = { + &sas_ata_sdev_attr_group, + NULL +}; + #define HISI_SAS_DEBUGFS_REG(x) {#x, x} struct hisi_sas_debugfs_reg_lu { @@ -3340,6 +3345,7 @@ static const struct scsi_host_template sht_v3_hw = { .compat_ioctl = sas_ioctl, #endif .shost_groups = host_v3_hw_groups, + .sdev_groups = sdev_groups_v3_hw, .tag_alloc_policy = BLK_TAG_ALLOC_RR, .host_reset = hisi_sas_host_reset, .host_tagset = 1, -- 2.44.0.278.ge034bb2e1d-goog