From patchwork Sat May 1 12:40:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Sigurdsson X-Patchwork-Id: 12234767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-22.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A97AAC433B4 for ; Sat, 1 May 2021 12:43:57 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 587C261446 for ; Sat, 1 May 2021 12:43:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 587C261446 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=silentcreek.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=a5O2YqbMZijhCEuAeDTb5/r8VmLuQF1VUMZ/nmdp7Yo=; b=oszCoKf6rVKUrRi1H0V5EFDtrE 6qu66WdZkMsM8SpCPk/sAsS1kkGKAoTx8suba8HrUP6kbcnD/QcSVAMf2DTuU309kkrNpJxIAlnqt OeYcI2Y7rKvtug4+psr33fjcI4hXUi+Gfdi5q8llQa+fU4VxOu6Om8DBSvzb1dF1dpYPXpTBU6tVu L0fdxQYVrLGpZbEr58WIt1mB/z/PfhzVejR8iOnQU0s7fFTQIReHrjHxW9JFY6MsJ/FY4bOtzLXvZ rFD+ozn6CL8eEn1rakcE1EBF9Re8J8rCDH/ygK+loH52EtxRTq6eWWbLAc1imT/5nTOlfsVgeJIFV KDC6ZApA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcovv-00A3ob-TQ; Sat, 01 May 2021 12:41:20 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcovs-00A3oP-M0 for linux-arm-kernel@desiato.infradead.org; Sat, 01 May 2021 12:41:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=OHjbJOgZC9lH9A5epG61N9yp14naYRxyoht5m0VTHWI=; b=DRFuH41LjH70fATAE5l5OzCuoY KtAd/GU0vw7j2URZ94/u7fQK54HUoMi0e2DP61YodKXtZiMnAYbecoeC+2C324ylyKWNkDbl/UsYB b73FEuH5GCAbuaY1FeTkIlU7JGO8h2mUrz7sKk4UE0cUZmbCuVjKIsxcscyyAh3XRCDMnbWWNbvIg CGT0GaNXBJfL1nnDSs6GkTTJ/mNmEC2StPT88ip/idNYnLattXcsD8K210iGHJ9VT5Hkuh3bXO/P5 lSDDZwquo6sGw42NenHp5NQnR/C/NrNhE//r1ti/5ARXrUn/myNWi7BgW+pTLiZawMUv48/sJ7GJC rA+ZvNMA==; Received: from dd20004.kasserver.com ([85.13.150.92]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcovo-001zhv-NS for linux-arm-kernel@lists.infradead.org; Sat, 01 May 2021 12:41:14 +0000 Received: from timo-desktop.lan.xusig.net (i59F4D773.versanet.de [89.244.215.115]) by dd20004.kasserver.com (Postfix) with ESMTPSA id D30D5544DC00; Sat, 1 May 2021 14:40:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silentcreek.de; s=kas202012291009; t=1619872856; bh=OHjbJOgZC9lH9A5epG61N9yp14naYRxyoht5m0VTHWI=; h=From:To:Cc:Subject:Date:From; b=lIVpjwa8ThuKX8tZl5wayV9GigazbbnLffUUCuhtgTRFXrpUMvixVuHyRqy2XKXjj TSpZyjDwjFzExrJjHHTofcF5ndn91CxYWYr5wMhMoBpTmaR8en4aFjZC8AGWUP4m3l X8jSkpMneMEBXHtN5DTALbaDBY/k0LaWlm2NIMxPSRNGMXGspiyhl3VNR9v79D6frN pV7rMIod0G6X2HS6N9FmzjtiPp+A7AozvrvJY4bNZ1ab/zbrSJgrjfERgquS6bgqny LouM5+u5bP29CmTaWKCYxD0sOeCBvuUL0Gvd8ZYbwUVqYovfuNVqNs3no8BJT5UEg9 199OdQGW9aq7g== From: Timo Sigurdsson To: axboe@kernel.dk, mripard@kernel.org, wens@csie.org, jernej.skrabec@siol.net, linux-ide@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Cc: sergei.shtylyov@gmail.com, gregkh@linuxfoundation.org, oliver@schinagl.nl, Timo Sigurdsson Subject: [PATCH v2] ata: ahci_sunxi: Disable DIPM Date: Sat, 1 May 2021 14:40:26 +0200 Message-Id: <20210501124026.8016-1-public_timo.s@silentcreek.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210501_054112_950072_5801B62F X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DIPM is unsupported or broken on sunxi. Trying to enable the power management policy med_power_with_dipm on an Allwinner A20 SoC based board leads to immediate I/O errors and the attached SATA disk disappears from the /dev filesystem. A reset (power cycle) is required to make the SATA controller or disk work again. The A10 and A20 SoC data sheets and manuals don't mention DIPM at all [1], so it's fair to assume that it's simply not supported. But even if it was, it should be considered broken and best be disabled in the ahci_sunxi driver. [1] https://github.com/allwinner-zh/documents/tree/master/ Fixes: c5754b5220f0 ("ARM: sunxi: Add support for Allwinner SUNXi SoCs sata to ahci_platform") Cc: stable@vger.kernel.org Signed-off-by: Timo Sigurdsson Tested-by: Timo Sigurdsson --- Changes since v1: - Formal changes to the commit message as suggested by Greg Kroah-Hartman and Sergei Shtylyov (Fixes and Cc lines). No changes to the patch itself. --- drivers/ata/ahci_sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c index cb69b737cb49..56b695136977 100644 --- a/drivers/ata/ahci_sunxi.c +++ b/drivers/ata/ahci_sunxi.c @@ -200,7 +200,7 @@ static void ahci_sunxi_start_engine(struct ata_port *ap) } static const struct ata_port_info ahci_sunxi_port_info = { - .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ, + .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ | ATA_FLAG_NO_DIPM, .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_platform_ops,