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]
Date:	Mon, 21 Mar 2011 07:57:14 +0000
From:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
To:	Richard Genoud <richard.genoud@...il.com>
CC:	"stable@...nel.org" <stable@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"device-driver-devel@...ckfin.uclinux.org" 
	<device-driver-devel@...ckfin.uclinux.org>
Subject: RE: [PATCH] ad525x_dpot: [BUG] eeprom command send instead of
 dec/inc all commands

Richard Genoud wrote on 2011-03-12:
> When a DEC_ALL or INC_ALL command is issued, an eeprom command is send.
> This is because DPOT_DEC_ALL (DPOT_ADDR_CMD | 0x30) and DPOT_INC_ALL
> (DPOT_ADDR_CMD | 0x58) defines overlap with DPOT_ADDR_EEPROM (0x20).
>
> So, DPOT_ADDR_CMD bit should be tested before DPOT_ADDR_EEPROM bit.
>
> Signed-off-by: Richard Genoud <richard.genoud@...il.com>

Acked-by: Michael Hennerich <michael.hennerich@...log.com>

> ---
>  drivers/misc/ad525x_dpot.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c
> index 7cb9110..b6c5391 100644
> --- a/drivers/misc/ad525x_dpot.c
> +++ b/drivers/misc/ad525x_dpot.c
> @@ -289,8 +289,6 @@ static s32 dpot_write_spi(struct dpot_data *dpot,
> u8 reg, u16 value)
>                       }
>                       val = DPOT_SPI_RDAC | (reg & DPOT_RDAC_MASK);
>               }
> -     } else if (reg & DPOT_ADDR_EEPROM) {
> -             val = DPOT_SPI_EEPROM | (reg & DPOT_RDAC_MASK);
>       } else if (reg & DPOT_ADDR_CMD) {
>               switch (reg) {
>               case DPOT_DEC_ALL_6DB:
> @@ -306,6 +304,8 @@ static s32 dpot_write_spi(struct dpot_data *dpot,
> u8 reg, u16 value)
>                       val = DPOT_SPI_INC_ALL;
>                       break;
>               }
> +     } else if (reg & DPOT_ADDR_EEPROM) {
> +             val = DPOT_SPI_EEPROM | (reg & DPOT_RDAC_MASK);
>       } else if (reg & DPOT_ADDR_OTP) {
>               if (dpot->uid == DPOT_UID(AD5291_ID) ||
>                       dpot->uid == DPOT_UID(AD5292_ID)) {

Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif

--
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