* [PATCH] firmware_helper.c: correct amount uploaded
@ 2005-09-09 8:31 Duncan Sands
2005-09-09 10:42 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Duncan Sands @ 2005-09-09 8:31 UTC (permalink / raw)
To: linux-hotplug
Uploading more than the buffer holds is not a good idea...
--- udev-068/extras/firmware/firmware_helper.c.orig 2005-09-07 19:50:43.000000000 +0200
+++ udev-068/extras/firmware/firmware_helper.c 2005-09-08 19:54:28.000000000 +0200
@@ -120,7 +120,7 @@
while (count < fw_buffer_size) {
int c;
- c = write(fw_fd, fw_buffer+count, fw_buffer_size);
+ c = write(fw_fd, fw_buffer+count, fw_buffer_size-count);
if (c <= 0) {
rc = errno;
close(fw_fd);
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] firmware_helper.c: correct amount uploaded
2005-09-09 8:31 [PATCH] firmware_helper.c: correct amount uploaded Duncan Sands
@ 2005-09-09 10:42 ` Kay Sievers
2005-09-09 16:20 ` Olivier Blin
2005-09-09 16:41 ` Duncan Sands
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2005-09-09 10:42 UTC (permalink / raw)
To: linux-hotplug
On Fri, Sep 09, 2005 at 10:31:16AM +0200, Duncan Sands wrote:
> Uploading more than the buffer holds is not a good idea...
Yeah, I messed it up. Thanks for the fix.
Kay
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] firmware_helper.c: correct amount uploaded
2005-09-09 8:31 [PATCH] firmware_helper.c: correct amount uploaded Duncan Sands
2005-09-09 10:42 ` Kay Sievers
@ 2005-09-09 16:20 ` Olivier Blin
2005-09-09 16:41 ` Duncan Sands
2 siblings, 0 replies; 4+ messages in thread
From: Olivier Blin @ 2005-09-09 16:20 UTC (permalink / raw)
To: linux-hotplug
Duncan Sands <baldrick@free.fr> writes:
> Uploading more than the buffer holds is not a good idea...
Great, it fixes firmware upload for ipw2200 drivers (in monitor mode).
Thanks a lot!
--
Olivier Blin
Mandriva
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] firmware_helper.c: correct amount uploaded
2005-09-09 8:31 [PATCH] firmware_helper.c: correct amount uploaded Duncan Sands
2005-09-09 10:42 ` Kay Sievers
2005-09-09 16:20 ` Olivier Blin
@ 2005-09-09 16:41 ` Duncan Sands
2 siblings, 0 replies; 4+ messages in thread
From: Duncan Sands @ 2005-09-09 16:41 UTC (permalink / raw)
To: linux-hotplug
> > Uploading more than the buffer holds is not a good idea...
>
> Great, it fixes firmware upload for ipw2200 drivers (in monitor mode).
It also fixes firmware upload for speedtch revision 4 modems (problem
reported by Andrew Benton, who helped me track it down - thanks Andrew!).
In practice the result of this bug was that the amount uploaded was the
size of the firmware rounded up to the nearest multiple of the page size
(due to the interaction between the bug and the fact that the firmware
class only takes one page at a time), though only if the original size
was at least one page. So small firmware blobs, or firmware which was
a multiple of the page size uploaded OK, which was confusing.
> Thanks a lot!
No problem,
Duncan.
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-09-09 16:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 8:31 [PATCH] firmware_helper.c: correct amount uploaded Duncan Sands
2005-09-09 10:42 ` Kay Sievers
2005-09-09 16:20 ` Olivier Blin
2005-09-09 16:41 ` Duncan Sands
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).