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: <115bc80b5d4098cd350569a12c41a072c4ffd6d3.camel@baylibre.com>
Date: Mon, 09 Feb 2026 10:17:32 +0100
From: Francesco Lavra <flavra@...libre.com>
To: Andi Shyti <andi.shyti@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org
Subject: Re: [PATCH v3] i2c: Add FTDI FT4222H USB I2C adapter

On Wed, 2026-02-04 at 23:06 +0100, Andi Shyti wrote:
...
> > +       buf[0] = slave_addr << 1;
> > +       buf[2] = buf[3] = 0;
> > +       do {
> > +               int pkt_len = min(FT4222_TX_HDRLEN + len - written,
> > +                                 FT4222_BULK_MAXLEN);
> > +               bool first_pkt = (written == 0);
> > +               bool last_pkt = (written + pkt_len == FT4222_TX_HDRLEN
> > + len);
> > +               int ret, actual_len;
> > +
> > +               buf[1] = 0;
> > +               if (first_pkt)
> > +                       buf[1] |= flags & FT4222_FLAG_RESTART;
> 
> Aren't we losing the _START case here?

The _RESTART flag is 0x3, and the _START flag is 0x02, so by applying the
_RESTART mask we are including the _START case too. But the code shouldn't
depend on this detail, I will change it to `flags & (FT4222_FLAG_START |
FT4222_FLAG_RESTART)`.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ