[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221205011105.4do4trbytq4bfw5b@mobilestation>
Date: Mon, 5 Dec 2022 04:11:05 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Anders Roxell <anders.roxell@...aro.org>
Cc: Niklas Cassel <Niklas.Cassel@....com>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Praneeth Bajjuri <praneeth@...com>,
Arnd Bergmann <arnd@...db.de>,
Serge Semin <Sergey.Semin@...kalelectronics.ru>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
open list <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"regressions@...ts.linux.dev" <regressions@...ts.linux.dev>,
"open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)"
<linux-ide@...r.kernel.org>,
"lkft-triage@...ts.linaro.org" <lkft-triage@...ts.linaro.org>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Carlos Hernandez <ceh@...com>,
Sumit Semwal <sumit.semwal@...aro.org>
Subject: Re: TI: X15 the connected SSD is not detected on Linux next 20221006
tag
On Thu, Dec 01, 2022 at 12:48:32PM +0100, Anders Roxell wrote:
> On Wed, 30 Nov 2022 at 11:03, Niklas Cassel <Niklas.Cassel@....com> wrote:
> >
> > On Wed, Nov 30, 2022 at 03:10:37PM +0530, Naresh Kamboju wrote:
> > > On Mon, 17 Oct 2022 at 21:22, Serge Semin <fancer.lancer@...il.com> 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
Powered by blists - more mailing lists