From: Vojtech Pavlik <vojtech@suse.cz>
To: vojtech@suse.cz, linux-kernel@vger.kernel.org, janekh@cvotech.com
Subject: Re: [PATCH] 2.5.62: /proc/ide/via reads return incomplete data, Bug #374
Date: Fri, 14 Mar 2003 09:49:53 +0100 [thread overview]
Message-ID: <20030314094953.A28232@ucw.cz> (raw)
In-Reply-To: <20030220215519.GA1181@ttnet.net.tr>; from faikuygur@ttnet.net.tr on Thu, Feb 20, 2003 at 11:55:19PM +0200
On Thu, Feb 20, 2003 at 11:55:19PM +0200, Faik Uygur wrote:
>
> This patch fixes the incomplete data return problem of /proc/ide/via and
> addresses Bug #374 of Bugzilla.
>
> When the number of consecutive read bytes are smaller than the total data
> in via_get_info(), the second read() returns 0.
>
> --- linux-2.5.62-vanilla/drivers/ide/pci/via82cxxx.c Thu Feb 20 18:51:52 2003
> +++ linux-2.5.62/drivers/ide/pci/via82cxxx.c Thu Feb 20 23:09:23 2003
> @@ -145,6 +145,7 @@
> uen[4], udma[4], umul[4], active8b[4], recover8b[4];
> struct pci_dev *dev = bmide_dev;
> unsigned int v, u, i;
> + int len;
> u16 c, w;
> u8 t, x;
> char *p = buffer;
> @@ -274,7 +275,10 @@
> speed[i] / 1000, speed[i] / 100 % 10);
>
> /* hoping it is less than 4K... */
> - return p - buffer;
> + len = (p - buffer) - offset;
> + *addr = buffer + offset;
> +
> + return len > count ? count : len;
> }
>
> #endif /* DISPLAY_VIA_TIMINGS && CONFIG_PROC_FS */
Thanks; applied.
--
Vojtech Pavlik
SuSE Labs
prev parent reply other threads:[~2003-03-14 8:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-20 21:55 [PATCH] 2.5.62: /proc/ide/via reads return incomplete data, Bug #374 Faik Uygur
[not found] ` <Pine.LNX.4.44.0302210924001.18867-100000@cat.cvo>
2003-02-21 16:57 ` Faik Uygur
2003-02-21 17:27 ` Faik Uygur
2003-03-14 8:49 ` Vojtech Pavlik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030314094953.A28232@ucw.cz \
--to=vojtech@suse.cz \
--cc=janekh@cvotech.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox