From: Linus Walleij <linus.walleij@linaro.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: linux-spi <linux-spi@vger.kernel.org>,
Mark Brown <broonie@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors")
Date: Tue, 26 Nov 2019 16:48:43 +0100 [thread overview]
Message-ID: <CACRpkdYUBj+45Jr94kdERKJogVoL96JH6i85o_bVUtjmkTt19g@mail.gmail.com> (raw)
In-Reply-To: <1efb797c-e3c1-25a4-0e81-78b5bbadb355@c-s.fr>
Hi Christophe,
sorry for forgetting about this :(
On Fri, Nov 8, 2019 at 2:34 PM Christophe Leroy <christophe.leroy@c-s.fr> wrote:
> With the two above changes, I get:
> [ 3.143014] fsl_spi ff000a80.spi: bail out with error code -22
> [ 3.148879] ------------[ cut here ]------------
> [ 3.153261] remove_proc_entry: removing non-empty directory 'irq/43',
> leaking at least 'fsl_spi'
> [ 3.162473] WARNING: CPU: 0 PID: 1 at fs/proc/generic.c:684
> remove_proc_entry+0x1a0/0x1c8
So that is another bug again. (Tearing down IRQs is erroneous
in some way.)
The problem is the first -22 (-EINVAL)
Which comes from of_fsl_spi_probe() IIUC.
Can you try the following? I'm sorry if gmail mangles the
patches, I put a copy here:
https://dflund.se/~triad/fsldebug.diff
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 114801a32371..3f68bea1c3c0 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -617,12 +617,15 @@ static struct spi_master * fsl_spi_probe(struct
device *dev,
mpc8xxx_spi->type = fsl_spi_get_type(dev);
ret = fsl_spi_cpm_init(mpc8xxx_spi);
- if (ret)
+ if (ret) {
+ dev_err(dev, "fsl_spi_cpm_init() failed\n");
goto err_cpm_init;
+ }
mpc8xxx_spi->reg_base = devm_ioremap_resource(dev, mem);
if (IS_ERR(mpc8xxx_spi->reg_base)) {
ret = PTR_ERR(mpc8xxx_spi->reg_base);
+ dev_err(dev, "erroneous ->reg_base\n");
goto err_probe;
}
@@ -645,8 +648,10 @@ static struct spi_master * fsl_spi_probe(struct
device *dev,
ret = devm_request_irq(dev, mpc8xxx_spi->irq, fsl_spi_irq,
0, "fsl_spi", mpc8xxx_spi);
- if (ret != 0)
+ if (ret != 0) {
+ dev_err(dev, "devm_request_irq() failed\n");
goto err_probe;
+ }
reg_base = mpc8xxx_spi->reg_base;
@@ -668,8 +673,10 @@ static struct spi_master * fsl_spi_probe(struct
device *dev,
mpc8xxx_spi_write_reg(®_base->mode, regval);
ret = devm_spi_register_master(dev, master);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(dev, "devm_spi_register_master() failed\n");
goto err_probe;
+ }
dev_info(dev, "at 0x%p (irq = %d), %s mode\n", reg_base,
mpc8xxx_spi->irq, mpc8xxx_spi_strmode(mpc8xxx_spi->flags));
@@ -681,6 +688,7 @@ static struct spi_master * fsl_spi_probe(struct device *dev,
err_cpm_init:
spi_master_put(master);
err:
+ dev_err(dev, "exiting fsl_spi_probe() with error\n");
return ERR_PTR(ret);
}
@@ -738,12 +746,14 @@ static int of_fsl_spi_probe(struct platform_device *ofdev)
irq = irq_of_parse_and_map(np, 0);
if (!irq) {
ret = -EINVAL;
+ dev_err(dev, "irq_of_parse_and_map() failed\n");
goto err;
}
master = fsl_spi_probe(dev, &mem, irq);
if (IS_ERR(master)) {
ret = PTR_ERR(master);
+ dev_err(dev, "fsl_spi_probe() failed\n");
goto err;
}
Let's drill in and see where this error come from.
Yours,
Linus Walleij
next prev parent reply other threads:[~2019-11-26 15:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 12:33 Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Christophe Leroy
2019-11-08 13:09 ` Linus Walleij
2019-11-08 13:34 ` Christophe Leroy
2019-11-26 15:01 ` Christophe Leroy
2019-11-26 15:35 ` Fabio Estevam
2019-11-26 16:16 ` Christophe Leroy
2019-11-26 16:23 ` Mark Brown
2019-11-26 15:48 ` Linus Walleij [this message]
2019-11-26 19:08 ` Christophe Leroy
2019-11-26 19:14 ` Christophe Leroy
2019-11-27 8:26 ` Linus Walleij
2019-11-27 8:57 ` Christophe Leroy
2019-11-27 9:07 ` Christophe Leroy
2019-11-27 9:11 ` Linus Walleij
2019-11-27 9:34 ` Christophe Leroy
2019-11-27 10:02 ` Linus Walleij
2019-11-27 10:39 ` Christophe Leroy
2019-11-27 10:55 ` Linus Walleij
2019-11-27 12:04 ` Christophe Leroy
2019-11-27 13:00 ` Linus Walleij
2019-11-27 13:44 ` Christophe Leroy
2019-11-27 13:52 ` Linus Walleij
2019-11-27 13:54 ` Christophe Leroy
2019-11-27 13:56 ` Linus Walleij
2019-11-27 14:29 ` Christophe Leroy
2019-11-28 8:42 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACRpkdYUBj+45Jr94kdERKJogVoL96JH6i85o_bVUtjmkTt19g@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=broonie@kernel.org \
--cc=christophe.leroy@c-s.fr \
--cc=festevam@gmail.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).