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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Jun 2012 14:46:39 +0300
From:	Felipe Balbi <balbi@...com>
To:	"Shilimkar, Santosh" <santosh.shilimkar@...com>
Cc:	Felipe Balbi <balbi@...com>, ben-linux@...ff.org,
	Tony Lindgren <tony@...mide.com>, w.sang@...gutronix.de,
	Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
	linux-i2c@...r.kernel.org,
	Linux ARM Kernel Mailing List 
	<linux-arm-kernel@...ts.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 09/17] i2c: omap: ack IRQ in parts

On Thu, Jun 14, 2012 at 04:41:45PM +0530, Shilimkar, Santosh wrote:
> On Thu, Jun 14, 2012 at 3:50 PM, Felipe Balbi <balbi@...com> wrote:
> > According to flow diagrams on OMAP TRMs,
> > we should ACK the IRQ as they happen.
> >
> > Signed-off-by: Felipe Balbi <balbi@...com>
> > ---
> >  drivers/i2c/busses/i2c-omap.c |   29 +++++++++++++++++------------
> >  1 file changed, 17 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> > index f978b14..c00ba7d 100644
> > --- a/drivers/i2c/busses/i2c-omap.c
> > +++ b/drivers/i2c/busses/i2c-omap.c
> > @@ -894,21 +894,20 @@ omap_i2c_isr(int this_irq, void *dev_id)
> >                }
> >
> >  complete:
> > -               /*
> > -                * Ack the stat in one go, but [R/X]DR and [R/X]RDY should be
> > -                * acked after the data operation is complete.
> > -                * Ref: TRM SWPU114Q Figure 18-31
> > -                */
> > -               omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat &
> > -                               ~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
> > -                               OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
> > -
> > -               if (stat & OMAP_I2C_STAT_NACK)
> > +               if (stat & OMAP_I2C_STAT_NACK) {
> > +                       dev_err(dev->dev, "No Acknowledge\n");
> >                        err |= OMAP_I2C_STAT_NACK;
> > +                       omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK);
> > +                       omap_i2c_complete_cmd(dev, err);
> > +                       return IRQ_HANDLED;
> > +               }
> >
> Do you think making I2C IRQ ack + complete as one small static inline function
> can save clean the code further. I see it has been used in multiple paths.

done in a later patch

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ