Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp754507lqs; Tue, 5 Mar 2024 16:00:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU9oVlpdcSzHwFDxXq4w7qToP5/TEt4LN+Lu3whYde6B2N3XS5G7d8ZN6kCYdfkyYrDAlXzLPUNrIMayFpivF2uNMhy3aK3ieSzAVu+vg== X-Google-Smtp-Source: AGHT+IFEec946QJc3By8/Pm/J1bFWWrdIcS2x5uMd7YGhZmmQt7XNgiXG3RdVCKIErA2nraKkfvf X-Received: by 2002:a05:622a:60b:b0:42e:f38a:b4b8 with SMTP id z11-20020a05622a060b00b0042ef38ab4b8mr4081909qta.55.1709683217827; Tue, 05 Mar 2024 16:00:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709683217; cv=pass; d=google.com; s=arc-20160816; b=NCIlCxqn8NoFcWyn8lLvSVAD2ov7i8dhA1zSXJ2TU7Q/2N2Il0JbsywNW79APvgupz wyoCs8Gilolj2YpL6pQLJkOA0O1hPlhD7/uRybFXPDXTvAP+gRFWbeZko8zBQcm9GSbF 6SAYSBrePKrWuPOJQ9z6VAal0W7WGoXKX8Ft7HKIYXU5JF0ssRoqgoGcTRPzHSVfFNZJ ofUbxLLhCuwyIpCSdqb1+34USlcT24u3OaG7XOh4m+1WIk+wq1t14TNQiWD/7dyJ6xdE JwC34HsdZn9EzuWK2UvWCtCeRlkOLzsLMXbciyaqpzt95uENOCXotbSOO49OEvI4vBRS hCMQ== 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=9D3wwHTaGXoUxTIIC0KnLIe431yjbfic0tFZoCaTHSU=; fh=snKNvVvMNhzDa6+4H4CXVRSaXv2D4u2mA9jgV5sa7tQ=; b=m/iKUXIK1Rxp4xVjh73tXp3jhC7Wb8VQ1PsqzBJpw6YPtoS2IzzhQD3IWdaEfk2L0a L9PjPexPmsp6eggzWTnlAkhoxKNco+F9cdNIxroSck+TP7Lp4/knViyimjKlGSFJxe7y rR9bgalCEHKAvh0odsa62jYhpP4/N2ethF5VOmf2k6W6kpukFzcN2sxQ7EsC3CBxVyx/ 78nemOCfjtaaVyGUbwQIHJXEzxl4QRzYrqVZ8F0nDOqnnK94uE8AJ6RN7FmynUigd2mf WOmJJJWjXc/TMqks7zKsqWrgCD3LmMUDiHV34hPT/+ae8VdO2SJKiaKnHj3bI1gOPGA5 ai2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=kwmBL62y; 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-93128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93128-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z21-20020ac87f95000000b0042eeec63ef0si6540533qtj.316.2024.03.05.16.00.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 16:00:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=kwmBL62y; 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-93128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93128-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 87B9D1C22EA4 for ; Wed, 6 Mar 2024 00:00:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17D00134CED; Tue, 5 Mar 2024 23:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="kwmBL62y" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.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 933EA12E1C8 for ; Tue, 5 Mar 2024 23:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709683122; cv=none; b=KnrgqvJU9uVuJVibn9V9LKk3pEwm6cendHIRwhFKGams7l25GzJZ3cAA6t5eXiwx+IQenXI7ziWJ7RfuCufY2qO140dm1ndqty9owS4UhvL9CHFrNgIAmbJYqVDI1ZQs+amyfJ0plz1NGWkyOVTT5j51+seKHqR9FBrwH+xLaKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709683122; c=relaxed/simple; bh=maF5o+8NzF6pdVwJjN4aGBE4hXXZ0tcVypbGypFOmGg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=WIWJo65BaxL2cnTSi3dvw7f1BPBg10PMvseNVShbst+JQB6tnlGTnwic6QFXF9KSLQEghNLmyOCRjJ8B8QbM9SypPNoJTwTvln3A6d46B6Ku5WJ/GiIBJyF5mDOUBeeZ1aAmDyQc/8eTVKPZZAR6hPWYuXc0pvvIilAJ6umoDTk= 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=kwmBL62y; arc=none smtp.client-ip=209.85.128.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-yw1-f202.google.com with SMTP id 00721157ae682-609a1063919so25484317b3.0 for ; Tue, 05 Mar 2024 15:58:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709683119; x=1710287919; 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=9D3wwHTaGXoUxTIIC0KnLIe431yjbfic0tFZoCaTHSU=; b=kwmBL62yWFGTAH54KJPWim18ayjDRUwI1RDXQDaHZPYts7ekjH+NuG+j+GPhySutez LVjkL0okArCbPtiVQQuZICrSzwrbzmMHc8hUkbQS8w1AwLjlixqvrDhN9Ia+M+lJCeMg uiSxLV7Uy3ThTmK/qqpPYj7t3p1lVkuCb+X1zMvKpLfuJEy0Jfy/2rIoBVtGLQNc6gDu u/eQYx1DrKYM9NujnBTOivXegazpIZ/dDNca6Huahy+a5DNH1qqmVSgfWbA5UHJtsMjh UJfPCLjF0ANSjCmA9RR/pVJaExelndBRgNZCyEhTV4Jxh5gMPVTc6w6lT7KXUR70dId0 qh1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709683119; x=1710287919; 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=9D3wwHTaGXoUxTIIC0KnLIe431yjbfic0tFZoCaTHSU=; b=WuRmcwiKe6pruEHrw+HPejTEhzwSHVeFxPTzEwOXNrRRQrbDsty5KKgjPldcCHXihs iwQ/YS/YXk4cg7FhDuLyYdS14xo7xy4LdUKZ8wpszv/672kUoMow6sV5jdySe3rwO9aw hycdbgTDy1+kxpwO3RSQZbIZfSqS0IavwOfKLgQB+Uev7awRf/WT8DthzcNt+WQNqZAM ITDp4eLPTrDm9SaIBUzzYvoHsu+Cxfsw4moUWP8A87f93pP5Fc3TThfu0tVpYotnZPzH uhDjwiSo8/bP4v8qe5dQJ8Yyraqsqnzd+hz33Fx2fMt0fJZsQWS3JhKfC75TxUVxBpd/ rzzQ== X-Forwarded-Encrypted: i=1; AJvYcCW3/+SW3w7B/SOgIaim+K8fkb7OHutrlw1JXMuKq0G67wvhc5wYGw4GmMqBg5ycng74VqqHSt0tUDQwHwp44003QAK1JRpL2DpLVN2S X-Gm-Message-State: AOJu0YzHppjAhItaUy8MHvcl0xRWKHbYxxLC2dW+AwBMY1kX2nBxkzXU os/qFgNmLeHzLd+O6kTwmfc6Z3m0cRVd7CpCKd5ACLH7stojsE7qKJ+y0DAaqXLFVXgKhnlSuLY sZoNpbLrRyQ== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:69ff:df2c:aa81:7b74]) (user=ipylypiv job=sendgmr) by 2002:a05:6902:150d:b0:dc6:fa35:b42 with SMTP id q13-20020a056902150d00b00dc6fa350b42mr3669159ybu.2.1709683119712; Tue, 05 Mar 2024 15:58:39 -0800 (PST) Date: Tue, 5 Mar 2024 15:58:20 -0800 In-Reply-To: <20240305235823.3308225-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: <20240305235823.3308225-1-ipylypiv@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240305235823.3308225-6-ipylypiv@google.com> Subject: [PATCH v6 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 Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan 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