Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600560
| Path | csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | William Breathitt Gray <vilhelm.gray@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] iio: 104-quad-8: Fix off-by-one error when addressing flag register |
| Date | Tue, 14 Mar 2017 16:10:03 +0100 |
| Message-ID | <tkWfh-1T2-49@gated-at.bofh.it> (permalink) |
| References | <t8Ywa-7IY-25@gated-at.bofh.it> <t9Ctz-7ty-7@gated-at.bofh.it> <tkymB-1ax-1@gated-at.bofh.it> <tkFR8-6IY-23@gated-at.bofh.it> |
| X-Original-To | stable@vger.kernel.org |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4xU0PJw5dSTorGH1L5Y60eXds9jZcrmLHz4FwxZUnGA=; b=DhhuuCne25zzKvnkK8WqcGQ2nKfpq4v40wtJGBPoJQrJ4h2qRwAMIWoBWukZDw193p y8WLo6HjBmQ56YT8nvrsmNslQNJ42Ugr2gPD1FeWSI6CM706P7E6yeFEfMr2U/VBSa6b 6DA6Xe2DeEBkJA9t5iNw2IbrHWHQSrCrW8Af48eM3M2n3AYVXvqRxuwn3JqHWQz3+IRN uCqo5XSTgKNZH3ofJ+hDi20d6+HkTZiPj2GIidFvkD2b6Si445pvMMzHuTTQSqC8ifoc 4CO9M1RQA10CeZ4hfkWbvzg9Mu3y0aiUYn69VVnSbcpSp50vmEGumZk3P47INqaA54l+ La1Q== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4xU0PJw5dSTorGH1L5Y60eXds9jZcrmLHz4FwxZUnGA=; b=bVsl7T1+UReHj3pbACQRZTyHsKR96d7a4W4yj1A8hriCEStM2lCrCbuBdCrjtOQv7W /hKSyzsiKnYyuigXINsFkfwJ7K54m6gSSDzkMfew4fJDoMpGPAEGlKjEHgjnGXUaWvtM myBG1DnUv4bWewQesD8hfAJ0w20hpdoqWQ0YBP5qtC9p7xfcdR7vGeBfvzlKs4ANivyh qUCLIjqiizEDpb2Sk2VwPLxJWUwAGcyvqWXADe6RszYNN3XfS4NEFRx9vuT1uxs16Fc/ nU50j8xgLFb2Nd3lTIJ+ApbYGZZ9K+T5mS4BBSSXAZG79yQxu99FVlCxyR7rI53cDd7r nQTA== |
| X-Gm-Message-State | AMke39lAfaz1WeTOh5MJPvs/2lghOs5UgwQM4cEDa6IQCw8wA+7U/MwxDfxtuKAmoSgq7Q== |
| X-Received | by 10.129.72.199 with SMTP id v190mr20981992ywa.22.1489503651983; Tue, 14 Mar 2017 08:00:51 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| User-Agent | Mutt/1.7.2 (2016-11-26) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 73 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Jonathan Cameron <jic23@kernel.org>, Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, Peter Meerwald-Stadler <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Tue, 14 Mar 2017 11:00:43 -0400 |
| X-Original-Message-ID | <20170314150043.GA24126@sophia> |
| X-Original-References | <20170209150341.GA29292@sophia> <d89a328a-4873-021e-a92b-f0498cb49d03@kernel.org> <20170313133319.GA3607@sophia> <d4955577-9524-78b7-9afb-e1ebf1438ef7@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1600560 |
Show key headers only | View raw
On Mon, Mar 13, 2017 at 09:33:45PM +0000, Jonathan Cameron wrote:
>On 13/03/17 13:33, William Breathitt Gray wrote:
>> On Sat, Feb 11, 2017 at 09:37:35AM +0000, Jonathan Cameron wrote:
>>> On 09/02/17 15:03, William Breathitt Gray wrote:
>>>> The flag register is offset by 1 from the respective channel data
>>>> register. This patch fixes an off-by-one error when attempting to read a
>>>> channel flag register where the base address was not properly offset.
>>>>
>>>> Fixes: 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8")
>>>> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
>>> Applied to the fixes-togreg-post-rc1 branch of iio.git
>>> Clue to when this will go upstream is in the name ;)
>>>
>>> Thanks,
>>>
>>> Jonathan
>>
>> Hi Jonathan,
>>
>> I see that this fix made it into 4.11-rc1 but not the 4.10.2 release.
>> Is this patch on track to appear in stable, or should I explicitly CC
>> stable@vger.kernel.org to pick this up?
>I was half asleep and failed to tag this in the first place.
>
>Send an email to stable@vger.kernel.org with the commit ID and a request
>that it is picked up. Cc me.
>
>Jonathan
>>
>> Thanks,
>>
>> William Breathitt Gray
>>
Hello,
This patch was merged into Linus' tree as commit ca8d8e03b4c9 ("iio:
104-quad-8: Fix off-by-one error when addressing flag register"). This
fix should be merged into the 4.10 stable tree as well to fix an
off-by-one error which causes garbage data to be read as count values --
effectively preventing proper usage of the driver.
This patch fixes commit 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support
for the ACCES 104-QUAD-8").
Thank you,
William Breathitt Gray
>>>> ---
>>>> drivers/iio/counter/104-quad-8.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/iio/counter/104-quad-8.c b/drivers/iio/counter/104-quad-8.c
>>>> index a5913e97945e..f9b8fc9ae13f 100644
>>>> --- a/drivers/iio/counter/104-quad-8.c
>>>> +++ b/drivers/iio/counter/104-quad-8.c
>>>> @@ -76,7 +76,7 @@ static int quad8_read_raw(struct iio_dev *indio_dev,
>>>> return IIO_VAL_INT;
>>>> }
>>>>
>>>> - flags = inb(base_offset);
>>>> + flags = inb(base_offset + 1);
>>>> borrow = flags & BIT(0);
>>>> carry = !!(flags & BIT(1));
>>>>
>>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] iio: 104-quad-8: Fix off-by-one error when addressing flag register William Breathitt Gray <vilhelm.gray@gmail.com> - 2017-03-14 16:10 +0100 Re: [PATCH] iio: 104-quad-8: Fix off-by-one error when addressing flag register Greg KH <gregkh@linuxfoundation.org> - 2017-03-15 06:40 +0100
csiph-web