From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6D1EC433FE for ; Mon, 17 Oct 2022 07:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1fEsapm2Zwv4+FnoK4a28jJfO+AR4X7tpf0OjJYR/5A=; b=YDsw/9874glAxx fjP7uupHWO3sxeYCAr16tY/1lsRaklNfEEyIGBk8H/ExGcOD6+/Z2T/k8zGHHrrIi5CgTajHsr1Fd JYDQdva2QigcFMa9Dvh7adALvhSeqnAUdH+7kOSQdUBx7UX7foQPQLrfpA1aveph45AHwkb+S62bW x+uY+MH+qNGZe4rnFQ1Qq7Aitte48HxEM6b4T728zC1mVHqmBr+FWuanIrGmdItsfxrKZoGloW6iN 9kV6c7sN9S6TByF05IP5Hla6FESdUJRlbJhXoNXagMQXAHIyu9m2DN3+8jOME1V67DK/CiOfOH9kj gSLHE/QBCUuLzYpV6ddA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okKn3-008YJm-Ex; Mon, 17 Oct 2022 07:44:01 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okKmi-008Xz6-3F for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 07:43:52 +0000 Received: by mail-pj1-x102c.google.com with SMTP id a6-20020a17090abe0600b0020d7c0c6650so13505436pjs.0 for ; Mon, 17 Oct 2022 00:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rPe4UeCT4utjHaWsW73z6gTqrta8SnxVBVme5GLMWDo=; b=XURPRulyI7GBQkDYjbL29j6b7fNvlGFidOglpITLHCDt5F+d3TwghzPEurh5SVX0pV tXVr/4xjzWfQXw7n8X4tX0YytM5fZGaPEYpYqsaqrG2nP8qOqL3ONC+f+W3OACBskxHG 5g4qTa3vYKROE/9I1BwZC1NwRKXPCawbTS/1WbyFCehUzGwOs2FH+QhyyS0CWxCY0YwD 6RZ8MjFhYpzQXWQoAQLPz/VpOQLLE3JJb/Hdd3+hpDS5d2oTq30np5PkY4+eobDN6Wle Tn6aB5DmbXLPAZ5lnnNtn8qUUXw61kawSCiInP1KYMCwimZCcfmXiqeG2SViSys2AZOS WO7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rPe4UeCT4utjHaWsW73z6gTqrta8SnxVBVme5GLMWDo=; b=8Iy5zw8uAv4M+CjCDQ3tF9DB4UzEeQiMb/F9Xc+3oZU0jdZOJK5/afNIE2uYSg+jjG sO+El7OimOcoCuXuOVmabvmQ1XC66DwoiHq1TSSLMDQ+ggqk4rHZe6gwFTsMbZl/2wbt g9tm4tAqi/ijRTPbFanIKXKNgH6LTEp+WNgOmI9878i5HL0Sogug8YR204AauJhaI/7x igUW5Wwaiao+ktODlx/I5qO22pDya5ohYujRCQ1KyC60Sp7rnRPp8oHg3I718oVQf87V Ler3p1MJoTdRbjM5LVigxJWJiM9d4f8ecfamfYwrK2w0Ls7YsVrTvXsEucLywLeZJQF0 RCzg== X-Gm-Message-State: ACrzQf2j/HZ8NXyvhjgcpDdoGQE1cmNAfQ2M1GHhaKzFm8GJrVC1K5z7 ZBPrKf8yOBii3EGO6+X1oOGDZmVkUgyqjVRz27t4KA== X-Google-Smtp-Source: AMsMyM6zOiheEh4N7KSI0CXPvmDFJU1CBHXMIaYT5uIJkfwzlmGNQlwE0vxfa7DWYKMARCwt5PbD8BFew/kViQjETJQ= X-Received: by 2002:a17:90b:4f87:b0:20b:12e3:32ae with SMTP id qe7-20020a17090b4f8700b0020b12e332aemr12370517pjb.236.1665992614969; Mon, 17 Oct 2022 00:43:34 -0700 (PDT) MIME-Version: 1.0 References: <7ee4a1bd-0674-42d8-8980-8b029ca09e71@app.fastmail.com> <75eaeab3-7781-d60a-ae61-ae837f5dcec9@opensource.wdc.com> <20221014140633.mlypet7skkxvt453@mobilestation> In-Reply-To: <20221014140633.mlypet7skkxvt453@mobilestation> From: Anders Roxell Date: Mon, 17 Oct 2022 09:43:24 +0200 Message-ID: Subject: Re: TI: X15 the connected SSD is not detected on Linux next 20221006 tag To: Serge Semin Cc: Serge Semin , Damien Le Moal , Arnd Bergmann , Naresh Kamboju , open list , Linux ARM , regressions@lists.linux.dev, "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , lkft-triage@lists.linaro.org, Lukas Bulwahn , Niklas Cassel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221017_004340_207031_D5BC1212 X-CRM114-Status: GOOD ( 50.92 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 14 Oct 2022 at 16:06, Serge Semin wrote: > > On Fri, Oct 14, 2022 at 11:22:38AM +0200, Anders Roxell wrote: > > On Fri, 14 Oct 2022 at 09:53, Damien Le Moal > > wrote: > > > > > > On 10/14/22 16:31, Arnd Bergmann wrote: > > > > On Fri, Oct 14, 2022, at 2:22 AM, Damien Le Moal wrote: > > > >> On 10/14/22 07:07, Anders Roxell wrote: > > > >> [...] > > > >>>> 8) > > > >>>>> If reverting these patches restores the eSATA port on this board, then you need > > > >>>>> to fix the defconfig for that board. > > > >>>> > > > >>>> OTOH, > > > >>>> Anders, enabled the new config CONFIG_AHCI_DWC=y and tried but the > > > >>>> device failed to boot. > > > >>> > > > >>> I thought it would work with enabling CONFIG_AHCI_DWC=y, but it didn't... > > > >> > > > >> As mentioned in my previous reply to Naresh, this is a new driver added in > > > >> 6.1. Your board was working before so this should not be the driver needed > > > >> for it. > > > >> > > > >>> However, reverting patch 33629d35090f ("ata: ahci: Add DWC AHCI SATA > > > >>> controller support") > > > >>> from next-20221013 was a success, kernel booted and the 'mkfs.ext4' cmd was > > > >>> successful. > > > >> > > > >> Which is very strange... There is only one hunk in that commit that could > > > >> be considered suspicious: > > > >> > > > >> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c > > > >> index 9b56490ecbc3..8f5572a9f8f1 100644 > > > >> --- a/drivers/ata/ahci_platform.c > > > >> +++ b/drivers/ata/ahci_platform.c > > > >> @@ -80,9 +80,7 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend, > > > >> static const struct of_device_id ahci_of_match[] = { > > > >> { .compatible = "generic-ahci", }, > > > >> /* Keep the following compatibles for device tree compatibility */ > > > >> - { .compatible = "snps,spear-ahci", }, > > > >> { .compatible = "ibm,476gtr-ahci", }, > > > >> - { .compatible = "snps,dwc-ahci", }, > > > >> { .compatible = "hisilicon,hisi-ahci", }, > > > >> { .compatible = "cavium,octeon-7130-ahci", }, > > > >> { /* sentinel */ } > > > >> > > > >> Is your board using one of these compatible string ? > > > > > > > > The x15 uses "snps,dwc-ahci". I would expect it to detect the device > > > > with the new driver if that is loaded, but it's possible that the > > > > driver does not work on all versions of the dwc-ahci hardware. > > > > > > > > Anders, can you provide the boot log from a boot with the new driver > > > > built in? There should be some messages from dwc-ahci about finding > > > > the device, but then not ultimately working. > > > > > > > > Depending on which way it goes wrong, the safest fallback for 6.1 is > > > > probably to move the "snps,spear-ahci" and "snps,dwc-ahci" compatible > > > > strings back into the old driver, and leave the new one only for > > > > the "baikal,bt1-ahci" implementation of it, until it has been > > > > successfully verified on TI am5/dra7, spear13xx and exynos. > > > > > > OK. So a fix patch until further tests/debug is completed would be this: > > > > > > diff --git a/drivers/ata/ahci_dwc.c b/drivers/ata/ahci_dwc.c > > > index 8fb66860db31..7a0cbab00843 100644 > > > --- a/drivers/ata/ahci_dwc.c > > > +++ b/drivers/ata/ahci_dwc.c > > > @@ -469,8 +469,6 @@ static struct ahci_dwc_plat_data ahci_bt1_plat = { > > > }; > > > > > > static const struct of_device_id ahci_dwc_of_match[] = { > > > - { .compatible = "snps,dwc-ahci", &ahci_dwc_plat }, > > > - { .compatible = "snps,spear-ahci", &ahci_dwc_plat }, > > > { .compatible = "baikal,bt1-ahci", &ahci_bt1_plat }, > > > {}, > > > }; > > > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c > > > index 8f5572a9f8f1..9b56490ecbc3 100644 > > > --- a/drivers/ata/ahci_platform.c > > > +++ b/drivers/ata/ahci_platform.c > > > @@ -80,7 +80,9 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend, > > > static const struct of_device_id ahci_of_match[] = { > > > { .compatible = "generic-ahci", }, > > > /* Keep the following compatibles for device tree compatibility */ > > > + { .compatible = "snps,spear-ahci", }, > > > { .compatible = "ibm,476gtr-ahci", }, > > > + { .compatible = "snps,dwc-ahci", }, > > > { .compatible = "hisilicon,hisi-ahci", }, > > > { .compatible = "cavium,octeon-7130-ahci", }, > > > { /* sentinel */ } > > > > > > Anders, Naresh, > > > > > > Can you try this ? > > > > > Tested this patch on todays linux-next tag: next-20221014 without enabling > > CONFIG_AHCI_DWC and it worked as expected when booting [1]. > > On the other hand I also tried a build/boot with CONFIG_AHCI_DWC enabled > > and it worked as expected to boot [2]. > > Expected result. The DWC driver will probe the device on our platform > only while your platform falls back to using the generic driver. > Anders, in order understand the root cause of the problem could you please > 1. upload the bogus boot log. This [1] is the bogus boot log. > 2. try what I suggested here > Link: https://lore.kernel.org/linux-ide/20221014133623.l6w4o7onoyhv2q34@mobilestation/ > and if the system fails to boot at some point upload the boot log. Only doing this: --- a/drivers/ata/ahci_dwc.c +++ b/drivers/ata/ahci_dwc.c @@ -316,12 +316,13 @@ static int ahci_dwc_init_host(struct ahci_host_priv *hpriv) if (rc) goto err_disable_resources; } - +/* ahci_dwc_check_cap(hpriv); ahci_dwc_init_timer(hpriv); rc = ahci_dwc_init_dmacr(hpriv); +*/ if (rc) goto err_clear_platform; and enable CONFIG_AHCI_DWC made the mkfs to detect the SATA drive [2]. Cheers, Anders [1] https://lkft.validation.linaro.org/scheduler/job/5634743#L2580 [2] https://lkft.validation.linaro.org/scheduler/job/5679278#L2617 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel