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 CA40CC4332F for ; Mon, 5 Dec 2022 01:12:39 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WZMiCSOlRueJs+KgAiMbc2qEYzDy5xs1fQQUHxf8jQQ=; b=me86OqFjB+kHbw rR9KehmZC2qRqtMY93kNRj9PufJzs5A0joj3rkzCDYoC3Yj5M2DBJ4WwIA6WDAVxJvzABwiMuMB8S 99THDuIc93GCWHYLZjah9guRmUC8IrPUJENGnMeutAnP8Dwlgypy7zHMdQKeG/2OcAv1B/3dGFhNt QTpiAn6bJg1f/hLoWLtJsjnQeRPN0AvD0R+Nz9Ft9cFG75T1OFt9oGF4V3yda86G82Gh8jqaRnalO I6aIx3xkaqN+Uc5S3CoTzomaIoN1KM7pprmTErH67sjZd3FdPfpfwW2h/SlQuLZzokUx5cTaYV/gR a1dePZBWQMDt743TMimg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p200r-00CAMg-8U; Mon, 05 Dec 2022 01:11:17 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p200m-00CAJp-MJ for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2022 01:11:16 +0000 Received: by mail-lj1-x22b.google.com with SMTP id z4so11860736ljq.6 for ; 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=sLhnl9eah7W/S1Rs1cfkNUVm51ZciZMJVqo7QEwrW/azfp9QVtN9E9cl26jb7bWUYK +LumpVwm4/dv85UMUaygaDe+MKrUFQiUKEqur0iGB50a1l9ZK5m78z0JJTvYJXbA5lS7 t5hKKpPk3ysD6sWxmEud4z2GZBnW+zUpd++tFtkM1vBr8T+ICwuvRkL1OFT+TKckD7H9 BCa7sU9c5iQxGr4TOJgdMndDcYSwAiAOfrgaos/H2nsdlLB1MfBDLrkoo6sKUbto5tX4 a31+LpgbKjdMC59RHed3EiWeMdJ3GCgmxHyG/opVztU2t9PtpKL7M6a2NcPoL89X1020 uTTw== X-Gm-Message-State: ANoB5pn0pd87NoARSN+dgpPx3D3ASxradUMv3iRdvwt80dHbd+zmALWS ipH/wFAwRexT3Mh6Zw/Lhqw= X-Google-Smtp-Source: AA0mqf4ulcuyEj4bIDFxsEiEWlX41RzQoekZOJ8VAEwdpNTXZj5fUhIZIl3d7MBugYwpTJ8O8BBciw== 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221204_171112_761434_5B8D5B0B X-CRM114-Status: GOOD ( 34.94 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel