Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp100211lqs; Mon, 4 Mar 2024 16:52:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVz5H9e/qCVB65FDrH5UznOXONxwfjRqtliADRBpqPIYQhVeFA0gdTyxuCMWbpxqxeWzHlMPzHfiXTXVwDHf3tKKCHUO0sMHrBMQMSE1g== X-Google-Smtp-Source: AGHT+IFmandiUAjcvI0hq3QafTO9+7PjjWnczjKGTVpE0oTpDBMlRgPdxwOyDx+BT4RqiHsWeEnZ X-Received: by 2002:a17:902:d3c6:b0:1dc:7101:58c0 with SMTP id w6-20020a170902d3c600b001dc710158c0mr527785plb.22.1709599965260; Mon, 04 Mar 2024 16:52:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709599965; cv=pass; d=google.com; s=arc-20160816; b=AD1DUpT+Mm9d8Z9DJ2Gufz3MwNUOJdNCrLQ12iffKWZ4WWc3oRX9gKtKOZDzqmWhnB 2PJKXYWnoYAeUAKPbGEHt91y88gQzzjShkbVwIoKwYn3fCuXNhALqc9El4vY0hbf6Mi9 nBDV5YTrUcpz3KMXb4+j2mNEpYHevgkJLPS63TwEmtuqpptK5BHRrZ6gSyfehfw9WRay Q9LKxo98qLXgNUimwtXd6y0OltfI0n0Em68T/R3CsRzW6rgo8LfoKFjGSyWYFVgrdrR7 GB/wB3Ohv1AhK93bS/RMniw47W+vFIL1hmZ/4Hv8biu4oKDuXWX1wqbGqXxR/Ndc0a/2 T9kA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=0Dz6bIFDjYrjt2FfKLKRbryH1lom4wKlrzD0Ykh/AME=; fh=qnTrwbi927AjF9gwhiRuskvOfgQGCi2dWGEAH9hy70E=; b=K2OeWJVWFSN48RUh6pa+aSuczaDrqa54+y0Z8RT0Iem2OaoazDLOBli0ECjzCZ+dBN f0f+7OnoRPZK3N2GJQP5hrJaMQ1puibfXbknsKToZKEXN+LXm5q7QPx9p+oBTgmN7Z6X N24AB0LN9O90RFD9cySnknM5RdW2k+YBS9Rr/EQWfUbbQnp1G7UxpBlXH8AjW6paVBSf g5rE670a6N8WD5teFwO+1MSkVeqhY+ZvGihe0+VgI7Mqq4kNGSV7xF98epA9lJ7nGad/ Y0P1d2CAly4BgeIW8NFGDCjUjdQzbiSpBZ+0xqgvOFKlzY2yVYdw5lIrn5ZwFnrzjlZi NRbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=H5TsZbXv; 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-91470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91470-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 x9-20020a1709029a4900b001dc3789a2bfsi8970393plv.495.2024.03.04.16.52.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 16:52:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91470-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=H5TsZbXv; 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-91470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91470-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 AA316B238CE for ; Tue, 5 Mar 2024 00:51:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F28C38F49; Tue, 5 Mar 2024 00:51:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="H5TsZbXv" 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 3BEF13201 for ; Tue, 5 Mar 2024 00:51:08 +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=1709599871; cv=none; b=j4GYtZZA8Mw48nLYvKPDA94/xiIQcE1OaI5JKa3+kmxIffTeOcjWVIUVV9qF+uAVffaJhAHeM6gSG9XHB2ebzvtYvIMq8Gupgv5zMrUCUO3wu/SnzyIm2cVpl+T+QzR57jrjDzjhjGLjrkycaxdsan9BUzLXh84lUScQjwk6t1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709599871; c=relaxed/simple; bh=c7VvByvOC7tfDYPpD5rikxgiV2vj9KaVUYvTVAm6iTU=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=Txfj+q4ggc0OcUN7OWuN2iNAyEyXpuNJXgrA3GZfYZyYq8+Tnfib4xkVd8bWfUEcuPyXF++LKpMjDvXS7Lh+KTHy+vqNj+8V7eASG5bDsjxcn2JTJKyqHBxvmRc38YjErjqiKF3ItEz8J4cpKFjAFuQnhAZCHBm1u7KOmMtlqQY= 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=H5TsZbXv; 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-dcc05887ee9so6966447276.1 for ; Mon, 04 Mar 2024 16:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709599867; x=1710204667; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=0Dz6bIFDjYrjt2FfKLKRbryH1lom4wKlrzD0Ykh/AME=; b=H5TsZbXv0KkBVntIUtSVPeocuAtmU7JDUDPD4U+VDrTNRo5bhZ77cGIx2gUWdvIUuB IKvnyQxcSEbZEtcsM+ghKfvCWp+5opTmAmvrIA167rkqZkCx3U03Cgrv2nxEOfOIDZ2t D388+ZE5X6+SPRx3HqpYFm9b4SxMxXGMRX9ZbPZnGRDRI8V84/82udRKdI02JGUK+/o7 WRrrqRpvz4oGjctMZtE4dR1dMeqEY7GB19MtlYdvb9frm6U1kyEUVc1N1MbwYAucUz7L FLwJ/3Yo2xY8BuDPg/MM52UsCUAACeSPWxUQh0ZKwsH8H571rKkTTU8NUifD6kvPI/9s 8arQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709599867; x=1710204667; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0Dz6bIFDjYrjt2FfKLKRbryH1lom4wKlrzD0Ykh/AME=; b=FBiB35bqwfsY752gsZhkXHnDDPC2lhh0IH8TQeICeQf7uVvlMhIPY/E3hL3UYdQVZB +wiUT6+PrEb6nKzWPW0Z48AHk3b86tt4aBRAlefGqaXoKzKE8D98luaN5bXlmnVP+wWC s0CX02myxB9qWoExCB/SvBIoIFPVMx2yWTYO56zCUlb6/0aPyEzLqInQnYqnf6MWgpEq 6fxR3I4/GHHjv1D1h9dOL9drDNtjKQCh9t+HqZS4mI39Wc4ZGZhL25pzi5KDlCCt44oj CbGVaoMJfrFiyy9Lfak3362/oK33U2zjJ6IkIG6DFY5Q/hwovvlpO0NgKActj3lU6y+U WKvA== X-Forwarded-Encrypted: i=1; AJvYcCUn08sAdm3VGUhoHMaeynYdsv2aKmwzgUcN71e4ZILkR7hS9tM3jkDsS812AgNid0U4gQaCrhPaWXksyeJGHgWGisP430mMFiWH94dt X-Gm-Message-State: AOJu0YzCGesZVQu+fZiIU1ds5s3hcAjPd/7KK91wJvsiIhPKfi+0hyHV D/MBZs0ZU8AIwNW7lgrMJJRHdSTyqrlhq8ECl5sMGjV57i9JoKXGni0ugQlMgnfK6UHSMdRnxGi VKuTA/Z23YA== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:e901:e760:20cd:d870]) (user=ipylypiv job=sendgmr) by 2002:a05:6902:1009:b0:dbe:387d:a8ef with SMTP id w9-20020a056902100900b00dbe387da8efmr363828ybt.1.1709599867293; Mon, 04 Mar 2024 16:51:07 -0800 (PST) Date: Mon, 4 Mar 2024 16:50:56 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240305005103.1849325-1-ipylypiv@google.com> Subject: [PATCH v5 0/7] NCQ Priority sysfs sttributes for libsas 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" This patch series adds sas_ncq_prio_supported and sas_ncq_prio_enable sysfs sttributes for libsas managed SATA devices. Existing libata sysfs attributes cannot be used directly because the ata_port location is different for libsas. Changes since v4: - Updated sas_ncq_prio_* sysfs functions to use WARN_ON_ONCE() instead of WARN_ON(). Changes since v3: - Changed ata_ncq_prio_supported() and ata_ncq_prio_enabled() to store the result into a boolean variable passed by address. - Removed the "usable with both libsas and libata" wording from ata_ncq_prio_* helper's function comments. - Removed the unlikely() in ata_ncq_prio_enable() because the function is not in a fastpath. - Dropped hisi_sas v1 HW driver changes because it doesn't support SATA. Changes since v2: - Added libsas SATA sysfs attributes to aic94xx and isci. Changes since v1: - Dropped the "sas_" prefix to align sysfs sttributes naming with AHCI. - Dropped ternary operators to make the code more readable. - Corrected the formatting %u -> %d in sysfs_emit(). - Changed kstrtol() to kstrtobool() in [ata|sas]_ncq_prio_enable_store(). - Changed comments to use the "/* */" style instead of "//". - Added libsas SATA sysfs attributes to mvsas and hisi_sas. - Dropped the 'Reviewed-by' tags because they were not sent in-reply to the patch emails. Igor Pylypiv (7): ata: libata-sata: Factor out NCQ Priority configuration helpers scsi: libsas: Define NCQ Priority sysfs attributes for SATA devices scsi: pm80xx: Add libsas SATA sysfs attributes group scsi: mvsas: Add libsas SATA sysfs attributes group scsi: hisi_sas: Add libsas SATA sysfs attributes group scsi: aic94xx: Add libsas SATA sysfs attributes group scsi: isci: Add libsas SATA sysfs attributes group drivers/ata/libata-sata.c | 140 ++++++++++++++++++------- drivers/scsi/aic94xx/aic94xx_init.c | 8 ++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 6 ++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 6 ++ drivers/scsi/isci/init.c | 6 ++ drivers/scsi/libsas/sas_ata.c | 94 +++++++++++++++++ drivers/scsi/mvsas/mv_init.c | 7 ++ drivers/scsi/pm8001/pm8001_ctl.c | 5 + drivers/scsi/pm8001/pm8001_init.c | 1 + drivers/scsi/pm8001/pm8001_sas.h | 1 + include/linux/libata.h | 6 ++ include/scsi/sas_ata.h | 6 ++ 12 files changed, 247 insertions(+), 39 deletions(-) -- 2.44.0.278.ge034bb2e1d-goog