<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/gadget, branch linux-2.6.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2006-02-28T20:42:06+00:00</updated>
<entry>
<title>[PATCH] USB: Gadget RNDIS fix alloc bug. (buffer overflow)</title>
<updated>2006-02-28T20:42:06+00:00</updated>
<author>
<name>Shaun Tancheff</name>
<email>shaun@tancheff.com</email>
</author>
<published>2006-02-23T03:47:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8763716bfe4d8a16bef28c9947cf9d799b1796a5'/>
<id>urn:sha1:8763716bfe4d8a16bef28c9947cf9d799b1796a5</id>
<content type='text'>
Remote NDIS response to OID_GEN_SUPPORTED_LIST only allocated space
for the data attached to the reply, and not the reply structure
itself. This caused other kmalloc'd memory to be corrupted.

Signed-off-by: Shaun Tancheff &lt;shaun@tancheff.com&gt;
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB: lh7a40x gadget driver: Fixed a dead lock</title>
<updated>2006-02-28T20:42:06+00:00</updated>
<author>
<name>Franck Bui-Huu</name>
<email>vagabon.xyz@gmail.com</email>
</author>
<published>2006-02-23T08:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5ec33490c67affef93aebf76e1238260c82d377'/>
<id>urn:sha1:d5ec33490c67affef93aebf76e1238260c82d377</id>
<content type='text'>
There is a dead lock in lh7a40x udc driver. When the driver receive a
SET_FEATURE HALT request, the dev lock is taken by the interrupt
handler lh7a40x_udc_irq then the handler will call lh7a40x_set_halt
function which in its turn will try to acquire the dev lock.

Signed-off-by: Franck Bui-Huu &lt;franck.bui-huu@innova-card.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB: gadget zero and dma-coherent buffers</title>
<updated>2006-02-01T01:23:44+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2006-01-20T22:38:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69396dcfa3c50a6b8d2caaccf5d1496ecd5594be'/>
<id>urn:sha1:69396dcfa3c50a6b8d2caaccf5d1496ecd5594be</id>
<content type='text'>
This makes sure that the correct length is reported when freeing
a dma-coherent buffer; some platforms complain if that's wrong.
It also makes two parameters readonly in sysfs, as they're not
safe to change while tests are running.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB: gadgetfs: set "zero" flag for short control-IN response</title>
<updated>2006-02-01T01:23:42+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2006-01-03T15:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=979063692726fa40863345fb1b62daf2f795ddc0'/>
<id>urn:sha1:979063692726fa40863345fb1b62daf2f795ddc0</id>
<content type='text'>
This patch (as622) makes gadgetfs set the "zero" flag for control-IN
responses, when the length of the response is shorter than the length of
the request.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB: net2280 warning fix</title>
<updated>2006-02-01T01:23:42+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2006-01-19T07:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=682d4c803f646d2ce09fde9ed7e99015598c3298'/>
<id>urn:sha1:682d4c803f646d2ce09fde9ed7e99015598c3298</id>
<content type='text'>
For some reason alpha doesn't include &lt;linux/dma-mapping.h&gt; where other
architectures do; this makes net2280 include it explicitly.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] Remove usb gadget generic driver methods</title>
<updated>2006-01-13T19:26:11+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk@arm.linux.org.uk</email>
</author>
<published>2006-01-06T11:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d78967fb035aeb839a047ae69ce5f1ff39288a8d'/>
<id>urn:sha1:d78967fb035aeb839a047ae69ce5f1ff39288a8d</id>
<content type='text'>
USB gadget drivers make no use of these, remove the pointless
comments.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] TTY layer buffering revamp</title>
<updated>2006-01-10T16:01:59+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@lxorguk.ukuu.org.uk</email>
</author>
<published>2006-01-10T04:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33f0f88f1c51ae5c2d593d26960c760ea154c2e2'/>
<id>urn:sha1:33f0f88f1c51ae5c2d593d26960c760ea154c2e2</id>
<content type='text'>
The API and code have been through various bits of initial review by
serial driver people but they definitely need to live somewhere for a
while so the unconverted drivers can get knocked into shape, existing
drivers that have been updated can be better tuned and bugs whacked out.

This replaces the tty flip buffers with kmalloc objects in rings. In the
normal situation for an IRQ driven serial port at typical speeds the
behaviour is pretty much the same, two buffers end up allocated and the
kernel cycles between them as before.

When there are delays or at high speed we now behave far better as the
buffer pool can grow a bit rather than lose characters. This also means
that we can operate at higher speeds reliably.

For drivers that receive characters in blocks (DMA based, USB and
especially virtualisation) the layer allows a lot of driver specific
code that works around the tty layer with private secondary queues to be
removed. The IBM folks need this sort of layer, the smart serial port
people do, the virtualisers do (because a virtualised tty typically
operates at infinite speed rather than emulating 9600 baud).

Finally many drivers had invalid and unsafe attempts to avoid buffer
overflows by directly invoking tty methods extracted out of the innards
of work queue structs. These are no longer needed and all go away. That
fixes various random hangs with serial ports on overflow.

The other change in here is to optimise the receive_room path that is
used by some callers. It turns out that only one ldisc uses receive room
except asa constant and it updates it far far less than the value is
read. We thus make it a variable not a function call.

I expect the code to contain bugs due to the size alone but I'll be
watching and squashing them and feeding out new patches as it goes.

Because the buffers now dynamically expand you should only run out of
buffering when the kernel runs out of memory for real.  That means a lot of
the horrible hacks high performance drivers used to do just aren't needed any
more.

Description:

tty_insert_flip_char is an old API and continues to work as before, as does
tty_flip_buffer_push() [this is why many drivers dont need modification].  It
does now also return the number of chars inserted

There are also

tty_buffer_request_room(tty, len)

which asks for a buffer block of the length requested and returns the space
found.  This improves efficiency with hardware that knows how much to
transfer.

and tty_insert_flip_string_flags(tty, str, flags, len)

to insert a string of characters and flags

For a smart interface the usual code is

    len = tty_request_buffer_room(tty, amount_hardware_says);
    tty_insert_flip_string(tty, buffer_from_card, len);

More description!

At the moment tty buffers are attached directly to the tty.  This is causing a
lot of the problems related to tty layer locking, also problems at high speed
and also with bursty data (such as occurs in virtualised environments)

I'm working on ripping out the flip buffers and replacing them with a pool of
dynamically allocated buffers.  This allows both for old style "byte I/O"
devices and also helps virtualisation and smart devices where large blocks of
data suddenely materialise and need storing.

So far so good.  Lots of drivers reference tty-&gt;flip.*.  Several of them also
call directly and unsafely into function pointers it provides.  This will all
break.  Most drivers can use tty_insert_flip_char which can be kept as an API
but others need more.

At the moment I've added the following interfaces, if people think more will
be needed now is a good time to say

 int tty_buffer_request_room(tty, size)

Try and ensure at least size bytes are available, returns actual room (may be
zero).  At the moment it just uses the flipbuf space but that will change.
Repeated calls without characters being added are not cumulative.  (ie if you
call it with 1, 1, 1, and then 4 you'll have four characters of space.  The
other functions will also try and grow buffers in future but this will be a
more efficient way when you know block sizes.

 int tty_insert_flip_char(tty, ch, flag)

As before insert a character if there is room.  Now returns 1 for success, 0
for failure.

 int tty_insert_flip_string(tty, str, len)

Insert a block of non error characters.  Returns the number inserted.

 int tty_prepare_flip_string(tty, strptr, len)

Adjust the buffer to allow len characters to be added.  Returns a buffer
pointer in strptr and the length available.  This allows for hardware that
needs to use functions like insl or mencpy_fromio.

Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Cc: Paul Fulghum &lt;paulkf@microgate.com&gt;
Signed-off-by: Hirokazu Takata &lt;takata@linux-m32r.org&gt;
Signed-off-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: John Hawkes &lt;hawkes@sgi.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] mutex subsystem, semaphore to mutex: VFS, -&gt;i_sem</title>
<updated>2006-01-09T23:59:24+00:00</updated>
<author>
<name>Jes Sorensen</name>
<email>jes@sgi.com</email>
</author>
<published>2006-01-09T23:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b1dcc1b57a49136f118a0f16367256ff9994a69'/>
<id>urn:sha1:1b1dcc1b57a49136f118a0f16367256ff9994a69</id>
<content type='text'>
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.

Modified-by: Ingo Molnar &lt;mingo@elte.hu&gt;

(finished the conversion)

Signed-off-by: Jes Sorensen &lt;jes@sgi.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB: Use ARRAY_SIZE macro</title>
<updated>2006-01-04T21:51:43+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@nuerscht.ch</email>
</author>
<published>2005-12-11T15:20:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52950ed40dc97456209979af1d8f51b63cf6dcab'/>
<id>urn:sha1:52950ed40dc97456209979af1d8f51b63cf6dcab</id>
<content type='text'>
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed.

Patch is compile-tested on i386.

Signed-off-by: Tobias Klauser &lt;tklauser@nuerscht.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] USB Gadget: dummy_hcd: updates to hcd-&gt;state</title>
<updated>2006-01-04T21:51:40+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2005-11-29T17:08:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3cf0a22e8b1b3f44288db773d315e72e89d51c4c'/>
<id>urn:sha1:3cf0a22e8b1b3f44288db773d315e72e89d51c4c</id>
<content type='text'>
This patch (as613) moves the updates to hcd-&gt;state in the dummy_hcd
driver to where they now belong.  It also uses the new
HC_FLAG_HW_ACCESSIBLE flag in a way that simulates a real PCI
controller, and it adds checks for attempts to resume the bus while the
controller is suspended or to suspend the controller while the bus is
active.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
