From: "Rafał Miłecki" <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Dmitry Torokhov <dtor-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Anatol Pomazao <anatol-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Ray Jui <rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
Corneliu Doban <cdoban-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
Jonathan Richardson
<jonathar-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
Florian Fainelli
<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller
Date: Sat, 7 Mar 2015 23:15:28 +0100 [thread overview]
Message-ID: <CACna6ryrDT7OUAr81ebcVdnX0-_fwA24hU9FeVyFRF-BusEaMw@mail.gmail.com> (raw)
In-Reply-To: <1425691129-1150-4-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 7 March 2015 at 02:18, Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> +static int brcmnand_waitfunc(struct mtd_info *mtd, struct nand_chip *this)
> +{
> + struct nand_chip *chip = mtd->priv;
> + struct brcmnand_host *host = chip->priv;
> + struct brcmnand_controller *ctrl = host->ctrl;
> + unsigned long timeo = msecs_to_jiffies(100);
> +
> + dev_dbg(ctrl->dev, "wait on native cmd %d\n", ctrl->cmd_pending);
> + if (ctrl->cmd_pending &&
> + wait_for_completion_timeout(&ctrl->done, timeo) <= 0) {
> + unsigned long cmd = brcmnand_read_reg(ctrl, BRCMNAND_CMD_START)
> + >> brcmnand_cmd_shift(ctrl);
> +
> + dev_err_ratelimited(ctrl->dev,
> + "timeout waiting for command %u (%ld)\n",
> + host->last_cmd, cmd);
I think that using host->last_cmd in the above message is really
misleading. Please consider following:
[ 2.061139] [brcmnand_cmdfunc:1151] command:0x90 native_cmd:0x07
[ 2.067123] brcmstb_nand 18028000.nand: send native cmd 7 addr_lo 0x40
[ 2.168395] brcmstb_nand 18028000.nand: timeout waiting for command 144 (7)
[ 2.175321] brcmstb_nand 18028000.nand: intfc status f0000000
[ 2.181051] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[ 2.187370] nand: Eon NAND 128MiB 3,3V 8-bit
[ 2.191632] nand: 128 MiB, SLC, erase size: 128 KiB, page size:
2048, OOB size: 64
[ 2.199192] brcmstb_nand 18028000.nand: detected 128MiB total,
128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
[ 2.199192]
[ 2.210724] Scanning device for bad blocks
[ 2.214812] brcmstb_nand 18028000.nand: send native cmd 1 addr_lo 0x0
[ 2.318394] brcmstb_nand 18028000.nand: timeout waiting for command 144 (1)
As you can see, first there was a brcmnand_cmdfunc call with 0x90
(NAND_CMD_READID). It was translated into internal command 0x07
(CMD_DEVICE_ID_READ).
Then there was a call to brcmnand_read_by_pio which resulted in
sending internal command 0x01 (CMD_PAGE_READ). This one overwrote
previous command. So the timeout wasn't about 144 (0x90) anymore.
I suggest replacing that with something like
"timeout waiting for internal command 0x%02x\n", cmd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-03-07 22:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 1:18 [PATCH 0/3] mtd: nand: add Broadcom NAND controller support Brian Norris
2015-03-07 1:18 ` [PATCH 1/3] mtd: nand: add common DT init code Brian Norris
2015-03-07 1:18 ` [PATCH 2/3] Documentation: devicetree: add binding doc for Broadcom NAND controller Brian Norris
2015-03-16 18:49 ` Florian Fainelli
[not found] ` <1425691129-1150-3-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-16 23:07 ` Scott Branden
[not found] ` <55076247.4070104-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2015-03-16 23:37 ` Brian Norris
2015-03-16 23:40 ` Scott Branden
2015-03-16 23:46 ` Brian Norris
2015-03-16 23:52 ` Scott Branden
2015-03-07 1:18 ` [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB " Brian Norris
2015-03-07 12:39 ` Paul Bolle
2015-03-09 17:30 ` Brian Norris
[not found] ` <1425691129-1150-4-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-07 13:21 ` Rafał Miłecki
2015-03-09 17:31 ` Brian Norris
2015-03-07 22:15 ` Rafał Miłecki [this message]
2015-03-16 18:55 ` Florian Fainelli
2015-03-19 1:49 ` Brian Norris
2015-03-07 17:39 ` Rafał Miłecki
[not found] ` <CACna6rzkEQu+LYchckFpLLxkvyMYK7N84nrGu8p0rjRsRbFzfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-07 21:48 ` Rafał Miłecki
2015-03-08 0:44 ` Rafał Miłecki
2015-03-09 17:49 ` Brian Norris
2015-03-09 17:57 ` Ray Jui
2015-03-16 19:58 ` Florian Fainelli
2015-03-08 0:01 ` [PATCH 0/3] mtd: nand: add Broadcom NAND controller support Rafał Miłecki
2015-03-08 0:57 ` Brian Norris
2015-03-08 10:22 ` Rafał Miłecki
2015-03-09 18:04 ` Brian Norris
2015-03-08 11:18 ` Rafał Miłecki
2015-03-09 17:59 ` Brian Norris
[not found] ` <CALj_zD5rW3Se27Rh0pL6QTMNGOrrmrvAVLvW3BCuF8RujYQE=g@mail.gmail.com>
2015-03-16 23:44 ` Brian Norris
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=CACna6ryrDT7OUAr81ebcVdnX0-_fwA24hU9FeVyFRF-BusEaMw@mail.gmail.com \
--to=zajec5-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=anatol-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=cdoban-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dtor-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jonathar-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.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).