Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp788228lqs; Tue, 5 Mar 2024 17:24:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXTWoL2R76eQL8IxjQAgkUXNb7QB6MsVf338jMve2gqQGqlbxIShKvY7RScM94Srkt4oOxkKDpNiQBq4hFIZeoq03afPlGlnWtMn7lkdQ== X-Google-Smtp-Source: AGHT+IFUu+3H88OwTIkCf9IgnOt3Ug06s4HvMeyo74Tiran3ng+iFwDXPFdbXT4jc2z1vJetnTzX X-Received: by 2002:a37:e111:0:b0:788:25dc:1eec with SMTP id c17-20020a37e111000000b0078825dc1eecmr3987403qkm.0.1709688277840; Tue, 05 Mar 2024 17:24:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709688277; cv=pass; d=google.com; s=arc-20160816; b=Qa+XOmbCWBcCfkGtvfrnL6oODBjRWwk2InNRL0c4JrjYps4aoGweJw8ov587mY97fy cePyuBl0KytG4aD6XRtg56ZMPtiVrVknVKFn+KR1h4UnSllwWGMzK5auVCigET1wOm96 ++o4/I7Qti8TpUoEARFQ3xhAV4HFu/SteFFcsLZhyq5QinhbDPDwTafMNikIuCvrsfOC 9o8YfxGPKRFyMdivV8RPd7mCpazwUCjP4+CkUwcKk2o7Tcb0BCUa8TGr2qxdk6nBQTgo uAQMRLg2DQ3ILDB7MDGiGrUAocPDUjA38fI2ACD2qTKasd59fW9qtLP8TcXS68Aqrk2Y IEfg== 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=ON2tC2+nCiKUfn9mEWHZyUMdPSMkEJuS3sf4mHrKaig=; b=j/Gwd5y3fMDwYH3TTCIb+5MWU6uxL+QtmP8UKfjS8Ru0qQ1j9eeFcFzAWd5KPnRXCN w746GzPVhlWqkcuc0OZoetULpjy/OkK+r6tAxmVso+ku432AQYb2rLrc7O7+hbVsDwx1 Y48RcHbvj1qbhWnTsvW9oA5o1L8ases9omJhxJeCm2M+HJc789vuORZSA7hXPqgoCIO5 PE7sURgrr/LEbDVHnI9LYkvpLqzfjH87cTLJcXI0tX53YV71PLIIBAok/12YjN/Ycx63 gcZd2W/CMXq3Vk9qkD7y6lPt571dTnehMv+q6293qjT23TEfR5+pcLTXn+06ujpPRL6h nk7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EOzeZQPJ; 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-93194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93194-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 y11-20020a05620a09cb00b007882923d65esi5539339qky.517.2024.03.05.17.24.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 17:24:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93194-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=EOzeZQPJ; 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-93194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93194-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 8EA781C249C7 for ; Wed, 6 Mar 2024 01:24:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDD551B948; Wed, 6 Mar 2024 01:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EOzeZQPJ" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 63BBE1B279 for ; Wed, 6 Mar 2024 01:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709688163; cv=none; b=bY2lO2MKSm9lGfl6zQWTpvNMS2UC9ai1NZ26PaCMsIiyGOnxGnBDtQfsXNlpN0U4BXuLe0KWllJ29RRgxFzR3OfmL5YWWWavsnKKiHasENK2SUboZFqkwVazK9KIjIfSoYmEumC6grL3aPUOIahnOy4TbYd6ZNQKxHG7JcPDl9s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709688163; c=relaxed/simple; bh=maF5o+8NzF6pdVwJjN4aGBE4hXXZ0tcVypbGypFOmGg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=hhyfyhGDUpgCEdRQq7y+9L41LVEwGPKWix8OAezUFfyCbjHhbbW9HLDQoPZlOy8McGmQGH5HvFAfVzXxw63bfYxTjQaMHG8WXBZsjCoKCxzNnByoJs8qFv94k1EGO1RMBV8cChu3WMt8uwhX614tf5jgyGLsQNhf48oq317K2vU= 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=EOzeZQPJ; arc=none smtp.client-ip=209.85.219.201 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-f201.google.com with SMTP id 3f1490d57ef6-dc746178515so725537276.2 for ; Tue, 05 Mar 2024 17:22:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709688160; x=1710292960; 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=EOzeZQPJB5Y3+i9PAUfMpeIF/jgl9XXjEiQhZgn6oouhpApROH362BOIX2etaWYvDZ 2b8SYqu21gI4lUPwzLEV5hlijNFTpy5sg7OhWKmwwTeR6XaA2X00zDs3gGB838HIP5rD 2G3UdYmLmL+bMAo23lfrZ2BBY7Rg4D3n5LaJM8foKOdk7V+ufBg31nYcdGos3HtieJ6G BNqvYACdqaFmFj0LY4FVfTdNLNWLynOi7Wn4Spv8ps2Ix6CB8qgKvRtLXaGbDLx82rZS GW1AtVsxHK+JBOfLNaGR/dVxP8xFySX8PltjfifuZnIL+61nFsRFD7NxJAIjElInwKMi RpNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709688160; x=1710292960; 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=Lc8FuoNs8yptoZwEmJ6DZVBbGC7dE8C6Jq7DnI8bAphYElc/WxyWnfyIbyurfylwYu 4O6gNgaFHFku4rEpnP9D69eSM03V14D8Jx7frtoBzPeFpX7TkNMyQEc17xa3k8giRhT1 rQGd3EuvKwnwZQSHN0dlSw8twUf/VQdEqEhtz3uR85MRhkMDDxWh44zo4kHO5EXvm/Xe IkoJ7GAU7p2jXWo2eeSc1YWSZUNPlZEvAlkHSZjj6eFfoIvU5opqqcd7g8OVk/cyhO6/ AUNraWfrcT81u0JYLUh0kl9MPwLy19iIXqEKKN1vT1reGj0yYaKX/ggJMjnqLfxsQ/Sc Ah7g== X-Forwarded-Encrypted: i=1; AJvYcCV4X9/xgReT0ssQUlDS4dOTNQ+VgNrwHnhnwGXYN90kNCAnSICkzjh92irlfPihOBDcbQwGhJP3mnHWHtJjtS738wqnff7N9hqCj2ac X-Gm-Message-State: AOJu0Yw5X3FJbPJZQo8Txbzqh2OifK2IjaFD1lFbJnhzfp9XQ9K4GLpE xiVgglvCflcRylPxD5M4f7SntfMfpmxnIrORL35HnYqQU73pmVQlbOorsCtJmoXrwn7put3JD0f YUz7itPK+9A== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:69ff:df2c:aa81:7b74]) (user=ipylypiv job=sendgmr) by 2002:a05:6902:1004:b0:dc7:42:ecd with SMTP id w4-20020a056902100400b00dc700420ecdmr3434562ybt.6.1709688160545; Tue, 05 Mar 2024 17:22:40 -0800 (PST) Date: Tue, 5 Mar 2024 17:22:24 -0800 In-Reply-To: <20240306012226.3398927-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: <20240306012226.3398927-1-ipylypiv@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240306012226.3398927-6-ipylypiv@google.com> Subject: [PATCH v7 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