Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp175272lqc; Thu, 7 Mar 2024 13:56:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXr6qJzK2OYpQnvSh1qt8ujBiergi1u1JCZ5r+e4Rwo3CZIrPY2YaeHvajcQGFFD3pS0mpQAUpevSCveNJwHWcRUd4HMeAMBlun8XUyGw== X-Google-Smtp-Source: AGHT+IFKlNmfQBQISJADFZCNeldClnWH0qlWw305Ab1RbeFBqh1DxxjbZn9ATp4CemaLkgftxQ2z X-Received: by 2002:a05:6a20:2587:b0:1a1:7765:f58d with SMTP id k7-20020a056a20258700b001a17765f58dmr2769149pzd.18.1709848564314; Thu, 07 Mar 2024 13:56:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709848564; cv=pass; d=google.com; s=arc-20160816; b=xT463AMK7Biew6im8guRkCdr2U/4+rNgknzYNHwcAGi6v7xjSaIzufxesCeBKwXTOB 6L/WxALgzNa7CzC7ftMpD/xJJC0gS3AvoSylFp3M1MfDvghBPHCpLE/8DKsBFc7xQHTS x0c4JAqNk4+x249G6VRr+1lad/n/pd2+bkNOQKsYJPr39C00PKFrntK/9/hUYsnbcM8d SE4smQqI3mVR39i571Y3+AkTESf35VpfqrJ2/LNaBnjckCKNw6PH02Cft56zTdgESJYn l4Y6eVZg3uso0tq3ukAnoXPays4i4HU6vdVeuCFLue9UGG4EsTSttqPsfbinLOlHpslJ xgxg== 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=FNHEYmkbDz44hYs4zD+M5ZgpK+WL/ZuC9mDgGa4D+bI=; fh=p70F7arzGZ4iVqRVCq76iAsn6KsOeZNxIr3tinpzuQs=; b=GMXrzWIXT6VyfMe5sq9FrebYCUUYj/GMnPd4xNSFDT0uHFZ/HhBUdq5aktv/5S/pnI UNubtcwjuZBBqHULVUQYdNG3HVSATEzD3xDlQLTLd8/TVeoMYOPfB2roQrQj+Td8k/ps Dd+NsQqb345GH4/UVqAQgXear4XkG09Ej+OCm8QBNuqL7cgxMZprNbqD4Ah5ns7s7H1V YdoODijl/D/3SAwcqdBB2jtQM3CiJFI4pvjUFRgjiuzeB9P7POUgAgIl9niOVO+1lRGr 8wrzcTv26TZpg+pBsYZD+p5dZ5FRC0+/bwQz2ODiUkkhjHMSM7CwklK1ua7gcIfQVaGK +T2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=eTf1iMg5; 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-96282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jw6-20020a056a00928600b006e6488c30f7si4783784pfb.198.2024.03.07.13.56.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 13:56:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=eTf1iMg5; 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-96282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96282-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EC146B26D0A for ; Thu, 7 Mar 2024 21:46:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 282E4142908; Thu, 7 Mar 2024 21:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eTf1iMg5" 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 993BF14263A for ; Thu, 7 Mar 2024 21:44:35 +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=1709847877; cv=none; b=mOj640PyXA3fIa7qHtIpkd+Fr1Z6A1LPXyx/6xDSGPmx0sfChENF9lsBKyK83ZLeGhMON43ytfwEncwy267cOXF0OYKvFvvSw2rFv7nR70VVjDjAr82hpEDGjwxRQM9B7Jm5odtrC21SS9MllUAZZ30v/RQY7dt7xxjxxum0Mrc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709847877; c=relaxed/simple; bh=kCUyYic0llMdCDm2+Ue48zOf2WyrmeyB/4BoGeE0niE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=mxIA+YnlAh5Dc/uLOn1xP5ZrLV3ShiRnwwrGbhywAryQqkTexef1y6ruxA4v+54JtHD2FFjwZEVThQM1QkfQ4/7Y6yXVjNtcNzwjOcGqGQRgA5tcw2LBTirfO3pheKQcFtrst0fZo2bHhLnP/8OIvrpgzkUwvZl4dbwavVOQHKo= 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=eTf1iMg5; 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-dced704f17cso2397091276.1 for ; Thu, 07 Mar 2024 13:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709847874; x=1710452674; 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=FNHEYmkbDz44hYs4zD+M5ZgpK+WL/ZuC9mDgGa4D+bI=; b=eTf1iMg57mQ4/JCiUJ7Nuotf3smmBrRbtU2SVGdND6v7bkC15iFwiUnhy+msB/m3C9 6uy84ky5YtTTlDI13rgnYz7XbqoMXougOd38vtCxF0Av6rGLn7n380MWlHnhgax6TWhL IaW0hJkJyU6+2cV6A13DDVZjQv7+6x/ZUQhhWbW7NJYkIS1PhqiXkDJZG4X4/JovSkFM MEL1hSVuDX2iO3ilaXMvPeGfmysbLaJq5wxIx3e1ldQFdcho14EpiYK+0BoOwQXSb8Yj 6ZHHMLTzF+Hvk5tUMsH/XOMRVDA7Aljha1Jjy9qQUygZV+QGRma/yH8nn0TYE3Zs/PIO lcnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709847874; x=1710452674; 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=FNHEYmkbDz44hYs4zD+M5ZgpK+WL/ZuC9mDgGa4D+bI=; b=s1tQHIiDKOWQa5AoQRgeLXmtfpENxsAOGUCWutFwMHCzFiyWuULzuGRTFl5zMg5rkF m3gaQl8Re9ZdML0hTCsdvlf6rgd8Kwu+5eZgOloIv7XHefPiVdGX080yB+SMGIJpbZWi FgUc+dseaJZxFaQbIYC+c06wa5XvuePzSr06OG8RAavdkk15xQkQTFAAlhoGNSJ/174n YAQpT282csNAUVP1QIROSOsRwBuFa2YqLig15h+Dvi+jYcn/06Yxj2k1r8pfknbsxVnq 3S9ZCckiIigVNBoXNFfsS+k8jU/UatiDF/JvrnZlh5syuUb2T6iTNWZrc81D1KhcBVZE Regg== X-Forwarded-Encrypted: i=1; AJvYcCXq6aQ0aYr45SxIAcEWulCQRnnQqqo4GRBQc/lWvkot5+Xr3PnOKRCROe79b1g5P9DGUJ5CzZKqNChCfxkE0gs996ZV2UfNqsEq1ZnO X-Gm-Message-State: AOJu0YwyMWDeOMy/03sc9i+NCbf2r6XNzjnOwLOZv70wYIvDAh6VGYaM m8lWgtjM4yy2pIWIOfjC2ibr8KLe6qejTRPQN6YMU8Q0sPwUnuUYomI+RzsMLqWGwmEvtOMVdPh GerWDxlN//g== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:69c0:c447:593d:278c]) (user=ipylypiv job=sendgmr) by 2002:a25:f307:0:b0:dc7:4af0:8c6c with SMTP id c7-20020a25f307000000b00dc74af08c6cmr784505ybs.6.1709847874683; Thu, 07 Mar 2024 13:44:34 -0800 (PST) Date: Thu, 7 Mar 2024 13:44:16 -0800 In-Reply-To: <20240307214418.3812290-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: <20240307214418.3812290-1-ipylypiv@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240307214418.3812290-6-ipylypiv@google.com> Subject: [PATCH v8 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. Omitted hisi_sas_v1_hw.c because v1 HW doesn't support SATA. Reviewed-by: John Garry Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Reviewed-by: Hannes Reinecke 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