From: Faik Uygur <faikuygur@ttnet.net.tr>
To: vojtech@suse.cz
Cc: linux-kernel@vger.kernel.org, janekh@cvotech.com
Subject: [PATCH] 2.5.62: /proc/ide/via reads return incomplete data, Bug #374
Date: Thu, 20 Feb 2003 23:55:19 +0200 [thread overview]
Message-ID: <20030220215519.GA1181@ttnet.net.tr> (raw)
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 */
next reply other threads:[~2003-02-20 21:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-20 21:55 Faik Uygur [this message]
[not found] ` <Pine.LNX.4.44.0302210924001.18867-100000@cat.cvo>
2003-02-21 16:57 ` [PATCH] 2.5.62: /proc/ide/via reads return incomplete data, Bug #374 Faik Uygur
2003-02-21 17:27 ` Faik Uygur
2003-03-14 8:49 ` Vojtech Pavlik
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=20030220215519.GA1181@ttnet.net.tr \
--to=faikuygur@ttnet.net.tr \
--cc=janekh@cvotech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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