From patchwork Wed Mar 6 01:22:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Pylypiv X-Patchwork-Id: 1908513 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=mroJrfGy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-ide+bounces-743-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TqF8D0wlFz1yX4 for ; Wed, 6 Mar 2024 12:24:12 +1100 (AEDT) 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 D51361F23D9E for ; Wed, 6 Mar 2024 01:24:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CD6D19470; Wed, 6 Mar 2024 01:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mroJrfGy" X-Original-To: linux-ide@vger.kernel.org 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 AB367179B2 for ; Wed, 6 Mar 2024 01:22:39 +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=1709688161; cv=none; b=Fj2p5vHty+0MoQiHlkP3XpFo5QXjEJ3IgztJC0o5OKjbPe06azKlbZvwCTBXBzOKfpQzQtP50ffRYDdtvd25/mlYEQNLTB2GR4KsVqrq3KBq7Z1X5eYUg/5C1Pc2q7ZFUs7zTXv+b49lEVtxvAfYE9Afkk3xgv6NPAPBcgxNgeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709688161; c=relaxed/simple; bh=wcg4s+VBRSyuqCYnMen4yuigKnSiE8NtEjtig8qUC2o=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CoYwTGIpOWwD6E7Q35BlVFboPUjzqjbioLkcRPRsHxkHWNjQmKlQ5Nn9A6bRE4UPDuV3GdGEpddA/3v8fZSzclQKNxlNra8ex6gbNNvz4FJ1JQpoOumGQckyBonfLNW1nHsNkNLuudaG3Qk2/Xn+pqaEV54bGLy8+VF4OnWVUlQ= 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=mroJrfGy; 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-dcbee93a3e1so10794181276.3 for ; Tue, 05 Mar 2024 17:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709688158; x=1710292958; 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=xvuQ4kezab1KlrTxoR3eIfXTgSjXQ9ZPEoqhGuVUIVQ=; b=mroJrfGyyEw0InFhfjPw6H4li267zjABJNkx4asSKDHCLlYGmazQQMdXZ42j4fnS+e +JOtE6KxovlBawr+yzBahaDx5mzghMSexEyPiJMR8LrzDK1tHuPwJPFnOeQYrhSW9HDW 3hsqucdPShK+iNw+YxMgbd8+txfQ3BcxIRP4/jxBBIi//noGuUqgoqhBG1K5y05MXm96 LPu32UoVScy08MR1c6arGd6thA78Fo1lPGi6Lq47Q4459P9Mx9/Yzr0ZISaCtq0GmN0h /OjtJFgBElSoLz1OkKVlGpyLfwkyytgk2+CTRn0qlFpoY44CKTzhgCzZUp3qbIRopK9O 0jgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709688158; x=1710292958; 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=xvuQ4kezab1KlrTxoR3eIfXTgSjXQ9ZPEoqhGuVUIVQ=; b=kQcTYfs1PYZp1rnNE+zfdP8G5dw2dzeGws3WeO9EALHwTXBNjW8wVkXbVP098qA1VA +7mAJ7NQY5DZY1iiHJlIukLaOnesWlbl4Qv43o4QT9+U8oYvVlPT0eP7GoDtkB1aE/fE EorHFl9gF0DJkAPRVF8ds8kIsPWvgiTWS94UMxtK5zgzgttsZ4dzUhmaPT18HxVk61rv ZdoVF4R3qk7iqqx0MeZW6ab11+2IQ8s+Pcw1tydJM+K5NPKBBf0v3EoLL2MuJyZmMKXy aB5UWL4ICSeOiRiYlJL8BtBAfOFe2rk7BgDjHYq0+ZIXcDgQ0zGayNDINzNK/rspMbfn tHRQ== X-Forwarded-Encrypted: i=1; AJvYcCXvVvl27jsR23Whvo2pGsff9r6K+SYh4aE2cd+6yCMIWFJw5+SmBMEeWnzDN2Chr53fbc4hp5R9nQHmizRNPPypCytdAVNiRBU1 X-Gm-Message-State: AOJu0Yz/K59QiK5E6Neud95ul4PxBEd2TmKUwcM+u3GVLZ6vfJWVcOey 0YlFKmw9fGftoPF6rwksOfE90f0Hr1u0Ruj8oAnbPETENOqohiqPwW6eMK5U6tFyxyPBleJY6h2 OcBF5qQC+CQ== X-Google-Smtp-Source: AGHT+IHtVVDAQr0HlC7Y5wW7LyESC5hemfsg9S9HuZaVvIMxC3e30XENP7rU5kXxBG6Pcf0SSGSVZruuEt/ECw== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:69ff:df2c:aa81:7b74]) (user=ipylypiv job=sendgmr) by 2002:a25:c585:0:b0:dc2:2ace:860 with SMTP id v127-20020a25c585000000b00dc22ace0860mr493435ybe.2.1709688158684; Tue, 05 Mar 2024 17:22:38 -0800 (PST) Date: Tue, 5 Mar 2024 17:22:23 -0800 In-Reply-To: <20240306012226.3398927-1-ipylypiv@google.com> Precedence: bulk X-Mailing-List: linux-ide@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-5-ipylypiv@google.com> Subject: [PATCH v7 4/7] scsi: mvsas: 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 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/mvsas/mv_init.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index 43ebb331e216..f1090bb5f2c9 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -26,6 +26,7 @@ static const struct mvs_chip_info mvs_chips[] = { }; static const struct attribute_group *mvst_host_groups[]; +static const struct attribute_group *mvst_sdev_groups[]; #define SOC_SAS_NUM 2 @@ -53,6 +54,7 @@ static const struct scsi_host_template mvs_sht = { .compat_ioctl = sas_ioctl, #endif .shost_groups = mvst_host_groups, + .sdev_groups = mvst_sdev_groups, .track_queue_depth = 1, }; @@ -779,6 +781,11 @@ static struct attribute *mvst_host_attrs[] = { ATTRIBUTE_GROUPS(mvst_host); +static const struct attribute_group *mvst_sdev_groups[] = { + &sas_ata_sdev_attr_group, + NULL +}; + module_init(mvs_init); module_exit(mvs_exit);