From: Ratheesh Kannoth <rkannoth@marvell.com>
To: "Martin Hundebøll" <martin@geanix.com>
Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Markus Schneider-Pargmann <msp@baylibre.com>,
<linux-can@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] can: m_can: don't enable transceiver when probing
Date: Fri, 21 Jun 2024 14:49:08 +0530 [thread overview]
Message-ID: <20240621091908.juhoeb7zfo4zhsga@maili.marvell.com> (raw)
In-Reply-To: <20240607105210.155435-1-martin@geanix.com>
On 2024-06-07 at 16:22:08, Martin Hundebøll (martin@geanix.com) wrote:
>
> - usleep_range(1, 5);
> + /* Then clear the it again. */
> + ret = m_can_cccr_update_bits(cdev, CCCR_NISO, 0);
> + if (ret) {
> + dev_err(cdev->dev, "failed to revert the NON-ISO bit in CCCR\n");
> + return ret;
> }
>
> - /* Clear NISO */
> - cccr_reg &= ~(CCCR_NISO);
> - m_can_write(cdev, M_CAN_CCCR, cccr_reg);
> + ret = m_can_config_disable(cdev);
> + if (ret)
> + return ret;
if ret != 0, then the function returns "true", right ?
as indicated by the below comment. But as i understand,
this is an error case and should return "false"
> - /* return false if time out (-ETIMEDOUT), else return true */
> - return !niso_timeout;
> + return niso == 0;
> }
>
>
next prev parent reply other threads:[~2024-06-21 9:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 10:52 [PATCH v4] can: m_can: don't enable transceiver when probing Martin Hundebøll
2024-06-12 12:07 ` Markus Schneider-Pargmann
2024-06-21 8:32 ` Marc Kleine-Budde
2024-06-21 9:19 ` Ratheesh Kannoth [this message]
2024-06-21 9:27 ` Marc Kleine-Budde
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=20240621091908.juhoeb7zfo4zhsga@maili.marvell.com \
--to=rkannoth@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=martin@geanix.com \
--cc=mkl@pengutronix.de \
--cc=msp@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rcsekar@samsung.com \
/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).