Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp337458rwi; Fri, 14 Oct 2022 02:47:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pm0UtmG1tccY+a5EhHkHRd4/QKIse3X4ayMbhjff2IYL9Sku5QW0IsZKr5O03HalRqrI4 X-Received: by 2002:a17:907:a047:b0:78d:9b73:79bb with SMTP id gz7-20020a170907a04700b0078d9b7379bbmr2860210ejc.657.1665740820486; Fri, 14 Oct 2022 02:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665740820; cv=none; d=google.com; s=arc-20160816; b=IBTcF2tGjIZzGXI5Ro+H8RRV0m7Z8WGRN8HzhDCKzs4Z4AkaU6XsXCJTlemYCrSA3J KMiGR+nT57mlDM6cvBOMa5b7ahBdfk2E1fXGrowofD9OScHgGwRq8eCJjQEsy0hIVZ/O U0p5xtTFyuaCcJ1D7mRON003+g5KOUPHEprfAN/rZHVZWkC28W9yRv3ED5e+II4GxL/e ZUt4kr3vEyFSsSolaFm6XHXpYNpOAFD2bwV71Ur0ewINKM7UwnCpDbTjo6AcGDFAbKwM Btd6fANBY4hYmse9AYnFP3JZZ/EPVgm8FzGbc73Gbdb/w1/oOAfAr9jsm7QkTVxp8wOa 9rzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=E5dHqmsGt5x/ibVS7C2KP9W7Xq57N2db5FdvVrUVbOU=; b=HaHXRWcqSI1dzzi9y/1S54G4dTmqGTRkk3ujh8FgvpZojR0w6zzSBhNiMqS5IxWMKw 5xiYKSuvdEVJl2yOVLghZoMcvicxDSB97WFUz0hnoyd/NK6ntfyY+AxM0NfmPHVx4HMl 8C4pmzUVeI+HOAZVQ7mkIZjsj5W+XR+EI1qqAaih3JSEkGwwa6brl5V4KMY4iNI9Vnuj lo1am+qjMuFxCqPn8SfhyVfhsGaM5dX73XXy6JcZjpPD+hZb8DzQfHPoWSbwzBg9zsWz K4/pF+Eh8xRwmVmY/gf2wtAOFHr3K9RDjl7HBV9+TAzZ3jD2yV/Gqdw93KqGtU8fNcoH trvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D2h+Wop9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc12-20020a1709078a0c00b0077fadd74307si2115921ejc.128.2022.10.14.02.46.35; Fri, 14 Oct 2022 02:47:00 -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; dkim=pass header.i=@linaro.org header.s=google header.b=D2h+Wop9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229900AbiJNJWw (ORCPT + 99 others); Fri, 14 Oct 2022 05:22:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbiJNJWv (ORCPT ); Fri, 14 Oct 2022 05:22:51 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32EE11BE1F6 for ; Fri, 14 Oct 2022 02:22:50 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id c24so4194838pls.9 for ; Fri, 14 Oct 2022 02:22:50 -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=E5dHqmsGt5x/ibVS7C2KP9W7Xq57N2db5FdvVrUVbOU=; b=D2h+Wop90g0YPLvq0/itoDRoDkV4i8mL5jZgAMr66oLRqL++TeQwzCJnd24aYOGqCq M+Eiou8ACzqtPjdV6oznbCrAN5dTNP/FVylg5z2/XBaXIcnZhPogpbD1mrz+Y0qyVQJI UjGZQIhCY2OkjfXlijN4ea3lpY5sDQpgkTQh3b5/l8tUGfTSoD+I9Nm2AWINgj8We/3E 0jXHrEH3db0ENkNDKiXNEdD3ACfb+/PAxat2RMHOQp2nJz8Uu6zbU15cCgGOF3yGI/D9 +dpyRxh7v2b9HGmDFpmnquVxcgJrF8Rtxhz6ratICcRPpqkTVQmqcjhhOEIz7U1F38ln 0MJA== 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=E5dHqmsGt5x/ibVS7C2KP9W7Xq57N2db5FdvVrUVbOU=; b=Bqbnx7Tsr3BAW0plHtds0YvDwuYlTLxYOk8qIOP/UOQisPMaZFmPJXM1GkWFPkVvWU yOSg7ZzQnN9M01VCrJEjeKmD2MoWD9wasiAhVpCMnMp9VcTgsbk1OoGQW+AQIU/j/MWD ocX0ma+AJp4YmGtYNJ93PY8qdUTfz9CQRwQXjw3p/RrYo4Vgf8ztXaEf7VYyCVLlDWFW CsKgDOcN0gV31JvNp6NMQ7FS9Rxdr6sraFDbWP2IEMhZ5SsHuSOOSH7rxbzDfYjKb9JS yyD6l/dMWHEch8EwoxO/6dAKHwhAdFF9as4+OjkmSbU4a1GmSn3CLkrYtHNUhhbigHU3 zNCw== X-Gm-Message-State: ACrzQf1PBIPLVDOcDYhasTMVDD1ZkXgqyaIj2585IzajRF+ZK/QLvrif HrHXnrHQvWgqmn66runKnYmW215i/flFx1nQCeeNIQ== X-Received: by 2002:a17:902:ec83:b0:17c:afb3:d1ec with SMTP id x3-20020a170902ec8300b0017cafb3d1ecmr4185102plg.172.1665739369636; Fri, 14 Oct 2022 02:22:49 -0700 (PDT) MIME-Version: 1.0 References: <7ee4a1bd-0674-42d8-8980-8b029ca09e71@app.fastmail.com> <75eaeab3-7781-d60a-ae61-ae837f5dcec9@opensource.wdc.com> In-Reply-To: <75eaeab3-7781-d60a-ae61-ae837f5dcec9@opensource.wdc.com> From: Anders Roxell Date: Fri, 14 Oct 2022 11:22:38 +0200 Message-ID: Subject: Re: TI: X15 the connected SSD is not detected on Linux next 20221006 tag To: Damien Le Moal Cc: Arnd Bergmann , Naresh Kamboju , Sergey.Semin@baikalelectronics.ru, 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 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]. However, during building a warning [3] popped up: make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/2/build ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 'CC=sccache arm-linux-gnueabihf-gcc' 'HOSTCC=sccache gcc' /builds/linux/drivers/ata/ahci_dwc.c:462:34: warning: 'ahci_dwc_plat' defined but not used [-Wunused-variable] 462 | static struct ahci_dwc_plat_data ahci_dwc_plat = { | ^~~~~~~~~~~~~ Cheers, Anders [1] https://lkft.validation.linaro.org/scheduler/job/5678031 [2] https://lkft.validation.linaro.org/scheduler/job/5678152 [3] https://builds.tuxbuild.com/2G7PDSV5uzjnQqCCBybK4WpoTxz/build.log