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: <4cd52f4d-021d-fd62-a2e6-a414d1b94ac9@codeaurora.org>
Date:   Fri, 16 Feb 2018 11:09:53 +0530
From:   Sricharan R <sricharan@...eaurora.org>
To:     Abhishek Sahu <absahu@...eaurora.org>,
        Andy Gross <andy.gross@...aro.org>,
        Wolfram Sang <wsa@...-dreams.de>
Cc:     David Brown <david.brown@...aro.org>,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/12] i2c: qup: send NACK for last read sub transfers

Hi Abhishek,

On 2/3/2018 1:28 PM, Abhishek Sahu wrote:
> According to I2c specification, “If a master-receiver sends a
> repeated START condition, it sends a not-acknowledge (A) just
> before the repeated START condition”. QUP v2 supports sending
> of NACK without stop with QUP_TAG_V2_DATARD_NACK so added the
> same.
> 
> Signed-off-by: Abhishek Sahu <absahu@...eaurora.org>
> ---
>  drivers/i2c/busses/i2c-qup.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
> index ba717bb..edea3b9 100644
> --- a/drivers/i2c/busses/i2c-qup.c
> +++ b/drivers/i2c/busses/i2c-qup.c
> @@ -113,6 +113,7 @@
>  #define QUP_TAG_V2_DATAWR              0x82
>  #define QUP_TAG_V2_DATAWR_STOP         0x83
>  #define QUP_TAG_V2_DATARD              0x85
> +#define QUP_TAG_V2_DATARD_NACK         0x86
>  #define QUP_TAG_V2_DATARD_STOP         0x87
>  
>  /* Status, Error flags */
> @@ -609,7 +610,9 @@ static int qup_i2c_set_tags(u8 *tags, struct qup_i2c_dev *qup,
>  			tags[len++] = QUP_TAG_V2_DATAWR_STOP;
>  	} else {
>  		if (msg->flags & I2C_M_RD)
> -			tags[len++] = QUP_TAG_V2_DATARD;
> +			tags[len++] = qup->blk.pos == (qup->blk.count - 1) ?
> +				      QUP_TAG_V2_DATARD_NACK :
> +				      QUP_TAG_V2_DATARD;
>  		else
>  			tags[len++] = QUP_TAG_V2_DATAWR;

 good one. Thanks .

Regards,
 Sricharan

-- 
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ