From: Dmitry Osipenko <digetx@gmail.com>
To: Sowjanya Komatineni <skomatineni@nvidia.com>
Cc: "thierry.reding@gmail.com" <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Mantravadi Karthik <mkarthik@nvidia.com>,
Shardar Mohammed <smohammed@nvidia.com>,
Timo Alho <talho@nvidia.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH V7 3/5] i2c: tegra: Add DMA Support
Date: Thu, 31 Jan 2019 07:01:20 +0300 [thread overview]
Message-ID: <20190131070120.33127cd8@dimatab> (raw)
In-Reply-To: <BYAPR12MB3398C3E7C5842C698B5CA1CCC2910@BYAPR12MB3398.namprd12.prod.outlook.com>
В Thu, 31 Jan 2019 03:34:59 +0000
Sowjanya Komatineni <skomatineni@nvidia.com> пишет:
> > I2C_INT_ALL_PACKETS_XFER_COMPLETE shall be masked for the PIO mode
> > I2C_INT_PACKET_XFER_COMPLETE shall be masked for the DMA mode, if
> > I'm not missing something.
> for packets with repeated start or continue xfer,
> PACKET_XFER_COMPLETE will be triggers for packets with stop bit, both
> PACKET_XFER_COMPLETE and ALL_PACKET_XFER_COMPLETE will be triggered.
> To be align with what PIO mode is doing, will not use
> ALL_PACKETS_XFER_COMPLETE for DMA in next version.
Sounds good.
> >
> > Handle the error-case here:
> >
> > if (i2c_dev->msg_err != I2C_ERR_NONE) {
> > dev_err(i2c_dev->dev, "i2c dma transfer failed\n");
> > goto i2c_recover;
> > }
> >
> >...
> > <--- end of tegra_i2c_xfer_msg() -->
> >
> > if (likely(i2c_dev->msg_err == I2C_ERR_NONE))
> > return 0;
> >
> > i2c_recover:
> > tegra_i2c_init(i2c_dev);
> > /* start recovery upon arbitration loss in single master
> > mode */ if (i2c_dev->msg_err == I2C_ERR_ARBITRATION_LOST) {
> > if (!i2c_dev->is_multimaster_mode)
> > return tegra_i2c_issue_bus_clear(i2c_dev);
> > return -EAGAIN;
> > }
> > if (i2c_dev->msg_err == I2C_ERR_NO_ACK) {
> > if (msg->flags & I2C_M_IGNORE_NAK)
> > return 0;
> > return -EREMOTEIO;
> > }
> >
> > return -EIO;
>
> When DMA transfer timeout, no need to check for ARB LOST or NO_ACK as
> if any of those interrupts trigger interrupt handler will terminate
> dmaengine and completes so DMA timeout will not be seen in those
> cases and falls thru msg_err check
>
Okay.
next prev parent reply other threads:[~2019-01-31 4:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 16:01 [PATCH V7 1/5] i2c: tegra: Sort all the include headers alphabetically Sowjanya Komatineni
2019-01-30 16:01 ` [PATCH V7 2/5] i2c: tegra: Add Bus Clear Master Support Sowjanya Komatineni
2019-01-31 11:31 ` Thierry Reding
2019-01-30 16:01 ` [PATCH V7 3/5] i2c: tegra: Add DMA Support Sowjanya Komatineni
2019-01-31 0:05 ` Dmitry Osipenko
2019-01-31 1:19 ` Sowjanya Komatineni
2019-01-31 2:13 ` Dmitry Osipenko
2019-01-31 2:24 ` Sowjanya Komatineni
2019-01-31 2:53 ` Dmitry Osipenko
2019-01-31 3:34 ` Sowjanya Komatineni
2019-01-31 4:01 ` Dmitry Osipenko [this message]
2019-01-31 12:06 ` Thierry Reding
2019-01-31 14:06 ` Dmitry Osipenko
2019-01-31 14:43 ` Thierry Reding
2019-01-31 15:02 ` Dmitry Osipenko
2019-01-31 16:01 ` Thierry Reding
2019-01-31 16:27 ` Dmitry Osipenko
2019-01-31 16:31 ` Dmitry Osipenko
2019-01-31 19:02 ` Dmitry Osipenko
2019-01-31 16:55 ` Dmitry Osipenko
2019-01-31 18:08 ` Dmitry Osipenko
2019-01-31 18:15 ` Dmitry Osipenko
2019-01-30 16:01 ` [PATCH V7 4/5] i2c: tegra: Update transfer timeout Sowjanya Komatineni
2019-01-31 1:38 ` Dmitry Osipenko
2019-01-30 16:01 ` [PATCH V7 5/5] i2c: tegra: Add I2C interface timing support Sowjanya Komatineni
2019-01-31 4:30 ` Dmitry Osipenko
2019-01-31 11:28 ` [PATCH V7 1/5] i2c: tegra: Sort all the include headers alphabetically Thierry Reding
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=20190131070120.33127cd8@dimatab \
--to=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkarthik@nvidia.com \
--cc=skomatineni@nvidia.com \
--cc=smohammed@nvidia.com \
--cc=talho@nvidia.com \
--cc=thierry.reding@gmail.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).