Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp753890lqs; Tue, 5 Mar 2024 15:58:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWfT4EVCXWvyRwc1paBvkOTSWAKHDv+PD/eRz4otI8prLveNicsFCs/N0QUERs7nvLYMgueaK6DvHreD+62pOuZFPI9zwwWc5spwaN8AQ== X-Google-Smtp-Source: AGHT+IGh4yDyvcbt9nDzhCF6ltjhz9orqAksa8nILplvMHuw6R5CWuKU5undowuOGR6aBaXFH/JS X-Received: by 2002:a17:906:1385:b0:a44:f9a9:a016 with SMTP id f5-20020a170906138500b00a44f9a9a016mr6519772ejc.45.1709683121177; Tue, 05 Mar 2024 15:58:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709683121; cv=pass; d=google.com; s=arc-20160816; b=S9J50dy19GvPWrzp3vWhYFZM0wXIeXEgC4Hp7Vl0Lpc04EBcesM7O5xrjsLt4PfR9e xQIj+cBzE6Sc1LbgFUVl4AZ5iqIzpse3ssmIDCHkBY0EgVwj2ntv+Fb8xXxc6qSDOOj8 f6YWN+RG74qiAcXupzDnHhqgfk6f8uQ1BI1KHq2bdl8yDVeKQrcAYW+xuthha1uEevll ZquWcFyTL2T4m/ZjeZY4DZVSnMLFC4X/WlY0ALJXqENSyhWZlAqG3nFGmG2V30N2YpJb 8zOYWJbPbRrGI7wkUvNfX/HzzgPAfx8gTVR06mM3EOT40yMi5bK8I4a/VNhzZ8eInFpC rOKg== 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=vaoaHDy7a7OkGzMHEan2gyrn0Ck8RYkLN+1+72FVuoU=; fh=o+G4RxFaJeb+c55MRXj6dXlTod/hMg8lTbRJHcbBHII=; b=NcsGl3u4lX7j+Mk2EutFZL69S0b2ZeAOu+vvAI5cPoaes1cqaNEH+iTPXMRN8W30OR uNcDwIwVUK0IhKKAQ2LRmRYKJKb+ulqin85BXfATcsgqfdr/LgZsnmel6wPCFaWFyDDV M3hVu+BBkkLe/QegRmiezmvozlTT9QnCquNRHjuhsLdN/hFjK2wTROCXYlyVaiLfM+sJ 0QrnD3UXuLP3DKVyXpXZIzlm4WYm3wqs8lU1VDVlRfxRxttJzfWNJzGjxCU4J5DXDhHe x8N1pTfWd2z/eZRO6dZyOZBUa0UTfPWptuFaUL1/MWsZQkumiCoeyZit3gcV+85pKugz wWgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="vbfEIaU/"; 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-93123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k9-20020a1709065fc900b00a445538edecsi5081901ejv.921.2024.03.05.15.58.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 15:58:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="vbfEIaU/"; 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-93123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93123-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BC8D11F24AF8 for ; Tue, 5 Mar 2024 23:58:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C08B212E1CE; Tue, 5 Mar 2024 23:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vbfEIaU/" 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 3B93C12DDA5 for ; Tue, 5 Mar 2024 23:58:30 +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=1709683111; cv=none; b=EMWrZyZYlA0fw/d59EC+F+D3X+EbX8eS0zP4snDP1bGUf+nIM9I5Phmd+2POSnYGxtjv6+l+kBY2K1mkmnzhdCSWVrrcs7K8ALHOd+7y4dwyprYhSesXeFzUEU6dLGLDxOEpbmZSyjh1SSWhOU/kDfyFWbyh0VLIUF3im1BJ0Ws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709683111; c=relaxed/simple; bh=HNBr2lVWfOniLa07F4xju15S6im6pmjpzbjfSiuiLxM=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=dRfon9/nAphcJgbXWsPfik0I3/oHYsszVs4mjRj+Pm285byZzBjQHCd8whcTd9PG8jsr8y8AIt061AmepIldRM/GTtl6c4ZaJEWluOHIPYlV9ehFaAToF/uMah+S1xOymC99PnoVAdMI0D4aHJosWibY4SgVI1fDglswhuisMhg= 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=vbfEIaU/; 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-dc3645a6790so2320967276.0 for ; Tue, 05 Mar 2024 15:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709683109; x=1710287909; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=vaoaHDy7a7OkGzMHEan2gyrn0Ck8RYkLN+1+72FVuoU=; b=vbfEIaU/GQVAHdBKN6UNsstKLgAolKfhI1NvRbgMEtcj7OFZsWtkihd+Jl4LnN4gUV rqhRB983jTvb1NF5yoFQwPjDsduIQmK1DS7qSVcudTwHhM/RM7FYFf4guiR5KnUD/23N shw7xQ8ilmUYdshaZCNJllwF5iTkZ3FKohWFjmqkNxPS+fdFkHZwkEs4EwMs39QSd/tp Q+dWbaZz/bnt6aJO4eEpEOt9LTY/m7P7ns+hfMoKO5PURXq7mVPQ9zCP/Olv93b1A+IX 52WwZ6tv5XNqo5UegW5kWLqWHMy+f8oKeaOe6cRQO7oDwKUqGvZjsUJE/yn32T7y+L7S A+Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709683109; x=1710287909; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vaoaHDy7a7OkGzMHEan2gyrn0Ck8RYkLN+1+72FVuoU=; b=VPxSDGsEp/o8DR/dxql+zkar2rhzLZlegx9USI2vwWB4bHvw2I4kNpcGjTo515uSr1 shBAAUeb2wf2sYbsIVYuaHe/d+dfUrW+Qc9zaZbkACybb7pbj/7GuTMb2UshIYhbFECr ITBP6CIoyx861IWyrdw5PsziDOZC7Ixk9Nbj9fJH+EZzDeJ0IFmFBtc3pSxMJhm1OzAD UGE2rA+HVILX3Z/SDS5hLB5G59fAMqppaP4yk7N2VaGGKYxSIGb/wk96Lh2F+DiNg8r9 Iyhash5/VfuUY/d1SwOuyPFxjziQgdyX25ghiX3zXIzskaZ2iyxdtoONbS+lguZWA7ik IaQg== X-Forwarded-Encrypted: i=1; AJvYcCU961UC05uBu5BGSHaVXWUCxVXdiDWE/thty4j2QNUbebLifTt6ZERULw6bEbs/O8rDpz6JtI94tQ5RJw0AhT5GnTkCtcvygx6snI8l X-Gm-Message-State: AOJu0Yxape1yLCgMfmjEQmxKFz1Eqps4EPD17hEts4uztx3U0d02zblk pCx+2ehGUVdCLBXLC/z3P9r4Nzgk0AWsmwZiu4ouQQJUubBZDQlqLonZtXXgxN+OgIQLZrORsYM 4n21Yuisznw== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:69ff:df2c:aa81:7b74]) (user=ipylypiv job=sendgmr) by 2002:a05:6902:120a:b0:dc6:dfd9:d431 with SMTP id s10-20020a056902120a00b00dc6dfd9d431mr3677876ybu.1.1709683109302; Tue, 05 Mar 2024 15:58:29 -0800 (PST) Date: Tue, 5 Mar 2024 15:58:15 -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: <20240305235823.3308225-1-ipylypiv@google.com> Subject: [PATCH v6 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 v5: - Added __maybe_unused attribute to sas_ata_sdev_attr_group to prevent an unused-const-variable warning when CONFIG_SCSI_SAS_ATA is not set. 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