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]
Date:   Mon, 23 Jul 2018 22:46:10 +0200
From:   Niklas Söderlund 
        <niklas.soderlund@...natech.se>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-i2c@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/12] i2c: rcar: use core to detect 'no zero length'
 quirk

Hi Wolfram,

Thanks for your work.

On 2018-07-23 22:26:14 +0200, Wolfram Sang wrote:
> And don't reimplement in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>

> ---
> 
>  drivers/i2c/busses/i2c-rcar.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index 2688520110d1..791a4aa34fdd 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -796,14 +796,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
>  	if (ret < 0)
>  		goto out;
>  
> -	for (i = 0; i < num; i++) {
> -		/* This HW can't send STOP after address phase */
> -		if (msgs[i].len == 0) {
> -			ret = -EOPNOTSUPP;
> -			goto out;
> -		}
> +	for (i = 0; i < num; i++)
>  		rcar_i2c_request_dma(priv, msgs + i);
> -	}
>  
>  	/* init first message */
>  	priv->msg = msgs;
> @@ -890,6 +884,10 @@ static const struct i2c_algorithm rcar_i2c_algo = {
>  	.unreg_slave	= rcar_unreg_slave,
>  };
>  
> +static const struct i2c_adapter_quirks rcar_i2c_quirks = {
> +	.flags = I2C_AQ_NO_ZERO_LEN,
> +};
> +
>  static const struct of_device_id rcar_i2c_dt_ids[] = {
>  	{ .compatible = "renesas,i2c-r8a7778", .data = (void *)I2C_RCAR_GEN1 },
>  	{ .compatible = "renesas,i2c-r8a7779", .data = (void *)I2C_RCAR_GEN1 },
> @@ -943,6 +941,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>  	adap->dev.parent = dev;
>  	adap->dev.of_node = dev->of_node;
>  	adap->bus_recovery_info = &rcar_i2c_bri;
> +	adap->quirks = &rcar_i2c_quirks;
>  	i2c_set_adapdata(adap, priv);
>  	strlcpy(adap->name, pdev->name, sizeof(adap->name));
>  
> -- 
> 2.11.0
> 

-- 
Regards,
Niklas Söderlund

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ