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:	Tue, 07 Feb 2012 17:25:52 -0600 (CST)
From:	Aaron Sierra <asierra@...-inc.com>
To:	Jean Delvare <khali@...ux-fr.org>
Cc:	guenter roeck <guenter.roeck@...csson.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Tyser <ptyser@...-inc.com>
Subject: Re: [PATCH 2/3 v2] gpio: Add support for Intel ICHx/3100/Series[56] GPIO

> > +static int ichx_write_bit(int reg, unsigned nr, int val, int
> > verify)
> > +{
> > +	unsigned long flags;
> > +	u32 data, tmp;
> > +	int reg_nr = nr / 32;
> > +	int bit = nr & 0x1f;
> > +	int ret = 0;
> > +
> > +	spin_lock_irqsave(&ichx_priv.lock, flags);
> > +
> > +	data = ICHX_READ(ichx_regs[reg][reg_nr], ichx_priv.gpio_base);
> > +	data = (data & ~(1 << bit)) | (val << bit);
> 
> I posted a fix for this function last Sunday:
> 
> Subject: [PATCH] gpio-ich: Fix setting GPIO value
> Date: Sun, 5 Feb 2012 21:44:44 +0100
> 
> Please apply it, otherwise your driver doesn't implement the gpio
> driver API properly and code running on top of it (consumer drivers)
> may fail.
> 

Jean,
Thanks for the reminder and for the patch. I have applied it to my tree.

-Aaron

> > +	ICHX_WRITE(data, ichx_regs[reg][reg_nr], ichx_priv.gpio_base);
> > +	tmp = ICHX_READ(ichx_regs[reg][reg_nr], ichx_priv.gpio_base);
> > +	if (verify && (data != tmp))
> > +		ret = -EPERM;
> > +
> > +	spin_unlock_irqrestore(&ichx_priv.lock, flags);
> > +
> > +	return ret;
> > +}
> 
> --
> Jean Delvare
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ