On 04/06/2004 19:04, Pete Zaitcev wrote:
On Fri, 04 Jun 2004 17:34:41 +0100 Ian Abbott <[EMAIL PROTECTED]> wrote:I made the original change to ftdi_sio.c to allocate the write urbs and their transfer buffers dynamically (instead of using a preallocated pool) and I copied that technique from visor.c!
A related problem with the current implementation is that is easy to run out of memory by running something similar to this:
# cat /dev/zero > /dev/ttyUSB0
This begs the question why in the world you discarded the perfectly good code and went into the trouble of programming the dynamic allocation scheme (with the leak we just plugged).
I take your point - it would have been better if this replacement was developed a bit further before 2.6 was released. Actually, there are still problems with the "perfectly good" write pool code in 2.4's ftdi_sio driver, but these are not as drastic as sucking up system memory! (In 2.4, the problem with the existing write pool code in ftdi_sio and some other drivers is that some stuff written by the TTY line discipline can go missing when there is only one urb left in the write urb pool.)
I originally replaced the write pool following a suggestion by Greg KH: <http://marc.theaimsgroup.com/?l=linux-usb-devel&m=104645316427847&w=2>.
But it took me about 4 months to get a round tuit: <http://marc.theaimsgroup.com/?l=linux-usb-devel&m=105714978700639&w=2>.
As this was the development kernel, there were still problems with the replacement driver code, apart from its possibility of sucking up system memory like crazy! I mentioned a problem with module ref counting (which also affected the visor driver): <http://marc.theaimsgroup.com/?l=linux-usb-devel&m=105673031518663&w=2>.
Here is the rest of that thread: <http://marc.theaimsgroup.com/?t=105673471300003&r=1&w=2>.
-- -=( Ian Abbott @ MEV Ltd. E-mail: <[EMAIL PROTECTED]> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
