Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp35666lqs; Mon, 4 Mar 2024 14:08:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXpXwxxD3A+2DwQygdW9FWe1XIIsVOqdyUPkQfEKx3nFnXYS+HppFfqFA043naHQMueTlzNHtbP88UrPREgpICHX/yT2ReL632uLUpWeg== X-Google-Smtp-Source: AGHT+IFY+5WVelR1YoRLeTggauP1ap/Ob7CWgAFwopxxOUW/P6CzTOJYSTrirg4uuATd7LQohCQd X-Received: by 2002:a05:6808:14c7:b0:3c1:db65:659e with SMTP id f7-20020a05680814c700b003c1db65659emr60306oiw.11.1709590118625; Mon, 04 Mar 2024 14:08:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709590118; cv=pass; d=google.com; s=arc-20160816; b=lvQnRnD4jbrKkOOcHVo9mbscvZxs9j8y3yQMDHGpvOW1Boeb6c8Yats6Zm7X9mnz2L YF23sqOsQLclPvNRtRQH46ym7xR6v8SvvNAraqEQZ8Vye/Lv6PpceIEgi+RC+oLiRwOn Wmua4T00dJoqiyyftiqgay3Dx8gpCJhlGMUnUmOgeioxzbpfGH5xvXXv8UaZ0QYh6Wgn hbovnUuEOgxo+w/s5x64zWuZbM65gC2jKHVWowC73MIC+oLpT6X/7MmSlGddpuIQ+8yS BO0xCLJrUqMtSITyzEiwaI4iIY/a2Luj/hRHFFf+Bd8JUvPetgImiEgWUxWed7JqFI7A tfvg== 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=iiyGGgw6bcoBER0ifxC4m6qALOEoGZjmpZBnddiCFAg=; fh=hRtfmDNKgEy/lcjQEZQEWvL+MLKiYyLO4eInTAyEKyM=; b=An+nCArg+6BO95KMPM6pliiApp9X3JFlsC9Z2Nw2narlFQrDz929xFPs9pRNsdCtot 33tRV0vQklPH29bJQCHUi8bA3TNXRE51pNug/+z+bTeT/s3MjdQACLosu2tRrySyKNTB suQXYsdpFVOwuTw30ZIEwGx1ckWV6woIdnx/6J4pDhAI3xkxBgmLu9jnQIYSprlSwt1e 6thNIsmmG1XYHLL4pR/jgP8cpYL+I18WQ5c1LkA19BcDDkEg9tgSdMh2wdqEK1Uiq8yP hCT2258dyUtLEK2RykNQQqX7u9D9c6DSNNlzivGxIOJVCEjH1jjr0lf7Iy/74nO6m/Cw WDnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=gK69VB13; 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-91337-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91337-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 r12-20020ac85c8c000000b0042ee05e2a2fsi5632922qta.480.2024.03.04.14.08.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 14:08:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91337-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=gK69VB13; 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-91337-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91337-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 4925B1C21E41 for ; Mon, 4 Mar 2024 22:08:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC6C37BAEE; Mon, 4 Mar 2024 22:08:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gK69VB13" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.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 6315078B5E for ; Mon, 4 Mar 2024 22:08:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709590105; cv=none; b=XQcXI3sHnM05Oe/MRCcbJhe+/3zeYNWrQwlZgqifHOjewftVKLV78B5/MV8rv0zQlW8Zk2r+5gUA02bQmzKWNA1SNy/ydOezqx0nUunq1fHS1/FzH8H+4TKx+XXejfueZqiIs1G88LQ/ErbJmawnQsA9i3Y1cuca7AuJtMQUq+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709590105; c=relaxed/simple; bh=KIrzPff8X5XmBjckpJFSRt5Ce/eTKlP0CC/qHYRxzi0=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=cvW0ZJbwf6M8LRLYluAYiXMVMpp5Pm0bUGcpx3lL3r/RA7Z/A1/OSf4Jue5/DsyPDcuTI+IwU0RnlBaRhghco2Pq2rYndqvzpOUsiP0wmCJnRwAVqGwsnr5rTPl+CDC4w+ugJzvP7xwiFg6knbeLvetJcpGTbGLbEKJWIUwgPco= 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=gK69VB13; arc=none smtp.client-ip=209.85.128.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-yw1-f201.google.com with SMTP id 00721157ae682-60987370f06so38149897b3.1 for ; Mon, 04 Mar 2024 14:08:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709590103; x=1710194903; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=iiyGGgw6bcoBER0ifxC4m6qALOEoGZjmpZBnddiCFAg=; b=gK69VB13A5WQRg3IyuSkO5W2U06HQ/NfhISbOS2R3sfkLrA0LnjxrHtUS0YNItIZJD 4WSt3SlFr5Iu35Z+m0hWwTXJaVPGW/4+r6aYK+l8K1f8YXTm0kTytz9IpoR64AY600if DvknDbOuRz5IFOT/G9TH90+L6/zdRfVEVnqT9iNrDN8nl2ByeQ1/m2UIN7jQ3+BvSxEw khZqZRm5peD9ouZmY0d/prurBHz4Ab/h5MmiUWK2KI5Mu/igvyKR/83toUtUSFANE+U3 Z4wLkpbLcG0hjh9yRBt4w1kJ6K8iX3VjMoq1ZUzu74RB0RFAiCnljPzcG4XAF0V29Pvd OeKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709590103; x=1710194903; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iiyGGgw6bcoBER0ifxC4m6qALOEoGZjmpZBnddiCFAg=; b=Wdwjg6bDXVzzazL9/OI1LxqZ9obqobRKQxvF+QCW/6vYk8/q/qcc+pQ3Q6Y/pkDZTI E0v5ReC5NReWN9nSWJaJdSeQFI1LXTvdjfsrYJyt9cKqBeaUiOS/MEzWo3JNsnC33TkW ysWerP9LvwN3LnsjPrrTXMGLpcEMsBPa2T9E9E7GS46t9e+4epkMl8gd3TtQYTowgekf bQNOhYkAiKQQ0hnG84ReCEmTTJVdxKh+PVZQ/4fCITqwKwc+hWvrK+ZwUAzdTdyHfKDq Dg5a3loXrEna9v6ycvtUJ8jTr730ooD1le1ge5qQfNhkAR9XTiYL1xq8icg9JY5ChevI cfkg== X-Forwarded-Encrypted: i=1; AJvYcCXgX/npuiJicu+T0mvxi/i8HEkKw2SXVU9uPIr3zbT5f+2nZef9baJTgwYhL9NiegcrqZK30zk9GaW4t5Gq6rPWvR5IZuR5iTlKyxSK X-Gm-Message-State: AOJu0YyZuWB6gdleU5+VHzV6FrtCbwchOSqNcVk71LlKUcjsQprBOftB Uo1VmEA6db80d+DnxtO6dVvb8J9tZ2mwG/8PgRFaCRoRNpc8jGmouzs9bUttb6X1H9wUoeqc8xT iDMCUycHfuw== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:e901:e760:20cd:d870]) (user=ipylypiv job=sendgmr) by 2002:a05:6902:70d:b0:dc6:c94e:fb85 with SMTP id k13-20020a056902070d00b00dc6c94efb85mr357414ybt.2.1709590103406; Mon, 04 Mar 2024 14:08:23 -0800 (PST) Date: Mon, 4 Mar 2024 14:08:08 -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: <20240304220815.1766285-1-ipylypiv@google.com> Subject: [PATCH v4 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 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