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] [day] [month] [year] [list]
Message-ID: <0b562e42889c67e96e9e8a6d1e59b58ca332dff4.camel@alliedtelesis.co.nz>
Date: Mon, 24 Mar 2025 18:14:51 +0000
From: Aryan Srivastava <Aryan.Srivastava@...iedtelesis.co.nz>
To: "andi.shyti@...nel.org" <andi.shyti@...nel.org>
CC: "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
	"Markus.Elfring@....de" <Markus.Elfring@....de>, "linux-i2c@...r.kernel.org"
	<linux-i2c@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "rric@...nel.org" <rric@...nel.org>
Subject: Re: [PATCH v13 3/3] i2c: octeon: add block-mode i2c operations

On Thu, 2025-03-20 at 10:01 +0100, Andi Shyti wrote:
> Hi Aryan,
> 
> On Thu, Mar 20, 2025 at 01:36:12AM +0000, Aryan Srivastava wrote:
> > On Wed, 2025-03-19 at 23:19 +0100, Andi Shyti wrote:
> > > > +static int octeon_i2c_hlc_block_comp_read(struct octeon_i2c
> > > > *i2c,
> > > > struct i2c_msg *msgs)
> > > > +{
> > > > +       int ret;
> > > > +       u16 len;
> > > > +       u64 cmd;
> > > > +
> > > > +       octeon_i2c_hlc_enable(i2c);
> > > > +       octeon_i2c_block_enable(i2c);
> > > > +
> > > > +       /* Write (size - 1) into block control register */
> > > > +       len = msgs[1].len - 1;
> > > > +       octeon_i2c_writeq_flush((u64)len, i2c->twsi_base +
> > > > OCTEON_REG_BLOCK_CTL(i2c));
> > > > +
> > > > +       /* Prepare core command */
> > > > +       cmd = SW_TWSI_V | SW_TWSI_R | SW_TWSI_SOVR |
> > > > SW_TWSI_OP_7_IA;
> > > > +       cmd |= (u64)(msgs[0].addr & 0x7full) <<
> > > > SW_TWSI_ADDR_SHIFT;
> > > > +
> > > > +       /* Send core command */
> > > > +       ret = octeon_i2c_hlc_read_cmd(i2c, msgs[0], cmd);
> > > > +       if (ret)
> > > > +               return ret;
> > > 
> > > Do we need to disable the block mode?
> > > 
> > Do you mean, do we need to disable the block mode at all? i.e. have
> > it
> > on all the time? Otherwise, it gets disabled at the bottom of this
> > func.
> 
> yes, but you return earlier, right?
> 
Ah yes, good catch. I will fix this up, thank you :)

Cheers, Aryan.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ