lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190131070120.33127cd8@dimatab>
Date:   Thu, 31 Jan 2019 07:01:20 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Sowjanya Komatineni <skomatineni@...dia.com>
Cc:     "thierry.reding@...il.com" <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Mantravadi Karthik <mkarthik@...dia.com>,
        Shardar Mohammed <smohammed@...dia.com>,
        Timo Alho <talho@...dia.com>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>
Subject: Re: [PATCH V7 3/5] i2c: tegra: Add DMA Support

В Thu, 31 Jan 2019 03:34:59 +0000
Sowjanya Komatineni <skomatineni@...dia.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ