Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp36034rwb; Mon, 26 Sep 2022 14:19:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nbjwUGqZaWKy2xvZntiVNwFEfCDMGgNZi6vUo//lo1l9w5hkp3MH/s4d2sl7Lqgr7bqrW X-Received: by 2002:a17:907:5c5:b0:77d:ea1:44c with SMTP id wg5-20020a17090705c500b0077d0ea1044cmr20050866ejb.305.1664227196211; Mon, 26 Sep 2022 14:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664227196; cv=none; d=google.com; s=arc-20160816; b=VH9QnYhAeyRe44lyJ00IieoLAy9ASuJdTHSWBjzW/sOnva1zOq4PdZAtUcqLtSvgPV fiDBV3jlsfhMYpXgSTBxxsrWnmrpLpLLCOqTz4r/YyJiESQ+Pr6CHD7aOqXDQkN/F9fQ puUYbKlsqi/CktgcStIH46cEHjhmYA3iq5qBuOgwvQG+LG3VkSLdQ0TCvLEjEzootRoG STqUgXZOJ1FNEojGPJgah8Slz7tCi1vBuv+QLDYkf+abEqI784FXee7XoHdphQG5Tj/o 8328ZQHtso100RcKw0R8KwxjakiE8NjMZ4MnEN70nofdyeQoxfA5jG8lj1ym6Za1ZH2u QKyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ur6K4qGYyyUD3MGK3ebflO/+m8oSgfIGGKRP9gALOrU=; b=sRlyAlbsTJ+2nCjhWTzpl9FPj1Mtuupfm8gjse7IbsJub3Nsv279H76jqR1/sciNoy OdCORkeax5Qe3tJRuMSv0uR8R7D/KoTWokMwBXaHyOMRkMXUcWCMkNoD94V52g1L1tdX boLhv7oZQQy6wWQRIKnhsc7xrkXyxDairUFzLss5mztWnp/P3pdHIToHQYBnqzjmZphx 9MzppFei/X60CNAJyQLGtrtx+Mzgv3lXpmVxiwQLSorGFsdkxUb/wV1xKeqraTTAOrVI WLWphCnidg4xsZXEVCiv2CBuEYww6vJVirEOM2MwC0MAJpjO5N/7EV0up4egjkT7Ff3h mxQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f22-20020a170906561600b0077fadd74307si903596ejq.128.2022.09.26.14.19.30; Mon, 26 Sep 2022 14:19:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230387AbiIZURE (ORCPT + 99 others); Mon, 26 Sep 2022 16:17:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbiIZURD (ORCPT ); Mon, 26 Sep 2022 16:17:03 -0400 X-Greylist: delayed 1507 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 26 Sep 2022 13:17:00 PDT Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BC9DA285B; Mon, 26 Sep 2022 13:17:00 -0700 (PDT) Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ocu8r-0001Yg-4N; Mon, 26 Sep 2022 21:51:49 +0200 From: "Maciej S. Szmigiero" To: Damien Le Moal Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ata: allow toggling fua parameter at runtime Date: Mon, 26 Sep 2022 21:51:42 +0200 Message-Id: X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Maciej S. Szmigiero" Currently, the libata.fua parameter isn't runtime-writable, so a system restart is required in order to toggle it. This unnecessarily complicates testing how drives behave with FUA on and off. Let's make this parameter R/W instead, like many others in the kernel. Example usage: Disable the parameter: echo 0 >/sys/module/libata/parameters/fua Revalidate disk cache settings: F=/sys/class/scsi_disk/0\:0\:0\:0/cache_type; echo `cat $F` >$F Signed-off-by: Maciej S. Szmigiero --- drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 75b86913db1ac..b322006c85806 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -128,7 +128,7 @@ module_param(atapi_passthru16, int, 0444); MODULE_PARM_DESC(atapi_passthru16, "Enable ATA_16 passthru for ATAPI devices (0=off, 1=on [default])"); int libata_fua = 0; -module_param_named(fua, libata_fua, int, 0444); +module_param_named(fua, libata_fua, int, 0644); MODULE_PARM_DESC(fua, "FUA support (0=off [default], 1=on)"); static int ata_ignore_hpa;