From patchwork Mon Jun 5 10:52:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1790363 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=eQJ9BG/n; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4QZVnS4rxZz20Ty for ; Mon, 5 Jun 2023 20:53:00 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230212AbjFEKw5 (ORCPT ); Mon, 5 Jun 2023 06:52:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230502AbjFEKwu (ORCPT ); Mon, 5 Jun 2023 06:52:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A11B9F2; Mon, 5 Jun 2023 03:52:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 27AEC621F3; Mon, 5 Jun 2023 10:52:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9711C433D2; Mon, 5 Jun 2023 10:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685962366; bh=hhEiZotnE5l37OijnHBGngZ7eDqjAom5G7ToCUPfij8=; h=From:To:Cc:Subject:Date:From; b=eQJ9BG/n7b8rgsYZ2VHrruVahoOclFlyRIeACqI+QJFC6c7k23+3Uhrx8bVDzbegp kW6cRgKDjrbGja047esVC12p4R/9db17BNzO3bkKolNnvv9gWmNiJaRbb6aVHeBfmR qXCncJXMFCewVnJIAkDKqYakaZN4bVCw59B3yMwTdy++5A6Ur8EuHsenQn8vEyzvA6 M7zCYaK1aQfXLjZcaF9CtnySzsgMgXAvBoFf8av3G6V+Mb9oO1P+UIoqtHifI5DmH0 XICbPH3U6ULffmhR4v+/FIJePttCn87Eo4/1U2MLF50v0PXxN+oHX7jY3gz1KZq4ld Vg1xyFS1A+MWw== From: Damien Le Moal To: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, "Martin K . Petersen" Cc: John Garry , Jason Yan Subject: [PATCH v2 0/3] Cleanups and improvements Date: Mon, 5 Jun 2023 19:52:41 +0900 Message-Id: <20230605105244.1045490-1-dlemoal@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-ide@vger.kernel.org Improve ata_change_queue_depth() to have its behavior with libsas managed devices consistent with libata managed devices. Also add a couple of simple cleanups to use defined helper functions instead of open coding device flags checks. Changes from v1: - Improved comments in the code changes introduced in patch 1 - Fixed typos in the commit message of patch 2 and 3 - Added Review tags from Hannes and John Damien Le Moal (3): ata: libata-sata: Improve ata_change_queue_depth() ata: libata-eh: Use ata_ncq_enabled() in ata_eh_speed_down() ata: libata-scsi: Use ata_ncq_supported in ata_scsi_dev_config() drivers/ata/libata-eh.c | 4 +--- drivers/ata/libata-sata.c | 31 +++++++++++++++++++++---------- drivers/ata/libata-scsi.c | 2 +- 3 files changed, 23 insertions(+), 14 deletions(-)