Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5279776rwb; Sun, 4 Dec 2022 18:21:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf6NBMjmVtD5gYLH6cPE8r7aHOX2c21zzxHXgM+3ecta1q8DbkvOryHAiVISmyr1KPSY9NxW X-Received: by 2002:a65:6a55:0:b0:470:2c92:13da with SMTP id o21-20020a656a55000000b004702c9213damr64496047pgu.298.1670206865023; Sun, 04 Dec 2022 18:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670206865; cv=none; d=google.com; s=arc-20160816; b=b6fvAbJiZRyguc9sYhTnuqtBws/Y8+mD6zNmxzJpSH5C2a3sRow5Jp4KCr2kLYZ7JZ BoKjkY4LPF46eAqlgZFcDvTzoW0nhPuysLaLl43fCZSJTkfbY5bapsP6Ba50/pQMKIF+ rN24FI/MM0DiIJN2YhdVgeq2kCosYrenKEgAp2qG5cdoVm0pv9XvdOHmDCPCKeAZYJkN 7OwvNsx5hfhBT7/wBEizEioMyltvc7QUOEHpt0tzGDxFmhRuoh19jOcxYSFvXLhbe3KH u3KNgLjepy3rqQFwVOSXcbQ2+XoprtP5ozBdXZIcRUmfUIdq7sIMOT5Mv3gfxtCZDsbM LB7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=db2wPaycUL//qoVLgOQfvWWZ0ow+Tx+jkZYnsnlD7ow=; b=nykZtbkXYbRZ2rQJpw9baMjsPJYROpCbaM8mvjxH7ciP7w1rBmsBgFpiN/G8aqJXRm owAOMrPTcs86D+PKgSzO6sOKq8Hj0UQNyLj2THY/8uckTts5ekWE8hYydDtvZQnal6LP VoaMTloW3qQurEMBC0/h5OsWXx8Xg0w/KgjcQM6P7WVl/fDIgs24tb0yJvTEouGx55h5 bQXrVZDPnrC1eH8iupVgJWAURfHMZRKCjaUUSnQv7UQE33WZ/+HQMtyEWrTbp6HkYGot En59E8MSQhw6uLdItGt8zwDP8FqUJhg140FPpfY7WYrJK5wsX8sMyxW1oT/2TtoV2MA3 hA+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Nlwao8fs; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jf3-20020a170903268300b00189c05664e8si6623682plb.563.2022.12.04.18.20.54; Sun, 04 Dec 2022 18:21:05 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=Nlwao8fs; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231228AbiLEBLM (ORCPT + 82 others); Sun, 4 Dec 2022 20:11:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbiLEBLK (ORCPT ); Sun, 4 Dec 2022 20:11:10 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2234E020; Sun, 4 Dec 2022 17:11:09 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id a19so11910556ljk.0; Sun, 04 Dec 2022 17:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=db2wPaycUL//qoVLgOQfvWWZ0ow+Tx+jkZYnsnlD7ow=; b=Nlwao8fskd0vjpROGbeTL1jKzadX0RYQFWwtQerZlyqjDQouFH6xJlwNCKjkzPVWJh UfTDZDio4W1ZJDw1I3LoWZ6OqENmQh19F+dbB3vbF8wz4juBbRgE2027dJvUcRcgYc6x DeWb2wcNvYrCFs4bKS+UaBweesx0OS4w6nNIMmDUl+bkYgiNRD39oqBBDX+ubhXUm3Nm pte1D7bI5KBVwjcZpLv/up4lba7U1pWBSb3SgQoM0oYu2ntErdUtjbfc5hJDQW7CImYw /x5pqja0ht1y3at+q9TP8NQi2kYmdSmPm2afmnNUedA7p8meaQBqZhlhvQ4SeOfcSiVV psdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=db2wPaycUL//qoVLgOQfvWWZ0ow+Tx+jkZYnsnlD7ow=; b=4ctAQiysq3pJQAdHom/G7LJOceT+mPKneVVjDWVzh8cJcvPDKKb9n4RHd9v4wpOl+z Vay9Lt5n42nnYdppgkpnjCG9hegnswS8H8pmWPG0Vj9tcf3oysmkppu3oA0Ecsb8AZao F+WKzO7e2fpXqae2NIkG3TkZLtjkDzsD/5VK7LtQd4ATLjjXl7YGA0CH64AnLadJW0Uj 8GgrU6AJC2AHWCgaD6wQyeHwaMz2GIzt1YKQ50L2IEUJETF7nMcUc7Zc1eqDAsN5Fh77 H6Ncn9kL5DzGbAnQZzfndwIyXaDV3V1gxg1QTQW/GSwqZl2SKRogIRW8fXjK9FMFi04/ 394A== X-Gm-Message-State: ANoB5pnewWnsk5+8GyoSKID0JVfFPpxYXH1dWNkpRiGZy9n3kdwH+ZfW 9cYA7rlhUY1VUg0euY5WyZo= X-Received: by 2002:a2e:a881:0:b0:26f:a855:c415 with SMTP id m1-20020a2ea881000000b0026fa855c415mr12010302ljq.443.1670202667819; Sun, 04 Dec 2022 17:11:07 -0800 (PST) Received: from mobilestation ([95.79.133.202]) by smtp.gmail.com with ESMTPSA id b13-20020a0565120b8d00b004b373f61a60sm1939171lfv.96.2022.12.04.17.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Dec 2022 17:11:07 -0800 (PST) Date: Mon, 5 Dec 2022 04:11:05 +0300 From: Serge Semin To: Anders Roxell Cc: Niklas Cassel , Naresh Kamboju , Praneeth Bajjuri , Arnd Bergmann , Serge Semin , Damien Le Moal , open list , Linux ARM , "regressions@lists.linux.dev" , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , "lkft-triage@lists.linaro.org" , Lukas Bulwahn , Carlos Hernandez , Sumit Semwal Subject: Re: TI: X15 the connected SSD is not detected on Linux next 20221006 tag Message-ID: <20221205011105.4do4trbytq4bfw5b@mobilestation> References: <7ee4a1bd-0674-42d8-8980-8b029ca09e71@app.fastmail.com> <75eaeab3-7781-d60a-ae61-ae837f5dcec9@opensource.wdc.com> <20221014140633.mlypet7skkxvt453@mobilestation> <20221017155246.zxal2cfehjgaajcu@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 Thu, Dec 01, 2022 at 12:48:32PM +0100, Anders Roxell wrote: > On Wed, 30 Nov 2022 at 11:03, Niklas Cassel wrote: > > > > On Wed, Nov 30, 2022 at 03:10:37PM +0530, Naresh Kamboju wrote: > > > On Mon, 17 Oct 2022 at 21:22, Serge Semin wrote: > > > > > > FYI, > > > > > > We have been noticing this problem [a] & [b] on Linux mainline master 6.1.0-rc7 > > > > > > Test error: mkfs.ext4 > > > /dev/disk/by-id/ata-SanDisk_SSD_PLUS_120GB_190702A00D84 failed; job > > > exit > > > > > > Please suggest a way forward on this reported issue on arm32 TI BeagleBoard X15 > > > device. Build and Kernel configs details provided in the metadata section. > > > > > > metadata: > > > git_ref: master > > > git_repo: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline > > > git_sha: b7b275e60bcd5f89771e865a8239325f86d9927d > > > git_describe: v6.1-rc7 > > > kernel_version: 6.1.0-rc7 > > > kernel-config: https://builds.tuxbuild.com/2I9I42JhhQqS9GOpFppfRiuqtRW/config > > > build-url: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline/-/pipelines/706371149 > > > artifact-location: https://builds.tuxbuild.com/2I9I42JhhQqS9GOpFppfRiuqtRW > > > toolchain: gcc-10 > > > > > > [a] https://lkft.validation.linaro.org/scheduler/job/5892099 > > > [b] https://lore.kernel.org/all/20221017155246.zxal2cfehjgaajcu@mobilestation/ > > > > > > - Naresh > > > > Hello Naresh, > > > > > > Looking at the error from the log: > > > > + mkfs.ext4 /dev/disk/by-id/ata-SanDisk_SSD_PLUS_120GB_190702A00D84 > > mke2fs 1.46.5 (30-Dec-2021) > > The file /dev/disk/by-id/ata-SanDisk_SSD_PLUS_120GB_190702A00D84 does not exist and no size was specified. > > > > It seems like the device that you are trying to format does not exist. > > > > > > > > On October 17th Serge suggested that you guys should try to enable: > > CONFIG_AHCI_DWC > > and see if that does solve your problem. > > > > There was never any reply to his suggestion. > > I re-tested this on todays linux tree v6.1-rc7-103-gef4d3ea40565. > > With CONFIG_AHCI_DWC=y the kernel fell on its back and no output was produced > So changing the ahci_dwc_init to be a late_initcall [1] made me see > what was going on [2]. > > The kernel booted fine with CONFIG_AHCI_DWC=y + this patch [3] > > --- a/drivers/ata/libahci_platform.c > +++ b/drivers/ata/libahci_platform.c > @@ -109,7 +109,8 @@ struct clk *ahci_platform_find_clk(struct > ahci_host_priv *hpriv, const char *con > int i; > > for (i = 0; i < hpriv->n_clks; i++) { > - if (!strcmp(hpriv->clks[i].id, con_id)) > + if (hpriv->clks && hpriv->clks[i].id && > + !strcmp(hpriv->clks[i].id, con_id)) > return hpriv->clks[i].clk; > } Indeed I should have taken into account that devm_clk_bulk_get_all() can get unnamed clocks too. But checking the hpriv->clks pointer for being not null is redundant, since the ahci_platform_get_resources() procedure makes sure that the array is always allocated. At the very least you shouldn't check the pointer in the loop, but can make sure that the clks array is available before it. -Serge(y) > > Bootlog [4]. > Thank you Arnd for helping out with the investigation and for > proposing the patch for me to test. > > > > > > > > > Looking at the config in: > > > kernel-config: https://builds.tuxbuild.com/2I9I42JhhQqS9GOpFppfRiuqtRW/config > > > > # CONFIG_AHCI_DWC is not set > > > > This Kconfig is indeed not enabled. > > > > Could you guys please try the suggestion from Serge? > > The patch was also tested [5] without enabling CONFIG_AHCI_DWC, this > also worked fine. > > Cheers, > Anders > [1] http://ix.io/4hmt > [2] https://lkft.validation.linaro.org/scheduler/job/5902935 > [3] http://ix.io/4hmv > [4] https://lkft.validation.linaro.org/scheduler/job/5903220 > [5] http://ix.io/4hmw